Adamant Finance Aave Lending Vaults

Smart Contract Audit Report

Audit Summary

Adamant Finance Audit Report Adamant Finance is building a single asset lending vault in which users deposit ETH into Aave, borrow USDC to add liquidity to Curve, and deposit the Curve LP tokens in a yield farm for extra rewards.

For this audit, we reviewed the project team's AaveVaultFactory, VaultFactory, AM3CrvVault, AaveVaultBase, and WhitelistVault contracts at commit 0cd70e4b8b176dfdf9753717ec8e3c6a95ce2ae8 on the team's GitHub repository.

Audit Findings

Please ensure trust in the team prior to investing as they have notable control in the ecosystem.
Date: March 1st, 2022.

Finding #1 - AdamantFinance - Informational

Description: Several functions are declared public, but are never called internally.
WhitelistVault.getRatio, WhitelistVault.balanceOf, WhitelistVault.setVaultFactory, AaveVaultBase.getHealthFactor, AaveVaultBase.deposit, AaveVaultBase.borrow, AaveVaultBase.withdraw, AaveVaultBase.exit, AaveVaultBase.repayFromWallet, AaveVaultBase.repay, AaveVaultBase.executeTransaction
Recommendation: These functions should be declared external for additional gas savings on each call.

Finding #2 - AaveVaultBase - Informational

Description: The rateMode state variable can never be modified, but is not declared constant.
Recommendation: This state variable should be declared constant for additional gas savings on each reference.

Contracts Overview

  • The contracts utilize ReentrancyGuard to prevent against reentrancy attacks in applicable functions.
  • The contracts utilize SafeMath to protect against any underflow/overflow issues.
  • The team must exercise caution when assigning the staking token to avoid using fee-on-transfer tokens.
AaveVaultFactory and VaultFactory Contracts:
  • This contract can be used by anyone to deploy their own AM3CrvVault contract; each user can only create a single vault.
  • The user creating the vault serves as the Vault Owner.
  • The deployed vault contracts rely on the Factory contract for several variables including the performance fee rate, the minimum health factor, the ERC Fund address, approved Guardian addresses, and the PriceCalculator contract.
  • The owner can set the performance fee rate to any value up to 30% at any time.
  • The owner can set the minimum health factor to any value greater than 1 at any time.
  • The owner can set the ERC Fund address and the PriceCalculator contract address to any address at any time.
  • The owner can grant or revoke Guardian privileges at any time; Guardians are able to execute any arbitrary transactions on the Vault contracts in the event that the Vault Owner has granted the Guardian permission to do so.
AM3CrvVault and AaveVaultBase Contracts:
  • The Vault Owner can use this contract to deposit any amount of the specified collateral token (WETH) into the Aave Lending Pool at any time.
  • The Vault Owner can use this contract to borrow any amount of the specified borrow token (USDC) from the Aave Lending Pool as long as the contract's health factor after borrowing the funds is at least as much as the minimum health factor set in the Vault Factory.
  • Upon borrowing, the USDC is added as liquidity to the am3CRV Curve Pool, and the received Curve LP tokens are deposited into the WhitelistVault contract.
  • The Vault Owner can use this contract to withdraw any amount of the deposited WETH from the Aave Lending Pool as long as the contract's health factor after withdrawing the funds is at least as much as the minimum health factor set in the Vault Factory.
  • The withdrawn tokens are transferred to the Vault Owner's address.
  • The Vault Owner can use this contract to exit their position in the Vault at any time.
  • Upon exiting, the Curve LP tokens are withdrawn from the WhitelistVault contract, and the USDC liquidity is removed from the am3CRV Curve Pool.
  • The returned USDC is used to repay the debt owed to the Lending Pool; the debt may also be repaid by withdrawing collateral WETH from the Lending Pool and swapping it for USDC.
  • Upon swapping, the contract relies on a PriceCalculator contract set in the VaultFactory in order to convert the value of the borrowed tokens from USDC to ETH. The PriceCalculator contract was not included in the scope of the audit, so our team is unable to provide an assessment of this contract in terms of security.
  • All debt must be fully repaid in order to successfully exit the position.
  • Once the debt is repaid, the remaining collateral tokens are withdrawn from the Lending Pool.
  • Any remaining USDC in the contract is considered profit; the profit is subject to a performance fee unless either of the following conditions are met:
    • The collateral tokens withdrawn from the Lending Pool is less than what was deposited. This may happen in the event of a liquidation in the Aave Lending Pool.
    • The total debt cannot be repaid with the USDC in the contract and at least part of the collateral tokens must be used to repay the debt to the Lending Pool.
  • The performance fee is transferred to the ERC Fund address controlled by the project team; the performance fee is determined by values set by the project team in the VaultFactory contract.
  • The remaining USDC is transferred to the Vault Owner.
  • The remaining collateral tokens in the contract are transferred to the Vault Owner.
  • Any accrued rewards in the Aave Incentives Controller are claimed and stored in the contract.
  • A portion of the rewards is transferred to the ERC Fund as a performance fee and the remaining amount is transferred to the Vault Owner.
  • The Vault Owner can choose to repay all the debt at any time using USDC from their own wallet address.
  • The Vault Owner or any approved Guardian address can withdraw any amount of Curve LP tokens from the WhitelistVault and remove the USDC liquidity; the returned USDC must be used to repay all or part of the debt to the Lending Pool.
  • Any approved Guardian address can use this contract to execute arbitrary call data on any target address as long as the Vault Owner has granted the proper permissions.
  • The Vault Owner can grant or revoke permission for the Guardians to execute arbitrary call data on the contract's behalf at any time.
  • The Vault Owner should exercise caution when granting this permission is granted to all approved Guardians in the VaultFactory and the Guardians are able to use this to execute any transactions on the contract's behalf, including withdrawing any tokens or ETH from the contract or the associated Lending Pool.
