Assessment reports>Alkimiya>Threat Model>startPool

Function: startPool(PoolParams poolParams)

This function is used to start a pool with the given parameters.

Inputs

  • poolParams

    • Control: Arbitrary.

    • Constraints: None.

    • Impact: Pool parameters.

Branches and code coverage

Intended branches

  • Updates sState.actualStartTimestamp with the current block timestamp.

  • Updates sState.indexShares with the current index shares.

  • Updates sState.indexInitialBalance with the current index balance.

  • Invokes _startBounty with poolParams and pays the bounty to the caller.

Negative behavior

  • Reverts if the current block timestamp is less than the target start timestamp.

  • Reverts if the pool has already started.

Function call analysis

  • index.shares()

    • What is controllable? Address of index and the return value of the shares function.

    • If the return value is controllable, how is it used and how can it go wrong? Arbitrary return value can be used to manipulate the state of the pool.

  • index.balance()

    • What is controllable? Address of index and the return value of the balance function.

    • If the return value is controllable, how is it used and how can it go wrong? Arbitrary return value can be used to manipulate the state of the pool.

  • SafeERC20.safeTransfer(IERC20(poolParams.payoutToken), msg.sender, startBountyAmount)

    • What is controllable? Address of poolParams.payoutToken.

Zellic © 2024Back to top ↑