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 751 to 800 of 5,700
  1. An off-by-one error fetched reserved tokens outstanding for tier i instead of i+1, so redemption weights were wrong.

    Seen in 1 report
  2. An off-by-one error in the check comparing the generation ID to the maximum uses a strict inequality instead of a non-strict one.

    Seen in 1 report
  3. An off-by-one makes the query start block equal the end block, returning zero while the last-earmark block is still updated.

    Seen in 1 report
  4. An off-by-one nonce check uses one less than the specification limit for create transactions.

    Seen in 1 report
  5. An off-by-one range pattern excludes the minimal opcode for a lock time of 16.

    Seen in 1 report
  6. An oracle version was requested only for non-empty orders, but settlement still used the version at the order timestamp even when invalid.

    Seen in 1 report
  7. An outdated OpenZeppelin version contained a known vulnerability in the quorum fraction contract.

    Seen in 1 report
  8. An unauthenticated faucet endpoint keys its anti-abuse controls on the caller-supplied address and waits on receipts with no timeout.

    Seen in 1 report
  9. An unchecked arithmetic block is used for a calculation involving totalAssets, which can be arbitrarily large when any ERC20 token is supported.

    Seen in 1 report
  10. An unconfirmed email was permanently disabled when the associated account was disabled, without verifying ownership.

    Seen in 1 report
  11. An unnecessary division by 1e18 is applied to a value already normalised to 18 decimals.

    Seen in 1 report
  12. An upgrade initialised the trusted root to the zero hash, and unset mapping entries also read as zero, so any unseen message hash was accepted.

    Seen in 1 report
  13. Annualised rate is multiplied by elapsed seconds without dividing by the number of seconds in a year.

    Seen in 1 report
  14. Any caller could add a contributor's pending voting power to a card owned by that contributor.

    Seen in 1 report
  15. Any host with a zero registry length was treated as an intranet host, which also matched public IP literals.

    Seen in 1 report
  16. Any positive difference between the contract's token balance and its recorded balance is treated as a fresh reward, and this is reachable from an unprivileged claim function.

    Seen in 1 report
  17. Any user can send a note from the trusted no-reply address and forwarded copies keep their original authentication.

    Seen in 1 report
  18. Applications record only amounts, not which token funded them, and rely on a mutable global address.

    Seen in 1 report
  19. Approval removal logic does not trigger on force-pushed commits to an existing merge request.

    Seen in 1 report
  20. Approvals are not invalidated when the source branch is updated by merging another branch into it.

    Seen in 1 report
  21. Arguments to the internal swap function were in the wrong order, so the ownership check compared against the wrong token.

    Seen in 1 report
  22. An assertion checks the incoming parameter instead of the stored state variable, so any non-zero update reverts.

    Seen in 1 report
  23. Asset accounting uses the pool's instantly redeemable credit instead of the actual LP token balance held.

    Seen in 1 report
  24. Assets are transferred to the treasury without first updating the interest rates.

    Seen in 1 report
  25. Assignment is used instead of addition-assignment when updating pending balances.

    Seen in 1 report
  26. Associated folder records were not deleted with the account and creation had no rate limit.

    Seen in 1 report
  27. Auction closure checks for an exact zero balance instead of a small threshold, so dust or donations keep the auction open.

    Seen in 1 report
  28. Auction end time is recalculated from the current global duration instead of being stored per auction.

    Seen in 1 report
  29. Auction functions process every order without first checking validity, so one bad order reverts the batch.

    Seen in 1 report
  30. Auction parameters were read live from a factory the owner could change at any time, with no timelock or active-auction guard.

    Seen in 1 report
  31. Authorisation checks edit rights but not whether the resource is soft-deleted.

    Seen in 1 report
  32. Auto-vote information is recorded only when finalise is called instead of at the actual end of the epoch.

    Seen in 1 report
  33. Autosuggestions were populated from search queries without validation or user consent.

    Seen in 1 report
  34. Available funds increased on direct payment without verifying corresponding minted assets.

    Seen in 1 report
  35. Available liquidity adds unsettled funding fees to the base amount without ensuring those fees are actually collected.

    Seen in 1 report
  36. The backend does not reject control characters in folder names and its path handling errors during permission revocation.

    Seen in 1 report
  37. The backend trusts a client-supplied centre parameter and does not enforce random assignment server-side.

    Seen in 1 report
  38. The backend trusts the client-side plan value and performs no own authorisation check before premium actions.

    Seen in 1 report
  39. Backward compatibility paths skipped the redeemed-status check that newer clients enforce.

    Seen in 1 report
  40. Bad debt is accrued into a bad debt mapping but total debt is not reduced by the same amount, causing double counting.

    Seen in 1 report
  41. Bad-debt cleanup is keyed off a strict greater-than comparison, so an exact-match seizure with remaining debt is never handled.

    Seen in 1 report
  42. A balance check counts rewards already owed to users as available funding.

    Seen in 1 report
  43. Balance-crediting logic relied on transfer listings without checking the unlock time of received outputs.

    Seen in 1 report
  44. Balances were cached in memory before updating, so a self-transfer used the added-to balance.

    Seen in 1 report
  45. Basis points are divided by 100 instead of 10,000.

    Seen in 1 report
  46. Bidding is allowed at the end timestamp while claiming can happen at the same timestamp, leaving a one-second window.

    Seen in 1 report
  47. Bidding is guarded by a not-paused modifier but the contract exposes no external pause or unpause functions.

    Seen in 1 report
  48. Block number is used as a proxy for elapsed time on chains where block production is irregular.

    Seen in 1 report
  49. Block time is stored as an immutable variable so it cannot adapt when the chain's block time changes.

    Seen in 1 report
  50. Boosted tokens added to the emission were not excluded from the supply deduction, so externally sent tokens were double-counted.

    Seen in 1 report