Assessment reports>Ostium>Threat Model>makeWithdrawRequest

Function: makeWithdrawRequest(uint256 shares, address owner)

Make a withdrawal request for the amount of shares.

Inputs

  • shares

    • Control: Arbitrary.

    • Constraints: Must be less than the balance of shares — less shares pending withdrawal.

    • Impact: Shares are queued to be withdrawn in a later epoch.

  • 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 queued.

Branches and code coverage

Intended branches

  • Withdrawal request succeeds for sender owner.

  • Withdrawal request succeeds for nonsender owner with allowance.

Negative behavior

  • Withdrawal request fails due to epoch already being opened.

  • Withdrawal request fails due to allowance violation.

  • Withdrawal request fails due to balance violation.

Function call analysis

  • `IOstiumOpenPnl(this.registry.getContractAddress("openPnl"))

    .nextEpochValuesRequestCount()`

    • What is controllable? None.

      • If the return value is controllable, how is it used and how can it go wrong? Controllable by making a PNL request beforehand; however, it can only cause a revert.

      • What happens if it reverts, reenters or does other unusual control flow? Does not revert or do unusual control flow.

Zellic © 2024Back to top ↑