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.
-
Cached, eventually consistent subgraph data was used as authoritative calldata without comparing it to the live registry.
-
Caller-controlled swap parameters were passed to the router without validation against safe defaults or an oracle.
-
Child strategy contracts do not override the base contract's virtual reward-claiming function, so claim returns zero and rewards stay stuck.
-
Claim bits were only marked after processing all claims in the loop, so duplicates within one transaction were not detected.
Seen in 2 reports
-
Claimable amounts are computed from current factory parameters without tracking historical payouts.
Seen in 2 reports
-
Clearing records sets stake to zero, and the reward update returns early when stake is zero, marking rewards paid without crediting them.
-
Commission queries and claims only considered currently active reward tokens and did not handle historical tokens.
-
Control characters were not stripped from usernames, so names differing only by a trailing newline were treated as distinct.
Seen in 2 reports
-
Display and pricing use full normalisation while the signed label only goes through trim and lowercasing.
Seen in 2 reports
-
Critical -
Critical
-
-
Distribution runs before the minter period update, and the claimable amount is read before being updated with the latest emissions.
Seen in 2 reports
-
Distribution sends yield to all holders without checking whether a holder contract can withdraw arbitrary ERC-20 tokens.
-
Epoch settlement does not read the queue of committed orders, so matured requests are priced at a mark that ignores an already-fixed fill price.
-
Function selectors are hardcoded from the wrong signatures or an outdated deployment instead of being computed from the current ABI.
Seen in 2 reports
-
Generated bindings model unit or compact types as real reads, so field offsets diverge from the runtime.
Seen in 2 reports
-
High -
High
-
-
High-water mark reduction uses the fraction of principal paid out rather than shares burned, and virtual-offset rounding inflates the principal fraction.
Seen in 2 reports
-
Low -
Low
-
-
Holiday overrides are stored as whole UTC days instead of ending at the New York market reopen, so frozen pricing persists after live prices return.
Seen in 2 reports
-
Medium -
Medium
-
-
Junior NAV included the refundable variation margin of open positions without netting it out, so LP entry and exit prices were distorted.
Seen in 2 reports
-
The liquidation path assesses only unpaid carry and a negative-VPI clawback, never the frozen-close spread or execution fee.
Seen in 2 reports
-
Medium -
Medium
-
-
The liquidity amount is computed from one token balance only, ignoring the paired token balance.
-
The miner fee branch credits the balance but omits the record_transfer call that inserts a leaf.
-
Null bytes in user input were not rejected or sanitised, causing timeline entries to be truncated or mishandled and unexpected behaviour in report creation and closure.
-
Off-by-one bounds checks rejected the first and last valid indexes.
-
One setter and the initialiser skip the ordering check that the other setters enforce.
-
Owner-controlled bounds such as equity floor, settlement balance and leverage are evaluated against live account state at execution rather than a snapshot taken at commit.
-
Price is pinned at commit time but financial bounds are evaluated at execution against inputs the trader can still change.
Seen in 2 reports
-
Low -
Low
-
-
Redeem checks only that shares are non-zero and never that the computed assets are non-zero.
Seen in 2 reports
-
Released and total released amounts are tracked globally rather than per token and per payee.
Seen in 2 reports
-
Removal sets the pool emission index to a maximum value without first accruing emissions.
-
Remove strategy calls the vault directly without first submitting the operation to the timelock.
Seen in 2 reports
-
Removing an operator zeroes the array entry instead of removing it, and dependent functions assume the cache is in sync.
Seen in 2 reports
-
Renewal calldata is derived from the normalised form of the label instead of the label as registered, so the hashed key differs from the registration the row displays.
Seen in 2 reports
-
Critical -
Critical
-
-
requestRedeem authorises only the owner side and never constrains the controller argument, and the minimum-size check is skipped for a full-balance request.
Seen in 2 reports
-
Low -
Low
-
-
Return codes from Compound-style mint and redeem functions are ignored instead of being checked for zero.
-
The claim idempotency flag is reused as a sweep marker without restricting it to matured buckets.
-
Revenue is distributed before the pending recapitalisation bucket is applied, and recap surplus is never routed to Junior once the Senior gap closes.
-
Reward accounting does not handle zero total supply, locking rewards sent before the first depositor or during empty periods.
-
Reward checkpoints are created for inactive validators and reactivation clears the inactivity timestamp cap.
-
Reward state initialisation loops only over currently active tokens, leaving stale pointers for removed tokens.
Seen in 2 reports
-
Settlement parameters were read from mutable storage at callback time instead of being snapshotted when the drawing started.
-
Some lookups normalise the route name while others pass the raw string, so one page resolves two distinct on-chain names.
Seen in 2 reports
-
Critical -
Critical
-
-
Swap and liquidity functions did not accept a deadline, so transactions stayed valid indefinitely.
-
Swap passes a minimum output of zero instead of a real slippage limit.
-
The account deletion endpoint relied only on the existing session cookie and did not require a fresh password confirmation.
Seen in 2 reports
-
The accrue function added the claimable amount to the unclaimed balance without reducing or tracking the claimable amount, so repeated calls accrued it again.
Seen in 2 reports
-
The admission check bounds only net skew and current solvency, never gross notional or the headroom to the degraded-mode trigger, so a skew-neutral book can raise maximum liability.
Seen in 2 reports
-
The advertised maximum and the enforced limit round in opposite directions, so the quote can exceed the remaining capacity.
-
The app relied on the store to guarantee purchase integrity and never verified receipt signatures, leaving the verification method unused and the public key unconfigured.
-
The app-wide query client sets a one-hour stale time and the shared result helper discards per-query freshness, so ENS forward resolutions are cached as if static.
-
The application relies on client-side plan and feature flag data for authorisation without server-side validation.
-
The application trusted client-supplied payment status data instead of verifying the transaction server-side with the payment gateway.