Assessment reports>Chateau>Threat Model>stake

Function: stake(uint256 amount)

Users can pledge funds in a contract to be used as proof of subscription.

Inputs

  • amount

    • Control: Full control.

    • Constraints: Nonzero.

    • Impact: Number of tokens applied for. This amount is transferred from the caller to this pool, and an issue object is generated and assigned to the caller.

Branches and code coverage

Intended branches

  • User is able to stake successfully.

  • User is able to stake successfully multiple times.

Negative behavior

  • User is not able to stake zero tokens.

  • American user is not able to stake.

  • User is not able to stake with too little funds.

Zellic © 2024Back to top ↑