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 4,101 to 4,150 of 5,700
  1. The pre-check required the total amount to cover exchange and pre-payment amounts plus the referrer fee, but the settlement logic only needed it to cover exchange and pre-payment amounts.

    Seen in 1 report
  2. The pre-order flow did not revoke the product licence after a failed charge, and developer sandboxes lacked authorisation checks.

    Seen in 1 report
  3. The pre-trade balance was only recorded for wrapped or native sold tokens, so for other tokens it stayed zero and the post-trade difference included the whole existing balance.

    Seen in 1 report
  4. The pre-transfer amount is used to increase the pool balance instead of measuring the actual balance change.

    Seen in 1 report
  5. The pre-wrap amount is passed to the router instead of the wrapped amount after applying the decimal offset.

    Seen in 1 report
  6. The precision returned by the pool's amplification parameter getter was ignored, so the parameter was used unscaled.

    Seen in 1 report
  7. The precompile reader decoded only the supply field of the portfolio margin state and discarded the borrow fields.

    Seen in 1 report
  8. The predicate address is hardcoded when approving tokens for bridging.

    Seen in 1 report
  9. The preferences save operation does not enforce the rule that password protection can only be disabled after transfer or a paid plan.

    Seen in 1 report
  10. The preflight passes only the side, not the projected size and margin, into the state-dependent checks.

    Seen in 1 report
  11. The premium is calculated from the spot fee growth inside the position at closing time instead of a capped or time-weighted value.

    Seen in 1 report
  12. The premium uses time remaining until the next funding payment instead of a fixed epoch duration.

    Seen in 1 report
  13. The prepared migration plan is not bound to a snapshot of the authority-bearing state and is not freshness-checked before submission.

    Seen in 1 report
  14. The prevention check looks at the current vote count rather than whether a shutdown has been initiated.

    Seen in 1 report
  15. The preview functions take no keeper address and always subtract the gross liquidation charge.

    Seen in 1 report
  16. The preview planner deducts the whole liquidation charge without knowing the caller, so it cannot account for the keeper share returning when the account is its own liquidator.

    Seen in 1 report
  17. The preview redeem function uses cached debt and idle values that may not reflect actual market conditions.

    Seen in 1 report
  18. The preview token has no expiry and is not invalidated on uninstall, and the name field accepts invisible characters.

    Seen in 1 report
  19. The previous recommendation request was not deleted after a response, so it could be reused repeatedly.

    Seen in 1 report
  20. The price blend always divided by the fixed precision constant instead of the configured weight, and the setter did not enforce the bound.

    Seen in 1 report
  21. The price calculation performs an unchecked subtraction of the total supply from TVL, causing an underflow revert when TVL is less than the supply.

    Seen in 1 report
  22. The price depends only on the current ratio of votes, which can be shifted before a large purchase.

    Seen in 1 report
  23. The price difference was normalised by the current price in one branch and by the verified price in the other instead of a single symmetric formula.

    Seen in 1 report
  24. The price factor was multiplied only with the first term of the numerator rather than the whole sum.

    Seen in 1 report
  25. The price formula only considers elapsed time and the last auction price, ignoring the current liquidatable balance, so it cannot react to sudden increases in available assets.

    Seen in 1 report
  26. The price formula reaches the reserve before the auction ends instead of decreasing linearly to the reserve at the end.

    Seen in 1 report
  27. The price function returned zero once the sale ended instead of blocking further minting.

    Seen in 1 report
  28. The price function uses strict inequalities while minting allows the end timestamp, so the boundary returns the wrong price.

    Seen in 1 report
  29. The price function uses total supply without subtracting the shares held by the contract for pending withdrawals.

    Seen in 1 report
  30. The price impact calculation returned early if either token lacked virtual inventory.

    Seen in 1 report
  31. The price is a client-side parameter not validated server-side.

    Seen in 1 report
  32. The price is stored as an integer count of the payment token's smallest units and must be greater than zero.

    Seen in 1 report
  33. The price lock expiry was calculated from the client device clock instead of a server-side timestamp.

    Seen in 1 report
  34. The price module skips reverting feeds instead of failing, so an attacker can selectively disable feeds.

    Seen in 1 report
  35. The price oracle and swap limits did not prevent manipulation when a token had no Chainlink feed, so repeated partial swaps could drain the pool.

    Seen in 1 report
  36. The price retrieval does not verify the timestamp or freshness of the stored synthetic price.

    Seen in 1 report
  37. The price signature timestamp must fall within the liquidation timeout, but there is no way to reset the liquidation status once the timeout passes.

    Seen in 1 report
  38. The price uses effective supply, which falls when shares are escrowed, and a donation inflates the numerator.

    Seen in 1 report
  39. The price was used in arithmetic without bounds checking, so extreme values overflowed.

    Seen in 1 report
  40. The pricing algorithm mishandles a zero reserve and swaps that empty a reserve are allowed.

    Seen in 1 report
  41. The pricing endpoint exposed a state-changing PATCH method without authorisation or server-side price validation.

    Seen in 1 report
  42. The pricing experiment variant was stored client-side and not validated server-side, allowing users to set their own price tier.

    Seen in 1 report
  43. The pricing function relies on the router's best-price selection and then requires a specific pool type, which can be manipulated.

    Seen in 1 report
  44. The principal is negated before the present value call, so the positive branch applies the supply rate.

    Seen in 1 report
  45. The private vault's deposit function is missing the whenNotPaused modifier that checks the router pause flag and the vault's shutdown flag.

    Seen in 1 report
  46. The private vault's fund function does not allow the depositor to set a slippage limit or price deviation check.

    Seen in 1 report
  47. The prize NFT is only transferred into the contract at draw time rather than at raffle creation, and the ownership check at initialisation can be satisfied by a temporary holder.

    Seen in 1 report
  48. The prize pool did not configure the token's yield mode to Claimable, so automatic yield increased the contract's balance and could be claimed by anyone via contributePrizeTokens.

    Seen in 1 report
  49. The prize pool queries the time-weighted balance without first checking the time range is safe.

    Seen in 1 report
  50. The processEvents function did not return errors and simply logged them, causing subsequent events to be skipped.

    Seen in 1 report