Assessment reports>Metavest>Threat Model>createAllocation

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

This function is used to create a new allocation.

Inputs

  • _allocationType

    • Control: Arbitrary.

    • Constraints: AllocationType.RestrictedToken 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 RestrictedToken contract using the provided parameters.

Negative behavior

  • Revert if the _allocationType is not AllocationType.RestrictedToken.

Zellic © 2024Back to top ↑