Assessment reports>Metavest>Threat Model>updateExerciseOrRepurchasePrice

Function: updateExerciseOrRepurchasePrice(address _grant, uint256 _newPrice)

This function is used to update the exercise or repurchase price of the allocation.

Inputs

  • _grant

    • Control: Arbitrary.

    • Constraints: Should be a valid allocation address.

    • Impact: Address of the grant.

  • _newPrice

    • Control: Arbitrary.

    • Constraints: Must be greater than zero.

    • Impact: New price of the allocation.

Branches and code coverage

Intended branches

  • Delete the amendment from the functionToGranteeToAmendmentPending mapping.

  • Update the price of the allocation.

Negative behavior

  • Revert if the caller is not the authority.

  • Revert if the condition check fails.

  • Revert if the consent check fails.

  • Revert if the _newPrice is equal to zero.

  • Revert if the vesting type is metvestType.Vesting.

Function call analysis

  • grant.getVestingType()

    • What is controllable? _grant.

    • If the return value is controllable, how is it used and how can it go wrong? Return the type of the vesting. If the vesting type is metvestType.Vesting, the function will revert.

    • What happens if it reverts, reenters or does other unusual control flow? N/A.

  • grant.updatePrice(_newPrice)

    • What is controllable? _grant and _newPrice.

    • If the return value is controllable, how is it used and how can it go wrong? N/A.

    • What happens if it reverts, reenters or does other unusual control flow? N/A.

Zellic © 2024Back to top ↑