Assessment reports>Beefy UniswapV3>Threat Model>_addLiquidity

Function: _addLiquidity()

Allows the addition of liquidity to the main and alternative positions.

Branches and code coverage

Intended branches

  • Check if the amounts are okay to add liquidity for the alternative position.

  • Calculate the amounts of liquidity to add, based on the token balances and the current price.

  • Check if the amounts are okay to add liquidity for the main position.

  • Flip minting to true and call the pool to mint the liquidity for the main position.

  • Flip minting to true and call the pool to mint the liquidity for the alternative position.

Negative behavior

  • Should not be callable in periods that are not calm. Not always the case.

Zellic © 2024Back to top ↑