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 server trusts the client-supplied retailer list state instead of enforcing the limit and entitlement server-side.
-
The server trusts the email value passed in the URL on the second signup step instead of re-checking the restriction or binding it to the first step.
Seen in 1 report
-
The server trusts the quantity value sent by the browser without checking it is positive.
-
The server used a client-provided price parameter to calculate the total instead of looking up the price.
Seen in 1 report
-
The server used a request identifier header as a simple anti-automation check instead of a proper rate limit.
Seen in 1 report
-
The server used the product identifier from the request without checking it against what the user was shown or allowed to buy.
Seen in 1 report
-
The server uses the session cookie to choose the account to delete while only validating credentials from the request body, without binding the two.
Seen in 1 report
-
The server validated only the number of digits in the price field rather than the actual monetary value.
Seen in 1 report
-
The server validated the captcha answer without invalidating or expiring the captcha ID after first use.
Seen in 1 report
-
Medium
-
-
The server verified a CAPTCHA token when present but never required one, and never tracked tokens as single-use.
Seen in 1 report
-
The server-side mutation did not validate that exactly one player carries the captain flag, relying on the client.
Seen in 1 report
-
The service failed to validate the token's signing time and the signed transaction amount.
Seen in 1 report
-
The session deadline was derived from the current block number rather than the target block's estimated timestamp.
-
The session is not invalidated on logout and pages are cached so the browser can show them again.
Seen in 1 report
-
$150 Medium
-
-
The set reserve factor function did not update global interest before changing the factor, applying the new factor retroactively.
Seen in 1 report
-
The set token is not locked during rebalancing, allowing anyone to mint and redeem it and sandwich bids.
Seen in 1 report
-
The set-converter function does not set up token approvals, and the approval function can only be called during market creation.
Seen in 1 report
-
The set-principal function omits the extra allowance parameters that market creation uses.
Seen in 1 report
-
The set-principal function passes the zero address as the underlying token to the lender's approve function.
Seen in 1 report
-
The set_account_referral function wrote the referral record without asserting that the account and referrer addresses differ.
Seen in 1 report
-
The setDustThreshold function only enforced a minimum value and did not enforce a maximum, allowing management to set an arbitrarily high threshold that disabled auctions.
Seen in 1 report
-
The setEpochDuration function updates the epoch duration without first calling transitionEpoch, so the current epoch state is not finalised before the duration changes.
Seen in 1 report
-
The setLockDuration function updates the lock duration without calling forceHarvest first, so the new duration is applied retroactively to rewards accrued since the last harvest.
Seen in 1 report
-
The setPendingRedemptionBalance function lacks a check on the previous balance, allowing it to overwrite concurrent user updates.
Seen in 1 report
-
The setSampleMemory function fails to properly adjust the counter and activeSamples when increasing sample memory.
-
The setSellable function treats a maximum sell percentage of zero as uninitialised and overwrites it with a default.
Seen in 1 report
-
The setter assigns to a memory variable instead of a storage reference, so the change is lost.
Seen in 1 report
-
The setter changes the degradation rate without checkpointing locked profit and last report time first.
-
The setter checks a fixed scalar lower bound but not that the value stays at or below the global minimum.
-
The setter checks only that the new ratio is at least 100 percent and never checks that it is not higher than the current value.
-
The setter does not check that the new timekeeper reports the same epoch and does not reset per-epoch reward state.
-
The setter function for the emission rate lacks validation to ensure the value falls within a safe range.
Seen in 1 report
-
The setter only required the factor to be greater than zero, allowing a near-zero value.
Seen in 1 report
-
The setter parameter type is an 8-bit array while the storage variable is a 256-bit array.
Seen in 1 report
-
The setter updated the wrapper address but not the canonical-to-adopted mapping.
Seen in 1 report
-
The setter uses a hardcoded limit far below the intended fee, confusing percentages with absolute values.
Seen in 1 report
-
The setters for voting period and full weight duration lack a check that no proposal is active.
Seen in 1 report
-
The setTierWinner function only updates the winner address and does not reset the invoiceComplete and supportingDocumentsComplete mappings for that tier.
-
The settings endpoint saved the email address without requiring ownership verification.
Seen in 1 report
-
The settings update endpoint did not verify that the subscription plan allowed enabling the premium feature.
Seen in 1 report
-
The settle fee is applied twice, once through the token liability helpers and again inside the positive PnL handling.
Seen in 1 report
-
The settle function only rebalances tokens when debt is fully cleared, not when some collateral has been settled.
-
The settle function returned the paid amount before burning commission shares, understating the net paid used for the bonus.
Seen in 1 report
-
The settle function's timestamp check only verifies that the current time is after the epoch end, but does not ensure the auction has actually started.
Seen in 1 report
-
The settle_trade_v2 function validated only the top-level trade.size and omitted any check on the nested maker_order.size and taker_order.size fields.
Seen in 1 report
-
The settlement calculation had no lower bound on the new ratio.
Seen in 1 report
-
The settlement floor is only checked once a position is closed, so free settlement can be removed while a committed close is pending.
Seen in 1 report
-
The settlement function transfers out excess cash and then checks the collateral ratio, which can fail and revert, while liquidation requires the account to be settled first.
Seen in 1 report
-
The settlement mint does not enforce that raw supply plus the marginal mint plus pending fee shares leaves room for the virtual shares used in every later pricing read.
Seen in 1 report
-
The settlement sidecar infers the collected spread only from the assessed-charge field, which is zero whenever the planner nets the spread into a rebate.