Assessment reports>Staking>Threat Model>withdraw

Function: withdraw()

Ends the vesting early and withdraws.

Branches and code coverage (including function calls)

Intended branches

  • Returns the user their deposit.

Negative behaviour

  • Does not return the user any bonuses.

Function call analysis

  • withdraw() -> _withdraw(...) -> pairToken.safeTransfer(_account, pairAmount)

    • What is controllable? Nothing.

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

    • If return value is controllable, how is it used and how can it go wrong: Discarded.

  • withdraw() -> _withdraw(...) -> esToken.safeTransfer(_account, balance)

    • What is controllable? Nothing.

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

    • If return value is controllable, how is it used and how can it go wrong: Discarded.

Zellic © 2024Back to top ↑