Skip to content

In-depth lesson · Business logic

Root causes

Every point the Business logic reports back under this heading, best-backed first, each with the reports it is seen in.

Back to the lesson 5,501 to 5,550 of 5,700
  1. The withdrawal function lacked the pause check that the borrow, repay and lend functions had.

    Seen in 1 report
  2. The withdrawal function only allows sending the NFT to the original recipient with no alternative address.

    Seen in 1 report
  3. The withdrawal function relies on a mutable escrow contract reference, so changing it orphans tokens held by the previous contract.

    Seen in 1 report
  4. The withdrawal function transferred the fees but did not reset the stored balance to zero.

    Seen in 1 report
  5. The withdrawal function used a counter decremented on withdrawal, blocking redemption of untracked deposits.

    Seen in 1 report
  6. The withdrawal function used the caller's address instead of a recipient parameter and required an incentive reporter role.

    Seen in 1 report
  7. The withdrawal functions assume each external call is atomic and never compare the amount actually received with the amount expected.

    Seen in 1 report
  8. The withdrawal guard only checks the health of the existing position and does not reserve the free cash needed for pending orders' fees.

    Seen in 1 report
  9. The withdrawal guard reverted whenever borrowing exceeded the maximum utilisation ratio, with no rebalancing path.

    Seen in 1 report
  10. The withdrawal limit check was skipped when the number of withdrawals left was one, allowing the full balance to be withdrawn at once.

    Seen in 1 report
  11. The withdrawal limit did not reserve assets needed to close long positions.

    Seen in 1 report
  12. The withdrawal limit returns zero when the collateral factor is zero instead of allowing proportional withdrawals.

    Seen in 1 report
  13. The withdrawal limit tracked only quote-token flows and ignored base-token deposits held in a hedging module, so the total value used for the cap could be inflated.

    Seen in 1 report
  14. The withdrawal logic burns shares from destination vaults in a fixed order starting with profitable ones rather than proportionally.

    Seen in 1 report
  15. The withdrawal logic requires the received amount to be at least the promised amount without accounting for transfer fees.

    Seen in 1 report
  16. The withdrawal logic selected every farm with the matching LP denom without filtering by whether the farm was active.

    Seen in 1 report
  17. The withdrawal path makes the health check use bare collateral while liquidation uses weighted collateral, creating a discrepancy.

    Seen in 1 report
  18. The withdrawal path was reduced to a single update with a negative delta and no minimum-output parameters.

    Seen in 1 report
  19. The withdrawal proxy inherits public deposit and mint functions without restricting them to the intended vault path.

    Seen in 1 report
  20. The withdrawal request function checks the user's sToken balance but does not lock or commit those tokens, allowing the same tokens to be used for multiple withdrawal requests across different addresses.

    Seen in 1 report
  21. The withdrawal request function did not check whether the target-period bucket was already marked as claimed, unlike the rescue function.

    Seen in 1 report
  22. The withdrawal request function overwrites the previous request amount for the same cycle without tracking cumulative requests across cycles, allowing a user to request their full balance each cycle and withdraw earlier than intended.

    Seen in 1 report
  23. The withdrawal returned early when the vault cap was zero, so netting did not occur and contract tokens were sent out.

    Seen in 1 report
  24. The withdrawal set the user's reward debt to zero before using it in the difference calculation.

    Seen in 1 report
  25. The withdrawal transaction's merkle root includes each signer's locally stored vote bitmap, so inconsistent votes produce different sighashes.

    Seen in 1 report
  26. The withdrawal was bucketed by period number but its checkpoint was keyed on the raw block timestamp, and the inclusive boundary lookup returned the post-exit balance.

    Seen in 1 report
  27. The withdrawals view does not check the withdrawal-claimed flag when calculating the withdrawable amount.

    Seen in 1 report
  28. The withdrawCredit function does not check whether the pool is in a payout or cover-applied state.

    Seen in 1 report
  29. The withdrawInternal function calculates how many LP tokens to hold back for the user but omits the refund call that would transfer them to the user.

    Seen in 1 report
  30. The worker allows unbounded attacker-controlled channel cardinality in one unchunked insert, commits notification rows separately from delivery rows, and treats existing notifications as already delivered on retry.

    Seen in 1 report
  31. The wrap helper transferred wrapped tokens directly to the user instead of depositing them into YieldBox for the contract.

    Seen in 1 report
  32. The wrapper calls the teller directly, so the teller records the share lock against the wrapper rather than the real depositor.

    Seen in 1 report
  33. The wrapper contract omitted a checkpoint on token transfers.

    Seen in 1 report
  34. The wrapper contract uses lazy accounting and does not checkpoint balances when vault ownership changes.

    Seen in 1 report
  35. The wrapper transferred and approved the full input amount but never checked or refunded the balance left after a partial swap.

    Seen in 1 report
  36. The wrapping function uses the entire attached value without reserving any amount for the subsequent gas fee.

    Seen in 1 report
  37. The write request was built from the route's address parameter with no check it matched the signing wallet, and the dialog omitted the target address.

    Seen in 1 report
  38. The write-off function did not require the borrower's collateral balance to be zero.

    Seen in 1 report
  39. The y-intercept adjustment reads the contract's token balance after funds are distributed, so the balance is always zero and the decrease is overstated.

    Seen in 1 report
  40. The yield calculation assumed the exchange rate never decreases and did not clear the notional balance.

    Seen in 1 report
  41. The zero check tests total shares minted instead of the total reserve.

    Seen in 1 report
  42. The zero hash is accepted as a referral code although zero is also the default no-referrer value.

    Seen in 1 report
  43. The zero-check on the stake amount ran before the stake limit was applied, so a zero limit produced a zero amount that was not handled.

    Seen in 1 report
  44. The zero-depth safeguard is an exact-zero test while the close VPI curve has no minimum denominator and the charge has no cap relative to the closed notional.

    Seen in 1 report
  45. The zero-quote branch checks only the pre-burn quote and breaks out before refunding, so a head that is still zero after the Senior burn stays queued and blocks Junior funding.

    Seen in 1 report
  46. The zero-value check applied to the requested amount rather than the amount matched by ticket closing.

    Seen in 1 report
  47. The zone does not enforce allocation of consideration extensions, so unsigned tokens can be appended.

    Seen in 1 report
  48. There is no cross-validation between calendar override days and the maximum staleness setting, allowing the frozen period to exceed the staleness budget.

    Seen in 1 report
  49. There is no delay between epoch end and vote changes, and distribution can be front-run.

    Seen in 1 report
  50. There is no fallback to return tokens when the swap execution fails and the payload is cached for retry.

    Seen in 1 report