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 1,051 to 1,100 of 5,700
  1. Fee and base reward are minted as separate credits, so the fee is checked against the existential deposit before the reward creates the account.

    Seen in 1 report
  2. The fee is calculated on the full input amount rather than the actual amount swapped.

    Seen in 1 report
  3. Fee calculation only considers allocated and minted shares, not shares burned immediately on a redeem request.

    Seen in 1 report
  4. Fee calculation relies solely on utilisation percentage, which a large provider can manipulate with offsetting positions.

    Seen in 1 report
  5. Fee calculation subtracts previously accrued fees so pre-existing fees are not counted as protocol fees.

    Seen in 1 report
  6. Fee claiming is nested inside a time-gated condition that becomes unreachable once the stored timestamp passes the end time.

    Seen in 1 report
  7. The fee is computed from the debt repaid instead of the liquidation reward.

    Seen in 1 report
  8. The fee is converted using the pre-swap price snapshot and not recomputed after the swap moves the price.

    Seen in 1 report
  9. Fee distribution uses the current total borrowed amount without settling accrued fees first.

    Seen in 1 report
  10. The fee factor is updated without first accruing interest and updating the supply rate.

    Seen in 1 report
  11. Fee growth values were read from the position manager before triggering an update via collect, so stale values were stored.

    Seen in 1 report
  12. Fee hooks were only set when the launchpad itself created the pair, and the first pair stored could not be replaced.

    Seen in 1 report
  13. The fee setter has no upper bound, so values above one hundred per cent cause an underflow.

    Seen in 1 report
  14. Fee tracking was skipped when liquidity tokens were transferred to the pair itself, and the fee withdrawal function allowed anyone to withdraw on behalf of any address.

    Seen in 1 report
  15. The fee update resets the last action timestamp regardless of deposit size.

    Seen in 1 report
  16. Fee-on-transfer detection relied on an admin flag instead of measuring the actual balance change.

    Seen in 1 report
  17. Fees are calculated on total shares that already include previously minted fee shares.

    Seen in 1 report
  18. Fees go to whoever provides liquidity at the moment a position closes, regardless of how long they provided it.

    Seen in 1 report
  19. Finalisation sets the last bid to total contributions when the NFT was gifted, without checking whether any real bid was placed.

    Seen in 1 report
  20. Finishing distribution only updates the finish time and does not stop later harvest calls from resetting the reward rate and finish time.

    Seen in 1 report
  21. First-supply determination uses the scaled balance, which any third party can make nonzero by transferring a minimal amount.

    Seen in 1 report
  22. Fixed borrow shares are computed from the current floating debt, which grows over time, so claimable rewards shrink.

    Seen in 1 report
  23. Fixed borrow shares are recomputed from the current reward start time, discarding unsettled shares from the previous distribution.

    Seen in 1 report
  24. Fixed module-level transaction ids are shared by every registration, with history written by that id as a key instead of appended.

    Seen in 1 report
  25. Fixed six-decimal scaling and flooring of token values and the threshold made the live metric and threshold round to the same integer, hiding a real drawdown.

    Seen in 1 report
  26. Fixed-pool functions that change the backup borrowed value do not accrue the floating debt first, so past interest can be changed retroactively.

    Seen in 1 report
  27. Flash loan fees are added through the credit repayment path, which does not increase expected liquidity, instead of the profit minting path that would.

    Seen in 1 report
  28. Flashloan fees are credited only to the active bin's providers while the loan draws on liquidity from all bins.

    Seen in 1 report
  29. Follow checks that the handle exists but not that it maps to the profile id being followed.

    Seen in 1 report
  30. For a zero-weight market the collateral calculation used only current margin instead of deriving collateral from target leverage.

    Seen in 1 report
  31. Forecast elements were not deduplicated, letting an attacker inflate the weight of their elements.

    Seen in 1 report
  32. Form handling used different HTTP methods based on input length and did not reject unexpected GET submissions.

    Seen in 1 report
  33. Four asset-moving functions update local accounting but omit the interest update call that deposit and withdraw make.

    Seen in 1 report
  34. free is called before melt, so pending redistribution updates on zero-balance yangs are missed.

    Seen in 1 report
  35. Hardcoded function selectors do not match the real signatures.

    Seen in 1 report
  36. Functions assumed path and token arrays were consistent with the pair without checking lengths or contents.

    Seen in 1 report
  37. Functions calling the mark price do not validate that the returned value is non-zero.

    Seen in 1 report
  38. Functions moved the full requested sell amount into the contract but never returned the unswapped remainder to the receiver.

    Seen in 1 report
  39. Functions take a caller-supplied from address and the signed messages lack a nonce and verifying contract, enabling replay.

    Seen in 1 report
  40. Functions take a share amount while the token amount is recalculated at settlement after interest has accrued.

    Seen in 1 report
  41. Functions that needed to forward ETH for protocol fees were missing the payable modifier.

    Seen in 1 report
  42. The funding vote lacks the screening participation check that the reward claim enforces.

    Seen in 1 report
  43. Funds are only released when the entire batch sells, with no fallback withdrawal for partial sales.

    Seen in 1 report
  44. Fuzzy login matching associates accounts with similar emails and identical passwords.

    Seen in 1 report
  45. A generic parameter setter writes any value to storage without validating it against the allowed range.

    Seen in 1 report
  46. Global and local positions handle invalid oracle versions differently, causing profit and loss desync.

    Seen in 1 report
  47. Go pointer equality is used on big integer pointers instead of comparing values.

    Seen in 1 report
  48. Gossip and sync paths validate signature, hash and timestamp but never enforce monotonicity or parent continuity before overwriting the unsafe head.

    Seen in 1 report
  49. Governance allowed voting power to be borrowed temporarily without safeguards such as timelocks or quorum requirements.

    Seen in 1 report