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.
-
There is no function to disapprove a collateral, and deposit logic credits the full transfer amount without checking the balance received.
Seen in 1 report
-
There is no grace period after unpausing during which liquidations are blocked.
Seen in 1 report
-
There is no mechanism to cancel or close a proposal that never reaches quorum, so the sponsor's active-proposal flag stays set indefinitely.
Seen in 1 report
-
There is no minimum position size and the liquidation fee does not cover gas for very small positions.
-
There is no reservation or serialisation boundary between historical order execution and LP epoch ownership settlement, so terminal NAV sees zero open interest while an executable order exists.
Seen in 1 report
-
There is no validation that the user-supplied swap pool or adapter matches the underlying asset, and slippage limits are user-controlled.
Seen in 1 report
-
There was no cost for launching an averted challenge, and averted challenges called restrictMinting.
Seen in 1 report
-
There was no delay between crowdfund finalisation and fund distribution.
-
There was no guardian consent and no deposit or removal mechanism for the guardian-keyed bounded vector, and unfunded derivative origins could be created freely.
-
There was no limit on the length of the swapPath array, allowing a user to consume nearly all block gas and manipulate order execution timing.
-
There was no minimum order liveness period and the worst-priced order was evicted when the book was full.
-
There was no minting fee, so the gap between oracle and market price could be arbitraged.
-
There was no resend-verification mechanism and the username recovery email was never actually sent.
Seen in 1 report
-
There was no reserved-name or impersonation check on usernames and the profile was published before email verification.
Seen in 1 report
-
Throttling identified clients by a client-supplied forwarded-for header without validating it against a trusted proxy.
Seen in 1 report
-
Tickets from different agents were not aggregated and the per-call ticket limit allowed fragmentation.
-
Timestamp validation does not enforce that registration ends before allocation starts.
Seen in 1 report
-
Token amount deltas were applied to virtual swap inventory without an exchange rate conversion.
Seen in 1 report
-
Token amounts and currency amounts are compared directly without normalising for the different decimal places of the payment currency and the launch token.
-
Token approvals are only set when a deposit pool is first added and never updated when the pool address changes.
Seen in 1 report
-
Token balances are not tracked per withdrawal request, so overlapping batch id ranges allow cross-redemption.
Seen in 1 report
-
Token contract has no mechanism to adjust balances for splits and the admin cannot burn others' tokens.
-
Token removal updates the validator last-update timestamp past the slashing timestamp, skipping the reward period.
-
Token transfer return value is not checked before accounting is updated.
Seen in 1 report
-
Token validity is not tied to subscription or trial status, so token checks bypass account lifecycle enforcement.
Seen in 1 report
-
Tokenization did not update the overall score checkpoints, causing an underflow on redemption.
Seen in 1 report
-
Tokens are sent to an operator address that has no way to use pre-existing tokens.
Seen in 1 report
-
Tokens are transferred in before validating that distribution is possible, and there is no rescue mechanism.
Seen in 1 report
-
Tokens received through arbitrary calls were not tracked, so recovery treated them as excess.
Seen in 1 report
-
Tokens were only pulled from the user when the contract's own balance was insufficient.
Seen in 1 report
-
Total assets are based on the current token balance rather than accounting for outstanding loans when the last payment timestamp is zero.
Seen in 1 report
-
Total assets only previews unaccrued earnings within the current or previous interval while late repayment credits all past earnings.
-
Total borrowed USD is calculated from the principal loan amount instead of the total including interest.
Seen in 1 report
-
Total deposits are read from the contract's token balance, which direct transfers inflate.
Seen in 1 report
-
Total liquidity weight was incremented on pair addition while per-pair weights were only recorded at the next sync, creating a temporary mismatch.
-
Total shares are only reduced on release, so expired but unreleased bonds keep diluting distributions.
Seen in 1 report
-
Total staked value was updated before earnings per value were calculated.
Seen in 1 report
-
Total supply shares are reduced without burning shares from the treasury, breaking the shares invariant.
-
totalAssets did not subtract the operator fee, so the fee was counted as user-owned assets until withdrawn.
-
Deposit accounting is tied to depositor addresses even though the shares themselves are transferable.
-
Trade fees are only applied to collateral after the epoch price is committed, so intent orders can close and withdraw before pending fees are counted.
-
Trading revenue is only queued as pending when both stored tranche principals are zero, so revenue earned while senior is nonzero is consumed as ordinary surplus.
-
Transaction and address parsing ignored trailing bytes and used heuristics that could be tricked by specially crafted scripts.
Seen in 1 report
-
The transfer hook returns early for minting and burning so the blacklist check is skipped.
-
Transfer updates balances before the reward checkpoint, so the checkpoint uses the new balance.
Seen in 1 report
-
Transfer validation compares only the net liquidity slot and ignores the removed liquidity slot, allowing partial transfers.
-
The NFT transfer function lacked validation that the bid amount equalled the listed price and allowed the caller to choose any recipient.
Seen in 1 report
-
Transferable shares desynchronise from stake bookkeeping that is written only on deposit and withdraw.
Seen in 1 report
-
Critical
-
-
Treasury fees are stored as supply shares rather than assets, so they earn supply interest.
-
Trigger validation uses a spot price that can be manipulated within a single block.
Seen in 1 report