WhitelistVault Contract:
  • This contract is intended to be used across the platform to facilitate a compounding vault for all of the platform's vaults registered within the VaultFactory contract.
  • Only registered Vault addresses can deposit any amount of the designated LP token into the underlying Strategy contract and receive an amount of shares in return based on the amount of LP tokens the user is depositing in relation to the amount of LP tokens that are currently in the system.
  • Users can withdraw from the Vault at any time, exchanging their shares for a proportional amount of LP tokens in return.
  • Upon withdrawing from the Vault, the contract will withdraw any LP tokens from the underlying Strategy contract; in the event that there are not enough LP tokens to cover the withdrawal, the contract will transfer its balance of LP tokens and consider the shares withdrawn.
  • The owner is able to set the VaultFactory address to any address only once; after it is set, the VaultFactory address cannot be changed.

Audit Results

Vulnerability CategoryNotesResult
Arbitrary Jump/Storage WriteN/APASS
Centralization of ControlN/APASS
Compiler IssuesN/APASS
Delegate Call to Untrusted ContractN/APASS
Dependence on Predictable VariablesN/APASS
Ether/Token TheftN/APASS
Flash LoansN/APASS
Front RunningN/APASS
Improper EventsN/APASS
Improper Authorization SchemeN/APASS
Integer Over/UnderflowN/APASS
Logical IssuesN/APASS
Oracle IssuesN/APASS
Outdated Compiler VersionN/APASS
Race ConditionsN/APASS
ReentrancyN/APASS
Signature IssuesN/APASS
Unbounded LoopsN/APASS
Unused CodeN/APASS
Overall Contract Safety PASS

AaveVaultFactory and VaultFactory Contracts

Smart Contract Audit - Inheritance

