Assessment reports>SSI Protocol>Threat Model>createStakeToken

Function: createStakeToken(uint256 assetID, uint48 cooldown)

This function creates a new StakeToken contract.

Inputs

  • assetID

    • Control: Fully controlled by the caller.

    • Constraints: Must be an existing asset ID that does not have corresponding StakeToken.

    • Impact: Specifies the asset whose stake token would be created.

  • cooldown

    • Control: Fully controlled by the caller.

    • Constraints: None.

    • Impact: Specifies the cooldown of the stake token to be created.

Branches and code coverage

Intended branches

  • Fetch the address of the asset token from the asset ID.

  • Create a StakeToken contract.

  • Store the information about the created contract.

Negative behavior

  • The caller is the owner.

  • Given asset ID is valid.

  • Corresponding stake token does not exist.

Zellic © 2025Back to top ↑