Assessment reports>Metavest>Threat Model>exerciseTokenOption

Function: exerciseTokenOption(uint256 _tokensToExercise)

This function is used to exercise the token option by grantee.

Inputs

  • _tokensToExercise

    • Control: Arbitrary.

    • Constraints: Nonzero and less than exercisable tokens.

    • Impact: Amount of tokens to exercise.

Branches and code coverage

Intended branches

  • Calculate the payment amount matching the tokens to exercise.

  • Transfer the payment amount from the grantee to authority.

  • Increase the exercised tokens.

Negative behavior

  • Revert if the caller is not the grantee.

  • Revert if the allocation is already terminated and has reached the short stop time.

  • Revert if the tokens to exercise is zero.

  • Revert if the tokens to exercise is more than the exercisable tokens.

  • Revert if grantee does not have enough balance to pay.

Zellic © 2024Back to top ↑