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.
-
Compounding used the lesser of two token amounts, so one-sided fees sat idle until the range re-entered.
-
Conditional logic in the bond payment factor function fails to set the sign when neutral and auction prices are equal.
Seen in 1 report
-
Configuration setters had no check that a draw was in progress, so settlement read values that could change between ticket purchase and finalisation.
Seen in 1 report
-
Confirmation tokens were not invalidated after first use.
Seen in 1 report
-
Confirmation was restricted to the agent owner, so an unresponsive agent blocked redemptions.
Seen in 1 report
-
Connection matching compared credentials and host keys but never the requested authentication mechanism.
Seen in 1 report
-
Consensus rules compared unlock_time values above the threshold to the node's local clock rather than to block time.
-
Consensus uses strict equality instead of greater-than-or-equal, so a change in trusted node count can make the required submission count impossible.
Seen in 1 report
-
Consent was stored permanently without expiry or revocation.
Seen in 1 report
-
Content was deleted automatically after a report threshold without checking that reports came from distinct users or were genuine.
Seen in 1 report
-
Contracts did not check whether an order had already been cancelled before allowing it to be modified.
Seen in 1 report
-
Contribution amounts were deducted before the call and failed contributions were not added back before the refund.
-
Conversion treats rebasing tokens as if they were one-to-one with the underlying asset.
Seen in 1 report
-
Cookie replacement and secure-overlay checks used case-insensitive string helpers on the path field, contrary to the standard path matching.
-
A copy-paste error means the condition for defaulting decimal1 checks decimal0 instead.
Seen in 1 report
-
The source deposit time is copied without accounting for the destination bucket's bankruptcy time.
-
Coupon validation and duplicate detection used different Unicode normalisation contexts, so lookalike variants were distinct for deduplication but equivalent for validation.
Seen in 1 report
-
Coupon validation and hash expiration did not enforce single-use, and the hash remained valid after the coupon expired.
Seen in 1 report
-
Coupon validity was decided from client-side response data instead of being enforced on the backend.
-
Create uses a strict less-than check while exercise uses greater-than-or-equal, creating an inconsistency at expiry.
-
createProject lacks access control, so any address can claim a project ID first.
Seen in 1 report
-
createVault does not reject the protocol contract's own address as the token.
Seen in 1 report
-
createVault lacks a check that the token amount is greater than zero.
Seen in 1 report
-
Credentials are validated before the CAPTCHA is verified, and distinct error messages reveal whether a username exists.
Seen in 1 report
-
Credit was based on the amount specified by the user, not the actual balance increase.
Seen in 1 report
-
Critical token settings can be changed at any time with no restrictions.
Seen in 1 report
-
Cumulative shifts before the next price update were not tracked against the stake.
Seen in 1 report
-
Custom redemption does not check that collateral is sound or not above peg price.
Seen in 1 report
-
CVX is transferred from the user before checking whether the lock option is enabled, with no else branch to return it.
Seen in 1 report
-
Medium
-
-
Daily bonus eligibility was enforced only in client-side code with no server-side check that the bonus had already been claimed.
Seen in 1 report
-
Debt functions recompute locked collateral instead of reusing the value already written to storage by the earlier sync step.
Seen in 1 report
-
Debt position interest is compounded multiplicatively while pool interest is calculated linearly, so the two diverge.
-
Decode failure is treated as non-blocking and approval stays enabled with generic labels.
Seen in 1 report
-
The decompose function does not transfer residual token amounts to the user after collecting fees.
-
Decreasing collateral changes the ratio without refreshing the updatedAt timestamp, so the dispute buffer does not recognise the change.
Seen in 1 report
-
The taker fee is deducted immediately while the position reduction is applied only at next settlement, without enforcing the maintenance invariant.
Seen in 1 report
-
Default was declared on absence of confirmed payment without accounting for transactions already in the mempool.
-
Deferral and admission test for an exactly-zero junior principal rather than a dust threshold, and the deposit quote has no cap on shares minted.
-
Delegation updates total community voting power without checking whether either party already had positive voting power.
Seen in 1 report
-
Deleted accounts and their pending invitations were not invalidated, and membership and visibility fell out of sync.
Seen in 1 report
-
Deleting a struct that contains a nested mapping does not clear the mapping entries, so old per-index state survives.
Seen in 1 report
-
Deleting a tag via Git does not trigger the cleanup done by the UI, so the release still resolves the tag name and later picks up a branch of the same name.
-
Deleting the old withdraw request resets the storage pointer still in use, so the new request's fields are zeroed.
Seen in 1 report
-
Deletion logic only removed the account when associated products existed, leaving the profile otherwise.
-
Delisting removes the pool from the address provider before its accumulated fees are burned.
Seen in 1 report
-
Denial was only possible within a fixed window and no other function could remove or pause a minter.
Seen in 1 report
-
Deny set the cooldown to the expiry time and the noCooldown modifier blocked withdrawals until then.
Seen in 1 report
-
Deposit and redeem functions change the asset balance without calling the state update, so pending interest uses a stale utilisation ratio.
Seen in 1 report
-
Deposit and withdraw lacked slippage parameters, so users could not protect themselves against price moves between submission and execution.
Seen in 1 report
-
Deposit and withdrawal fees of the underlying vault were not accounted for in pool accounting.
Seen in 1 report