Smart Contract Audit - Graph


 ($) = payable function
 # = non-constant function
 
 Int = Internal
 Ext = External
 Pub = Public
 
 +  Context 
    - [Int] _msgSender
    - [Int] _msgData

 +  Ownable (Context)
    - [Int]  #
    - [Pub] owner
    - [Pub] renounceOwnership #
       - modifiers: onlyOwner
    - [Pub] transferOwnership #
       - modifiers: onlyOwner

 + [Lib] Math 
    - [Int] max
    - [Int] min
    - [Int] average

 + [Int] IERC20 
    - [Ext] totalSupply
    - [Ext] balanceOf
    - [Ext] transfer #
    - [Ext] allowance
    - [Ext] approve #
    - [Ext] transferFrom #

 + [Lib] SafeMath 
    - [Int] tryAdd
    - [Int] trySub
    - [Int] tryMul
    - [Int] tryDiv
    - [Int] tryMod
    - [Int] add
    - [Int] sub
    - [Int] mul
    - [Int] div
    - [Int] mod
    - [Int] sub
    - [Int] div
    - [Int] mod

 +  ERC20 (Context, IERC20)
    - [Pub]  #
    - [Pub] name
    - [Pub] symbol
    - [Pub] decimals
    - [Pub] totalSupply
    - [Pub] balanceOf
    - [Pub] transfer #
    - [Pub] allowance
    - [Pub] approve #
    - [Pub] transferFrom #
    - [Pub] increaseAllowance #
    - [Pub] decreaseAllowance #
    - [Int] _transfer #
    - [Int] _mint #
    - [Int] _burn #
    - [Int] _approve #
    - [Int] _setupDecimals #
    - [Int] _beforeTokenTransfer #

 + [Lib] Address 
    - [Int] isContract
    - [Int] sendValue #
    - [Int] functionCall #
    - [Int] functionCall #
    - [Int] functionCallWithValue #
    - [Int] functionCallWithValue #
    - [Int] functionStaticCall
    - [Int] functionStaticCall
    - [Int] functionDelegateCall #
    - [Int] functionDelegateCall #
    - [Prv] _verifyCallResult

 + [Lib] SafeERC20 
    - [Int] safeTransfer #
    - [Int] safeTransferFrom #
    - [Int] safeApprove #
    - [Int] safeIncreaseAllowance #
    - [Int] safeDecreaseAllowance #
    - [Prv] _callOptionalReturn #

 +  ReentrancyGuard 
    - [Int]  #

 + [Int] IStrategy 
    - [Ext] getFeeDistToken
    - [Ext] getHarvestedToken
    - [Ext] lastHarvestTime
    - [Ext] rewards
    - [Ext] want
    - [Ext] deposit #
    - [Ext] withdrawForSwap #
    - [Ext] withdraw #
    - [Ext] balanceOf
    - [Ext] getHarvestable
    - [Ext] harvest #
    - [Ext] setJar #

 + [Int] IJar 
    - [Ext] token
    - [Ext] getRatio
    - [Ext] balance
    - [Ext] balanceOf
    - [Ext] depositAll #
    - [Ext] deposit #
    - [Ext] withdrawAll #
    - [Ext] strategy

 + [Int] IUniswapV2Pair 
    - [Ext] name
    - [Ext] symbol
    - [Ext] decimals
    - [Ext] totalSupply
    - [Ext] balanceOf
    - [Ext] allowance
    - [Ext] approve #
    - [Ext] transfer #
    - [Ext] transferFrom #
    - [Ext] DOMAIN_SEPARATOR
    - [Ext] PERMIT_TYPEHASH
    - [Ext] nonces
    - [Ext] permit #
    - [Ext] MINIMUM_LIQUIDITY
    - [Ext] factory
    - [Ext] token0
    - [Ext] token1
    - [Ext] getReserves
    - [Ext] price0CumulativeLast
    - [Ext] price1CumulativeLast
    - [Ext] kLast
    - [Ext] mint #
    - [Ext] burn #
    - [Ext] swap #
    - [Ext] skim #
    - [Ext] sync #
    - [Ext] initialize #

 + [Int] IUniswapRouterV2 
    - [Ext] swapExactTokensForTokensSupportingFeeOnTransferTokens #
    - [Ext] swapExactTokensForTokens #
    - [Ext] addLiquidity #
    - [Ext] addLiquidityETH ($)
    - [Ext] removeLiquidity #
    - [Ext] getAmountOut
    - [Ext] getAmountIn
    - [Ext] getAmountsOut
    - [Ext] getAmountsIn
    - [Ext] swapETHForExactTokens ($)
    - [Ext] swapExactETHForTokens ($)
    - [Ext] factory

 +  BaseStrategy (IStrategy, Ownable, ReentrancyGuard)
    - [Pub]  #
    - [Pub] balanceOfWant
    - [Pub] balanceOfPool
    - [Pub] balanceOf
    - [Pub] getHarvestedToken
    - [Ext] setJar #
       - modifiers: onlyOwner
    - [Ext] setMultiHarvest #
       - modifiers: onlyOwner
    - [Pub] deposit #
    - [Ext] withdraw #
    - [Ext] withdrawForSwap #
    - [Int] _withdrawSome #
    - [Pub] harvest #
    - [Int] _swapUniswapWithPathPreapproved #
    - [Int] _swapUniswapWithPathPreapproved #
    - [Int] _swapUniswapWithPath #
    - [Int] _swapUniswapWithPath #
    - [Int] _swapUniswapWithPathForFeeOnTransferTokens #
    - [Int] _swapUniswapWithPathForFeeOnTransferTokens #
    - [Int] _distributePerformanceFeesAndDeposit #

 + [Int] IERCFund 
    - [Ext] feeShareEnabled
    - [Ext] depositToFeeDistributor #
    - [Ext] notifyFeeDistribution #
    - [Ext] getFee
    - [Ext] recover #

 + [Int] IVault (IJar)
    - [Ext] getBoost
    - [Ext] getPendingReward
    - [Ext] getLastDepositTime
    - [Ext] getTokensStaked
    - [Ext] totalShares
    - [Ext] getRewardMultiplier
    - [Ext] rewardAllocation
    - [Ext] totalPendingReward
    - [Ext] withdrawPenaltyTime
    - [Ext] withdrawPenalty
    - [Ext] increaseRewardAllocation #
    - [Ext] setWithdrawPenaltyTime #
    - [Ext] setWithdrawPenalty #
    - [Ext] setRewardMultiplier #

 + [Int] IGenericVault (IVault)
    - [Ext] notifyReward #

 + [Int] IVaultFactory 
    - [Ext] getPerformanceFee
    - [Ext] getMinHealthFactor
    - [Ext] unsafeValueOfAsset
    - [Ext] getErcFund
    - [Ext] getVault
    - [Ext] isVault
    - [Ext] isGuardian
    - [Ext] initializeVault #

 + [Int] IPriceCalculator 
    - [Ext] unsafeValueOfAsset

 +  VaultFactory (Ownable, IVaultFactory)
    - [Pub]  #
    - [Ext] getPerformanceFee
    - [Ext] getMinHealthFactor
    - [Ext] unsafeValueOfAsset
    - [Ext] getErcFund
    - [Ext] isGuardian
    - [Ext] getVault
    - [Ext] isVault
    - [Ext] initializeVault #
    - [Int] createVault #
    - [Ext] setPerformanceFee #
       - modifiers: onlyOwner
    - [Ext] setMinHealthFactor #
       - modifiers: onlyOwner
    - [Ext] setErcFund #
       - modifiers: onlyOwner
    - [Ext] setGuardian #
       - modifiers: onlyOwner
    - [Ext] setPriceCalculator #
       - modifiers: onlyOwner

 + [Int] ILendingPool 
    - [Ext] deposit #
    - [Ext] borrow #
    - [Ext] repay #
    - [Ext] withdraw #
    - [Ext] getUserAccountData

 + [Int] IDataProvider 
    - [Ext] getUserReserveData

 + [Int] IAaveIncentivesController 
    - [Ext] setClaimer #
    - [Ext] getClaimer
    - [Ext] configureAssets #
    - [Ext] handleAction #
    - [Ext] getRewardsBalance
    - [Ext] claimRewards #
    - [Ext] claimRewardsOnBehalf #
    - [Ext] getUserUnclaimedRewards
    - [Ext] REWARD_TOKEN

 + [Int] IWhitelistVault (IJar)
    - [Ext] totalShares
    - [Ext] withdraw #

 +  AaveVaultBase (ReentrancyGuard)
    - [Pub]  #
    - [Pub] getDebt
    - [Pub] getHealthFactor
    - [Pub] getBalance
    - [Pub] deposit #
       - modifiers: onlyVaultOwner,nonReentrant
    - [Pub] borrow #
       - modifiers: onlyVaultOwner,nonReentrant
    - [Int] _borrow #
    - [Pub] withdraw #
       - modifiers: onlyVaultOwner,nonReentrant
    - [Pub] exit #
       - modifiers: onlyVaultOwner,nonReentrant
    - [Pub] repayFromWallet #
       - modifiers: onlyVaultOwner,nonReentrant
    - [Int] addLiquidity #
    - [Int] removeLiquidity #
    - [Int] swapCollateralForBorrowed #
    - [Ext] grantPermission #
       - modifiers: onlyVaultOwner
    - [Pub] repay #
       - modifiers: onlyVaultOwnerOrGuardian,nonReentrant
    - [Pub] executeTransaction ($)
       - modifiers: onlyGuardian

 + [Int] ICurvePool 
    - [Ext] add_liquidity #
    - [Ext] remove_liquidity_one_coin #

 +  AM3CrvVault (AaveVaultBase)
    - [Pub]  #
       - modifiers: AaveVaultBase
    - [Int] addLiquidity #
    - [Int] removeLiquidity #
    - [Int] swapCollateralForBorrowed #

 +  AaveVaultFactory (Ownable, VaultFactory)
    - [Pub]  #
       - modifiers: VaultFactory
    - [Int] createVault #

