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 3,601 to 3,650 of 5,700
  1. The liquidation path does not apply the frozen close spread, and the withdrawal guard only checks price health, so a solvent winner can empty its carry sources and become liquidatable.

    Seen in 1 report
  2. The liquidation path pays a keeper bounty and waives charges without checking whether the caller is the position owner.

    Seen in 1 report
  3. The liquidation path previews seizable collateral before accruing accumulated earnings.

    Seen in 1 report
  4. The liquidation path repays at maturity with discounting disabled, skipping conversion of unassigned earnings into the accumulator.

    Seen in 1 report
  5. The liquidation path transfers the internal scaled collateral amount directly instead of converting it with the token scale, unlike deposit and withdraw.

    Seen in 1 report
  6. The liquidation path updated per-account balances but omitted decrementing the global deposit-cap counters.

    Seen in 1 report
  7. The liquidation payout was computed from the proportion of one debt token repaid instead of the proportion of total debt value repaid.

    Seen in 1 report
  8. The liquidation penalty was computed from the position's full value instead of the debt amount, so the fee shrank as collateral fell below debt.

    Seen in 1 report
  9. The liquidation permission function lacks a special case for deprecated markets, so it always requires the market to be listed and the borrower to have a shortfall.

    Seen in 1 report
  10. The liquidation process does not lock the counterparty's funds or prevent deallocation while a liquidation is in progress.

    Seen in 1 report
  11. The liquidation routine reduced the user's position but never decreased the bank's total lent counter.

    Seen in 1 report
  12. The liquidation share allocation calls the share calculation with the deposit rounding direction, subtracting one and failing the share price validation.

    Seen in 1 report
  13. The liquidation signature omits nonces for both parties so it does not become invalid when their states change.

    Seen in 1 report
  14. The liquidation surcharge was calculated on the uncapped collateral amount instead of the actual collateral to liquidate, leading to an underflow when the price dropped drastically.

    Seen in 1 report
  15. The liquidator chooses which collateral to seize and the post-liquidation health check does not prevent repeated liquidations below the intended threshold.

    Seen in 1 report
  16. The liquidator claim function did not call settleAuction, so the collateral token and its associations were not burned or removed.

    Seen in 1 report
  17. The liquidator was paid in underlying tokens without ensuring the contract held enough of them.

    Seen in 1 report
  18. The liquidator's share is set to zero when the account's loss exceeds the liquidation fee.

    Seen in 1 report
  19. The liquidity removal required remaining reserves above a dust threshold, blocking full collateral withdrawal during liquidation when only one borrower existed.

    Seen in 1 report
  20. The liquidity spread validation returns early when net liquidity is zero even if total liquidity is positive, skipping the premium update.

    Seen in 1 report
  21. The listing count is decremented before the checkpoint, so the utilisation rate is wrong.

    Seen in 1 report
  22. The listing does not store fee values at creation time, so purchase reads whatever fee the plan currently has.

    Seen in 1 report
  23. The listing update function allows changing the denomination while bids are active, and refunds use the current denomination rather than the bid's original one.

    Seen in 1 report
  24. The loan creation function set the rollable flag to true by default.

    Seen in 1 report
  25. The location edit endpoint lacks server-side authorisation on the location identifier.

    Seen in 1 report
  26. The lock amount was transferred in the calling function and again inside the NFT creation function.

    Seen in 1 report
  27. The lock condition checks whether the delegate has an active proposal or has voted, which a malicious delegate can keep true.

    Seen in 1 report
  28. The lock function does not check whether the caller is an externally owned account.

    Seen in 1 report
  29. The lock function only checkpoints voting power when a delegatee is set.

    Seen in 1 report
  30. The lockCapital function iterates over active protections without first calling the function that accrues premium and expires protections, and the inner functions also lack expiration checks.

    Seen in 1 report
  31. The locked-collateral variable is capped but the actual token transfer and shares-deposited variable are not.

    Seen in 1 report
  32. The locker calls safeTransferFrom internally rather than externally, so the sender stays the user instead of the locker and the authorisation check fails.

    Seen in 1 report
  33. The locking function did not restrict which contracts could lock tokens on behalf of users.

    Seen in 1 report
  34. The lockout counter is keyed to the client IP address rather than the targeted user account.

    Seen in 1 report
  35. The lockout was keyed only to the account identifier and could be triggered by unauthenticated requests, with no rate limiting or extra verification.

    Seen in 1 report
  36. The login endpoint relied solely on per-IP rate limiting with no account-based lockout or pre-authentication challenge.

    Seen in 1 report
  37. The login form did not validate the format of the email or password fields, allowing any string to be used as credentials.

    Seen in 1 report
  38. The lookbehind window for nominee checkpoints was shorter than the maximum lock period, discarding history too early.

    Seen in 1 report
  39. The loop bound used the owner count minus one, so the final owner index was never examined.

    Seen in 1 report
  40. The loop broke instead of continuing when the amount to withdraw from a provider was below the minimum pull.

    Seen in 1 report
  41. The loop checks the page counter after processing and increments it after the check, so it runs for extra pages beyond the configured maximum.

    Seen in 1 report
  42. The loop condition compared an absolute array index against a relative pending count.

    Seen in 1 report
  43. The loop condition exited before the insufficient-tranche handler ran for remaining tranches, skipping the manager notification.

    Seen in 1 report
  44. The loop reused the single message value for every iteration instead of tracking how much had already been sent.

    Seen in 1 report
  45. The loop used a strict greater-than comparison instead of continuing until the value was strictly below the threshold.

    Seen in 1 report
  46. The loss calculation assumed amounts were in the native token but was given stable-asset amounts, and the result was paid without conversion.

    Seen in 1 report
  47. The loss calculation ignored the slip adjustment applied to asymmetric deposits.

    Seen in 1 report
  48. The loss calculation relies on spot reserves that can be manipulated within one transaction.

    Seen in 1 report
  49. The loss calculation subtracts the repayment from total debt including accrued interest instead of from principal debt only.

    Seen in 1 report
  50. The loss check compared redeemed ETH against the original requested amount instead of the capped amount actually redeemed.

    Seen in 1 report