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.
-
The cancel function refunded collateral in the same transaction, so a paused token made the refund revert and blocked cancellation.
Seen in 1 report
-
The cancel function terminates a proposal without running its cleanup logic, leaving approvals active.
-
The cancel gate only unlocks for a hand-picked list of states and was not extended to degraded-mode and oracle-frozen conditions.
-
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
-
The cancel path lacks the refund logic that the bid-creation path has.
Seen in 1 report
-
The cancel path unconditionally sends a fee without checking whether the sale has started.
Seen in 1 report
-
Medium
-
-
The cancel-all-bids function omits the require check that prevents the highest bidder from cancelling.
Seen in 1 report
-
The cancel-change handler restored the previous address but also set its verification state to verified.
Seen in 1 report
-
The cancellation calculation returns the listing amount without subtracting the used tax, so the user repays tax already paid.
-
The cancellation check only looks at epoch maturity and a few special states and does not consult the deferral conditions that block activation.
-
The cancellation check used the staker's rewards start time, which was only set once, so recreating a minipool did not reset the timer.
-
The cancellation check uses a strict greater-than comparison instead of greater-than-or-equal.
Seen in 1 report
-
The cancellation function did not check whether the feature was disabled, so it proceeded even when execution failed due to the feature being disabled.
-
The cancellation function fails to update the index mapping for the last voucher after removing a voucher.
Seen in 1 report
-
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.
-
The cancellation guard was changed to make Senior reservations firm but the published documents were not updated.
-
The cancelled partial redemption path returns early after syncing collateral shares but before updating the CDP's stake.
Seen in 1 report
-
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.
-
The cap check used the buyer's NFT balance instead of tracking participation independently of NFT ownership.
-
The cap check uses the current balance instead of the balance after the new deposit is added.
Seen in 1 report
-
The cap is checked against total tokens rather than locked tokens.
Seen in 1 report
-
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.
-
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
-
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
-
The CAPTCHA answer was validated but the challenge was never marked as consumed.
Seen in 1 report
-
The captcha check was applied only to the normal creation form, not the import code path.
Seen in 1 report
-
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
-
The CAPTCHA generator randomises the background but keeps the text colour fixed.
Seen in 1 report
-
The captcha identifier was not invalidated after use and was not bound to the session or IP.
Seen in 1 report
-
The CAPTCHA image uses simple undistorted text and the server does not rate-limit repeated login attempts.
-
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
-
The CAPTCHA library produces simple text images that a machine-learning model can learn to recognise.
Seen in 1 report
-
The captcha result was tied to the session rather than each login attempt.
Seen in 1 report
-
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
-
The CAPTCHA token was not invalidated after use and was not tied to each authentication request.
Seen in 1 report
-
The card addition and balance check endpoints had no rate limiting or anti-automation controls.
Seen in 1 report
-
The card was only validated when added and not re-validated before later instant purchases.
Seen in 1 report
-
The cart pricing or discount calculation is wrong when the same item is added multiple times.
Seen in 1 report
-
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
-
The cart stores the discounted price for items but calculates removals using the original price.
Seen in 1 report
-
The cart validates supermarket items against non-supermarket products incorrectly, allowing mixed orders.
Seen in 1 report
-
The cash balance was read from the contract's live token balance instead of an internal accounting variable.
Seen in 1 report
-
The catch block for execute duplicated the fallback transfer already performed in the catch block for addFunds.
Seen in 1 report
-
The challenge compared only payment references and did not check that both transactions spent funds.
-
The challenge extension mechanism let a later challenge delay an earlier one, breaking first-come-first-served.
-
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
-
The challenge was not bound to a single registration attempt or marked as used.
Seen in 1 report
-
The challenger reward was computed from the owner-supplied price with no cap, and challenges could start immediately.
Seen in 1 report
-
The change adapter function lacks access control and does not clear the proposed adapter state after execution.
Seen in 1 report
-
The change fee quote calculates the protocol fee from the pool fee amount instead of the input amount.
Seen in 1 report