AM3CrvVault and AaveVaultBase Contracts

Smart Contract Audit - Inheritance

Smart Contract Audit - Graph


 ($) = payable function
 # = non-constant function
 
 Int = Internal
 Ext = External
 Pub = Public
 
 +  Context 
    - [Int] _msgSender
    - [Int] _msgData

 + [Int] IERC20 
    - [Ext] totalSupply
    - [Ext] balanceOf
    - [Ext] transfer #
    - [Ext] allowance
    - [Ext] approve #
    - [Ext] transferFrom #

 + [Lib] SafeMath 
    - [Int] tryAdd
    - [Int] trySub
    - [Int] tryMul
    - [Int] tryDiv
    - [Int] tryMod
    - [Int] add
    - [Int] sub
    - [Int] mul
    - [Int] div
    - [Int] mod
    - [Int] sub
    - [Int] div
    - [Int] mod

 +  ERC20 (Context, IERC20)
    - [Pub]  #
    - [Pub] name
    - [Pub] symbol
    - [Pub] decimals
    - [Pub] totalSupply
    - [Pub] balanceOf
    - [Pub] transfer #
    - [Pub] allowance
    - [Pub] approve #
    - [Pub] transferFrom #
    - [Pub] increaseAllowance #
    - [Pub] decreaseAllowance #
    - [Int] _transfer #
    - [Int] _mint #
    - [Int] _burn #
    - [Int] _approve #
    - [Int] _setupDecimals #
    - [Int] _beforeTokenTransfer #

 + [Lib] Address 
    - [Int] isContract
    - [Int] sendValue #
    - [Int] functionCall #
    - [Int] functionCall #
    - [Int] functionCallWithValue #
    - [Int] functionCallWithValue #
    - [Int] functionStaticCall
    - [Int] functionStaticCall
    - [Int] functionDelegateCall #
    - [Int] functionDelegateCall #
    - [Prv] _verifyCallResult

 + [Lib] SafeERC20 
    - [Int] safeTransfer #
    - [Int] safeTransferFrom #
    - [Int] safeApprove #
    - [Int] safeIncreaseAllowance #
    - [Int] safeDecreaseAllowance #
    - [Prv] _callOptionalReturn #

 + [Lib] Math 
    - [Int] max
    - [Int] min
    - [Int] average

 +  ReentrancyGuard 
    - [Int]  #

 + [Int] ILendingPool 
    - [Ext] deposit #
    - [Ext] borrow #
    - [Ext] repay #
    - [Ext] withdraw #
    - [Ext] getUserAccountData

 + [Int] IDataProvider 
    - [Ext] getUserReserveData

 + [Int] IAaveIncentivesController 
    - [Ext] setClaimer #
    - [Ext] getClaimer
    - [Ext] configureAssets #
    - [Ext] handleAction #
    - [Ext] getRewardsBalance
    - [Ext] claimRewards #
    - [Ext] claimRewardsOnBehalf #
    - [Ext] getUserUnclaimedRewards
    - [Ext] REWARD_TOKEN

 + [Int] IVaultFactory 
    - [Ext] getPerformanceFee
    - [Ext] getMinHealthFactor
    - [Ext] unsafeValueOfAsset
    - [Ext] getErcFund
    - [Ext] getVault
    - [Ext] isVault
    - [Ext] isGuardian
    - [Ext] initializeVault #

 + [Int] IJar 
    - [Ext] token
    - [Ext] getRatio
    - [Ext] balance
    - [Ext] balanceOf
    - [Ext] depositAll #
    - [Ext] deposit #
    - [Ext] withdrawAll #
    - [Ext] strategy

 + [Int] IWhitelistVault (IJar)
    - [Ext] totalShares
    - [Ext] withdraw #

 +  AaveVaultBase (ReentrancyGuard)
    - [Pub]  #
    - [Pub] getDebt
    - [Pub] getHealthFactor
    - [Pub] getBalance
    - [Pub] deposit #
       - modifiers: onlyVaultOwner,nonReentrant
    - [Pub] borrow #
       - modifiers: onlyVaultOwner,nonReentrant
    - [Int] _borrow #
    - [Pub] withdraw #
       - modifiers: onlyVaultOwner,nonReentrant
    - [Pub] exit #
       - modifiers: onlyVaultOwner,nonReentrant
    - [Pub] repayFromWallet #
       - modifiers: onlyVaultOwner,nonReentrant
    - [Int] addLiquidity #
    - [Int] removeLiquidity #
    - [Int] swapCollateralForBorrowed #
    - [Ext] grantPermission #
       - modifiers: onlyVaultOwner
    - [Pub] repay #
       - modifiers: onlyVaultOwnerOrGuardian,nonReentrant
    - [Pub] executeTransaction ($)
       - modifiers: onlyGuardian

 + [Int] IUniswapV2Pair 
    - [Ext] name
    - [Ext] symbol
    - [Ext] decimals
    - [Ext] totalSupply
    - [Ext] balanceOf
    - [Ext] allowance
    - [Ext] approve #
    - [Ext] transfer #
    - [Ext] transferFrom #
    - [Ext] DOMAIN_SEPARATOR
    - [Ext] PERMIT_TYPEHASH
    - [Ext] nonces
    - [Ext] permit #
    - [Ext] MINIMUM_LIQUIDITY
    - [Ext] factory
    - [Ext] token0
    - [Ext] token1
    - [Ext] getReserves
    - [Ext] price0CumulativeLast
    - [Ext] price1CumulativeLast
    - [Ext] kLast
    - [Ext] mint #
    - [Ext] burn #
    - [Ext] swap #
    - [Ext] skim #
    - [Ext] sync #
    - [Ext] initialize #

 + [Int] IUniswapRouterV2 
    - [Ext] swapExactTokensForTokensSupportingFeeOnTransferTokens #
    - [Ext] swapExactTokensForTokens #
    - [Ext] addLiquidity #
    - [Ext] addLiquidityETH ($)
    - [Ext] removeLiquidity #
    - [Ext] getAmountOut
    - [Ext] getAmountIn
    - [Ext] getAmountsOut
    - [Ext] getAmountsIn
    - [Ext] swapETHForExactTokens ($)
    - [Ext] swapExactETHForTokens ($)
    - [Ext] factory

 + [Int] ICurvePool 
    - [Ext] add_liquidity #
    - [Ext] remove_liquidity_one_coin #

 +  AM3CrvVault (AaveVaultBase)
    - [Pub]  #
       - modifiers: AaveVaultBase
    - [Int] addLiquidity #
    - [Int] removeLiquidity #
    - [Int] swapCollateralForBorrowed #

