Assessment reports>Yeet>Threat Model>compound

Function: compound(address[] swapInputTokens, IZapper.SingleTokenSwap[] swapToToken0, IZapper.SingleTokenSwap[] swapToToken1, IZapper.KodiakVaultStakingParams stakingParams, IZapper.VaultDepositParams vaultStakingParams)

This function compounds rewards by swapping harvested tokens and staking in the Kodiak Vault, depositing into Beradrome farm.

Inputs

  • swapInputTokens

    • Control: Fully controlled by the caller.

    • Constraints: Must be equal to the sum of the lengths of swapToToken0 and swapToToken1

    • Impact: Information of input-token addresses for swap.

  • swapToToken0

    • Control: Fully controlled by the caller.

    • Constraints: N/A.

    • Impact: Information of swapping swapInputTokens to token0.

  • swapToToken1

    • Control: Fully controlled by the caller.

    • Constraints: N/A.

    • Impact: Information of swapping swapInputTokens to token1.

  • stakingParams

    • Control: Fully controlled by the caller.

    • Constraints: The stakingParams.receiver must be the contract address.

    • Impact: Information of staking in Kodiak Vault.

  • vaultStakingParams

    • Control: Fully controlled by the caller.

    • Constraints: N/A.

    • Impact: Information of depositing into the vault.

Branches and code coverage

Intended branches

  • Check if stakingParams.receiver is the contract address.

  • Check if the length of swapInputTokens is equal to the sum of the lengths of swapToToken0 and swapToToken1.

  • Zaps in tokens.

  • Check if islandTokensMinted is greater than stakingParams.amountSharesMin.

  • Check if vaultSharesMinted is zero.

Negative behavior

  • The stakingParams.receiver is not the contract address.

  • The length of swapInputTokens is not equal to the sum of the lengths of swapToToken0 and swapToToken1.

  • islandTokensMinted is less than stakingParams.amountSharesMin.

  • vaultSharesMinted is not zero.

Zellic © 2025Back to top ↑