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 2,101 to 2,150 of 5,700
  1. The cancel function refunded collateral in the same transaction, so a paused token made the refund revert and blocked cancellation.

    Seen in 1 report
  2. The cancel function terminates a proposal without running its cleanup logic, leaving approvals active.

    Seen in 1 report
  3. The cancel gate only unlocks for a hand-picked list of states and was not extended to degraded-mode and oracle-frozen conditions.

    Seen in 1 report
  4. The cancel logic assumes the offer owner is a valid address, but legacy offers have the zero address as owner, so the transfer reverts.

    Seen in 1 report
  5. The cancel path lacks the refund logic that the bid-creation path has.

    Seen in 1 report
  6. The cancel path unconditionally sends a fee without checking whether the sale has started.

    Seen in 1 report
  7. The cancel-all-bids function omits the require check that prevents the highest bidder from cancelling.

    Seen in 1 report
  8. The cancel-change handler restored the previous address but also set its verification state to verified.

    Seen in 1 report
  9. The cancellation calculation returns the listing amount without subtracting the used tax, so the user repays tax already paid.

    Seen in 1 report
  10. The cancellation check only looks at epoch maturity and a few special states and does not consult the deferral conditions that block activation.

    Seen in 1 report
  11. The cancellation check used the staker's rewards start time, which was only set once, so recreating a minipool did not reset the timer.

    Seen in 1 report
  12. The cancellation check uses a strict greater-than comparison instead of greater-than-or-equal.

    Seen in 1 report
  13. The cancellation function did not check whether the feature was disabled, so it proceeded even when execution failed due to the feature being disabled.

    Seen in 1 report
  14. The cancellation function fails to update the index mapping for the last voucher after removing a voucher.

    Seen in 1 report
  15. The cancellation function only sets a cancelled flag and omits the refund, and finalisation uses the protocol fee instead of the landlord's cancellation percentage.

    Seen in 1 report
  16. The cancellation guard was changed to make Senior reservations firm but the published documents were not updated.

    Seen in 1 report
  17. The cancelled partial redemption path returns early after syncing collateral shares but before updating the CDP's stake.

    Seen in 1 report
  18. The canStartDraw function uses the draw's close time to measure auction expiry, whereas startDraw uses the last randomness request's closedAt time to account for retried requests.

    Seen in 1 report
  19. The cap check used the buyer's NFT balance instead of tracking participation independently of NFT ownership.

    Seen in 1 report
  20. The cap check uses the current balance instead of the balance after the new deposit is added.

    Seen in 1 report
  21. The cap is checked against total tokens rather than locked tokens.

    Seen in 1 report
  22. The cap on the pending bucket is measured against total distributable value that already includes principal assigned by the previous pass, and only the settled part is removed, so the remainder is settled again.

    Seen in 1 report
  23. The cap update relies on a manual off-chain check of the current maximum LP position instead of enforcing the relationship on-chain.

    Seen in 1 report
  24. The CAPTCHA answer was stored in a reversible hash the client could decode, and the server only compared against that hash.

    Seen in 1 report
  25. The CAPTCHA answer was validated but the challenge was never marked as consumed.

    Seen in 1 report
  26. The captcha check was applied only to the normal creation form, not the import code path.

    Seen in 1 report
  27. The CAPTCHA check was implemented only on the front-end registration page and not enforced on the backend API endpoints that create users.

    Seen in 1 report
  28. The CAPTCHA generator randomises the background but keeps the text colour fixed.

    Seen in 1 report
  29. The captcha identifier was not invalidated after use and was not bound to the session or IP.

    Seen in 1 report
  30. The CAPTCHA image uses simple undistorted text and the server does not rate-limit repeated login attempts.

    Seen in 1 report
  31. The captcha is enforced only on the client side and the server does not validate it when the parameter is absent.

    Seen in 1 report
  32. The CAPTCHA library produces simple text images that a machine-learning model can learn to recognise.

    Seen in 1 report
  33. The captcha result was tied to the session rather than each login attempt.

    Seen in 1 report
  34. The captcha system reused a small set of pre-generated images and appended random bytes after the JPEG end marker to make files unique.

    Seen in 1 report
  35. The CAPTCHA token was not invalidated after use and was not tied to each authentication request.

    Seen in 1 report
  36. The card addition and balance check endpoints had no rate limiting or anti-automation controls.

    Seen in 1 report
  37. The card was only validated when added and not re-validated before later instant purchases.

    Seen in 1 report
  38. The cart pricing or discount calculation is wrong when the same item is added multiple times.

    Seen in 1 report
  39. The cart quantity was stored in a signed integer without a range check, so an oversized value wrapped to a negative number.

    Seen in 1 report
  40. The cart stores the discounted price for items but calculates removals using the original price.

    Seen in 1 report
  41. The cart validates supermarket items against non-supermarket products incorrectly, allowing mixed orders.

    Seen in 1 report
  42. The cash balance was read from the contract's live token balance instead of an internal accounting variable.

    Seen in 1 report
  43. The catch block for execute duplicated the fallback transfer already performed in the catch block for addFunds.

    Seen in 1 report
  44. The challenge compared only payment references and did not check that both transactions spent funds.

    Seen in 1 report
  45. The challenge extension mechanism let a later challenge delay an earlier one, breaking first-come-first-served.

    Seen in 1 report
  46. The challenge function did not compare the transaction timestamp with the agent's registration timestamp, only checking that the transaction was within the 14-day verification window.

    Seen in 1 report
  47. The challenge was not bound to a single registration attempt or marked as used.

    Seen in 1 report
  48. The challenger reward was computed from the owner-supplied price with no cap, and challenges could start immediately.

    Seen in 1 report
  49. The change adapter function lacks access control and does not clear the proposed adapter state after execution.

    Seen in 1 report
  50. The change fee quote calculates the protocol fee from the pool fee amount instead of the input amount.

    Seen in 1 report