WhitelistVault Contract

Smart Contract Audit - Inheritance

Smart Contract Audit - Graph


 ($) = payable function
 # = non-constant function
 
 Int = Internal
 Ext = External
 Pub = Public
 
 +  Context 
    - [Int] _msgSender
    - [Int] _msgData

 + [Int] IERC20 
    - [Ext] totalSupply
    - [Ext] balanceOf
    - [Ext] transfer #
    - [Ext] allowance
    - [Ext] approve #
    - [Ext] transferFrom #

 + [Lib] SafeMath 
    - [Int] tryAdd
    - [Int] trySub
    - [Int] tryMul
    - [Int] tryDiv
    - [Int] tryMod
    - [Int] add
    - [Int] sub
    - [Int] mul
    - [Int] div
    - [Int] mod
    - [Int] sub
    - [Int] div
    - [Int] mod

 +  ERC20 (Context, IERC20)
    - [Pub]  #
    - [Pub] name
    - [Pub] symbol
    - [Pub] decimals
    - [Pub] totalSupply
    - [Pub] balanceOf
    - [Pub] transfer #
    - [Pub] allowance
    - [Pub] approve #
    - [Pub] transferFrom #
    - [Pub] increaseAllowance #
    - [Pub] decreaseAllowance #
    - [Int] _transfer #
    - [Int] _mint #
    - [Int] _burn #
    - [Int] _approve #
    - [Int] _setupDecimals #
    - [Int] _beforeTokenTransfer #

 + [Lib] Address 
    - [Int] isContract
    - [Int] sendValue #
    - [Int] functionCall #
    - [Int] functionCall #
    - [Int] functionCallWithValue #
    - [Int] functionCallWithValue #
    - [Int] functionStaticCall
    - [Int] functionStaticCall
    - [Int] functionDelegateCall #
    - [Int] functionDelegateCall #
    - [Prv] _verifyCallResult

 + [Lib] SafeERC20 
    - [Int] safeTransfer #
    - [Int] safeTransferFrom #
    - [Int] safeApprove #
    - [Int] safeIncreaseAllowance #
    - [Int] safeDecreaseAllowance #
    - [Prv] _callOptionalReturn #

 +  Ownable (Context)
    - [Int]  #
    - [Pub] owner
    - [Pub] renounceOwnership #
       - modifiers: onlyOwner
    - [Pub] transferOwnership #
       - modifiers: onlyOwner

 +  ReentrancyGuard 
    - [Int]  #

 + [Int] IStrategy 
    - [Ext] getFeeDistToken
    - [Ext] getHarvestedToken
    - [Ext] lastHarvestTime
    - [Ext] rewards
    - [Ext] want
    - [Ext] deposit #
    - [Ext] withdrawForSwap #
    - [Ext] withdraw #
    - [Ext] balanceOf
    - [Ext] getHarvestable
    - [Ext] harvest #
    - [Ext] setJar #

 + [Int] IJar 
    - [Ext] token
    - [Ext] getRatio
    - [Ext] balance
    - [Ext] balanceOf
    - [Ext] depositAll #
    - [Ext] deposit #
    - [Ext] withdrawAll #
    - [Ext] strategy

 + [Int] IWhitelistVault (IJar)
    - [Ext] totalShares
    - [Ext] withdraw #

 + [Int] IVaultFactory 
    - [Ext] getPerformanceFee
    - [Ext] getMinHealthFactor
    - [Ext] unsafeValueOfAsset
    - [Ext] getErcFund
    - [Ext] getVault
    - [Ext] isVault
    - [Ext] isGuardian
    - [Ext] initializeVault #

 +  WhitelistVault (IWhitelistVault, Ownable, ReentrancyGuard)
    - [Pub]  #
    - [Pub] getRatio
    - [Pub] balance
    - [Pub] balanceOf
    - [Ext] depositAll #
    - [Pub] deposit #
       - modifiers: nonReentrant
    - [Int] earn #
    - [Ext] withdrawAll #
    - [Pub] withdraw #
       - modifiers: nonReentrant
    - [Pub] setVaultFactory #
       - modifiers: onlyOwner


