Assessment reports>Ethereum and Blast Exchanges>Threat Model>pooledDepositCommon

Function: pooledDepositCommon(Contribution[] contributions, address token)

This function emits the Deposit event for each contributor and the PooledDeposit event for this deposit. It returns the total amount that needs to be transferred.

Inputs

  • contributions

    • Control: Fully controlled by the caller.

    • Constraints: The array length must not be greater than MAX_CONTRIBUTIONS. Each contribution must not have an amount smaller than minDeposits[token].

    • Impact: The contributors and amounts of each deposit.

  • token

    • Control: Fully controlled by the caller.

    • Constraints: The token must be supported by this contract.

    • Impact: The token to deposit.

Branches and code coverage

Intended branches

  • Increase the nextStakeNum by one for each deposit.

  • Increase the nextPoolId by one for the pooled deposit.

Negative behavior

  • Revert when the token is not supported.

  • Revert when the length of the contributions array is greater than MAX_CONTRIBUTIONS.

  • Revert when a deposit amount is smaller than minDeposits[token].

Zellic © 2025Back to top ↑