Assessment reports>Metavest>Threat Model>createAllocation

Function: createAllocation(AllocationType _allocationType, address _grantee, address _controller, TokenOptionAllocation.Allocation _allocation, TokenOptionAllocation.Milestone[] _milestones, address _paymentToken, uint256 _exercisePrice, uint256 _shortStopDuration)

This function is used to create a new TokenOptionAllocation contract.

Inputs

  • _allocationType

    • Control: Arbitrary.

    • Constraints: AllocationType.TokenOption only.

    • Impact: Type of allocation.

  • _grantee

    • Control: Arbitrary.

    • Constraints: None.

    • Impact: Address of the grantee.

  • _controller

    • Control: Arbitrary.

    • Constraints: None.

    • Impact: Address of the controller.

  • _allocation

    • Control: Arbitrary.

    • Constraints: None.

    • Impact: Struct of the allocation including Allocation fields: tokenStreamTotal, vestingCliffCredit, unlockingCliffCredit, vestingRate, vestingStartTime, unlockRate, unlockStartTime, and tokenContract.

  • _milestones

    • Control: Arbitrary.

    • Constraints: None.

    • Impact: Array of Milestone. Struct of the milestone including milestoneAward, unlockOnCompletion, complete, and an array of conditionContracts addresses.

  • _paymentToken

    • Control: Arbitrary.

    • Constraints: None.

    • Impact: Address of payment token.

  • _exercisePrice

    • Control: Arbitrary.

    • Constraints: None.

    • Impact: Value of exercise price.

  • _shortStopDuration

    • Control: Arbitrary.

    • Constraints: None.

    • Impact: Value of short stop duration.

Branches and code coverage

Intended branches

  • Deploy a new TokenOptionAllocation contract using the provided parameters.

Negative behavior

  • Revert if the _allocationType is not AllocationType.TokenOption.

Zellic © 2024Back to top ↑