About Solidity Finance

Solidity Finance was founded in 2020 and quickly grew to have one of the most experienced and well-equipped smart contract auditing teams in the industry. Our team has conducted 1000+ solidity smart contract audits covering all major project types and protocols, securing a total of over $50 billion U.S. dollars in on-chain value across 1500 projects!.
Our firm is well-reputed in the community and is trusted as a top smart contract auditing company for the review of solidity code, no matter how complex. Our team of experienced solidity smart contract auditors performs audits for tokens, NFTs, crowdsales, marketplaces, gambling games, financial protocols, and more!

Contact us today to get a free quote for a smart contract audit of your project!

What is a Solidity Audit?

Typically, a smart contract audit is a comprehensive review process designed to discover logical errors, security vulnerabilities, and optimization opportunities within code. A Solidity Audit takes this a step further by verifying economic logic to ensure the stability of smart contracts and and highlighting privileged functionality to create a report that is easy to understand for developers and community members alike.

How Do I Interpret the Findings?

Each of our Findings will be labeled with a Severity level. We always recommend the team resolve High, Medium, and Low severity findings prior to deploying the code to the mainnet. Here is a breakdown on what each Severity level means for the project:

  • High severity indicates that the issue puts a large number of users' funds at risk and has a high probability of exploitation, or the smart contract contains serious logical issues which can prevent the code from operating as intended.
  • Medium severity issues are those which place at least some users' funds at risk and has a medium to high probability of exploitation.
  • Low severity issues have a relatively minor risk association; these issues have a low probability of occuring or may have a minimal impact.
  • Informational issues pose no immediate risk, but inform the project team of opportunities for gas optimizations and following smart contract security best practices.