Assessment reports>Ostium>Threat Model>cancelWithdrawRequest

Function: cancelWithdrawRequest(uint256 shares, address owner, uint16 unlockEpoch)

Make a withdrawal request for the amount of shares during the specified epoch. Note that unlockEpoch can be an epoch that has already passed (missed withdrawal in the past), which may cause unexpected behavior if off-chain logic relies on the emitted event.

Inputs

  • shares

    • Control: Arbitrary.

    • Constraints: Must be less than shares queued for withdrawal at unlockEpoch.

    • Impact: Shares unqueued for withdrawal.

  • owner

    • Control: Arbitrary.

    • Constraints: Must either be the sender or have an allowance for the quantity of shares or more.

    • Impact: User whose shares are unqueued.

  • unlockEpoch

    • Control: Arbitrary.

    • Constraints: Withdraw request shares in that epoch must not be less than shares.

    • Impact: Location in time of the canceled withdrawal.

Branches and code coverage

Intended branches

  • Withdrawal cancel succeeds for sender owner.

  • Withdrawal cancel succeeds for nonsender owner with allowance.

Negative behavior

  • Cancellation fails due to being above withdrawal request amount.

  • Cancellation fails due to allowance.

Function call analysis

  • No external function calls found.

Zellic © 2024Back to top ↑