Function: deposit(uint256 amount)

This function is used to deposit funds into the contract. The funds are then used to create a new pool after the deposit period ends.

Inputs

  • amount

    • Control: Arbitrary.

    • Constraints: Must be greater than zero, capped by the reserve cap.

    • Impact: The amount of funds to deposit.

Branches and code coverage

Intended branches

  • Invoke the _deposit function with the amount and onBehalfOf address.

  • Increase the reserve amount by the deposited amount.

  • Transfer the amount of tokens from the sender to the contract.

Negative behavior

  • Revert if the deposit period has not started.

  • Revert if the deposit period has ended.

  • Revert if the reserve cap has been reached.

  • Revert if the contract is paused.

  • Revert if this function is called in a reentrant manner.

Zellic © 2025Back to top ↑