Mimo August 2022 contest - delfin454000's results

Bridging the chasm between the DeFi world and the world of regulated financial institutions.

General Information

Platform: Code4rena

Start Date: 02/08/2022

Pot Size: $50,000 USDC

Total HM: 12

Participants: 69

Period: 5 days

Judge: gzeon

Total Solo HM: 5

Id: 150

League: ETH

Mimo DeFi

Findings Distribution

Researcher Performance

Rank: 49/69

Findings: 1

Award: $69.66

🌟 Selected for report: 0

🚀 Solo Findings: 0

Missing @param statement


MIMOManagedRebalance.sol: L138-147

    @param managedVault ManagedVault struct of the vault to rebalance
    @param rbData RebalanceData struct of the vault to rebalance
    @param vaultsData Cached VaultsDataProvider interface for gas saving
   */
  function _preRebalanceChecks(
    ManagedVault memory managedVault,
    IMIMORebalance.RebalanceData calldata rbData,
    IVaultsDataProvider vaultsData,
    uint256 rebalanceAmount
  ) internal view {

@param statement is missing for rebalanceAmount



Typos

The same typo (reblanced) occurs in all three lines referenced below:

MIMORebalance.sol: L57

MIMOAutoRebalance.sol: L84

MIMOManagedRebalance.sol: L85

    @param assets Address array with one element corresponding to the address of the reblanced asset

Change reblanced to rebalanced in each case


MIMOVaultActions.sol: L14

  @notice Only intended to be hold the logic for paking delegateCalls from a MIMOProxy

Change paking to packing


The same typo (aggegator) occurs in both lines referenced below:

MIMOAutoRebalance: L52

MIMOManagedRebalance.sol: L48

    @param swapData SwapData struct containing aggegator swap parameters

Change aggegator to aggregator in both cases


MIMOAutoRebalance.sol: L157

    @notice Helper function calculating the amount to rebalance from vault A and to mint from vault B with rebalnce formula

Change rebalnce to rebalance


MIMOAutoRebalance.sol: L159

    @param vaultState VaultState struct og the vault to rebalance

Change og to of


MIMOManagedRebalance.sol: L13

@title A `SuperVault V2` action contract for configuring a vault to have a manged rebalance. 

Change manged to managed


MIMOProxyFactory.sol: L55

    // Log the proxy via en event.

Change en to an



Long single line comments

In theory, comments over 79 characters should wrap using multi-line comment syntax. Even if somewhat longer comments are acceptable, there are cases where very long comments interfere with readability. Below are five instances of long comments that could be improved by wrapping, as shown:


MIMOFlashloan.sol: L35-36

    @param initiator The address of the initiator of the flashloan; used to check that only flashloans taken from this contract can do vault operations
    @param params Bytes sent in the _takeFlashLoan calls that encode any additional needed information to complete the transaction 

Suggestion:

    @param initiator The address of the initiator of the flashloan — used to check that 
      only flashloans taken from this contract can do vault operations. 
    @param params Bytes sent in the _takeFlashLoan calls that encode any
      additional needed information to complete the transaction.

MIMOVaultAction.sol: L53

  /// @notice Wrap ETH and deposit WETH as collateral into a vault, all through a delegatecall to a MIMOProxy clone.

Suggestion:

  /// @notice Wrap ETH and deposit WETH as collateral into a vault,
  ///   all through a delegatecall to a MIMOProxy clone.

MIMOAutoRebalance.sol: L252-261

  /**
    @notice Helper function performing post rebalance operation sanity checks
    @dev Checks that change in global vault value (vault A + B) is below allowedVaration and vault A ratio equal or above targetRatio
    @param autoVault AutomatedVault struct of the vault to rebalance
    @param rebalanceAmount Rebalanced amount
    @param vaultBBalanceBefore Collateral balance of the vault to be rebalanced to before the rebalance operation
    @param vaultId Vault id of the vault to rebalance
    @param vaultOwner Rebalanced vault owner
    @param vaultsData Cached VaultsDataProvider interface for gas saving
   */

Suggestion:

  /** 
    @notice Helper function performing post rebalance operation sanity checks
    @dev Checks that change in global vault value (vault A + B) is below allowedVaration and 
      vault A ratio equal or above targetRatio. 
    @param autoVault AutomatedVault struct of the vault to rebalance
    @param rebalanceAmount Rebalanced amount
    @param vaultBBalanceBefore Collateral balance of the vault to be
      rebalanced to before the rebalance operation.
    @param vaultId Vault id of the vault to rebalance
    @param vaultOwner Rebalanced vault owner
    @param vaultsData Cached VaultsDataProvider interface for gas saving
  */

MIMOManagedRebalance.sol: L12-15

/** 
@title A `SuperVault V2` action contract for configuring a vault to have a manged rebalance. 
@notice This contract only serves to change the access control and enforce the `managedRebalance` configuration; the actual rebalance logic is done through the `MIMORebalance` contract through a `delegateCall` from a `MIMOProxy` clone
*/

Suggestion:

  /** 
    @title A `SuperVault V2` action contract for configuring a vault to have a managed rebalance. 
    @notice This contract only serves to change the access control and enforce
      the `managedRebalance` configuration — the actual rebalance logic is done through 
      the `MIMORebalance` contract through a `delegateCall` from a `MIMOProxy` clone.
  */

IMIMOProxy.sol: L19

  /// @notice Returns a boolean flag that indicates whether the envoy has permission to call the given target contract's given selector method 

Suggestion:

  /// @notice Returns a boolean flag that indicates whether the envoy has permission
  ///   to call the given target contract's given selector method.


Update sensitive terms

Terms incorporating "white," "black," "master" or "slave" are potentially problematic. Substituting more neutral terminology is becoming common practice.


MIMOSwap.sol: L14

  @dev Supports any aggregators whitelisted by the DexAddressProvider

Suggestion: Change whitelisted to allowlisted


Similarly for the following instances of whitelist and its variants:

MIMOManagedAction.sol: L29

MIMOManagedAction.sol: L50

MIMOManagedRebalance.sol: L42



AuditHub

A portfolio for auditors, a security profile for protocols, a hub for web3 security.

Built bymalatrax © 2024

Auditors

Browse

Contests

Browse

Get in touch

ContactTwitter