Function: zapIn(address inputToken, SingleTokenSwap swapToToken0, SingleTokenSwap swapToToken1, KodiakVaultStakingParams stakingParams, VaultDepositParams vaultParams)
This zaps into the vault using a whitelisted token that swaps for token0 and token1.
Inputs
inputTokenControl: Fully controlled by the caller.
Constraints: N/A.
Impact: Whitelisted token that swaps for token0 and token1.
swapToToken0Control: Fully controlled by the caller.
Constraints: N/A.
Impact: Information of swapping inputToken to token0.
swapToToken1Control: Fully controlled by the caller.
Constraints: N/A.
Impact: Information of swapping inputToken to token1.
stakingParamsControl: Fully controlled by the caller.
Constraints:
stakingParams.kodiakVaultmust be whitelist.Impact: Information of staking in the vault.
vaultParamsControl: Fully controlled by the caller.
Constraints: N/A.
Impact: Information of depositing into the vault.
Branches and code coverage
Intended branches
Check if
stakingParams.kodiakVaultis added in the whitelist.Receive amount that requires to swap inputToken.
Negative behavior
stakingParams.kodiakVaultis not in the whitelist.