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.
-
An off-by-one in the auction period time comparison creates a one-second settlement window.
-
Off-chain capacity is computed from a manipulable balance snapshot while the on-chain check recomputes later.
-
One asset-removal function omits the bankruptcy check that the other removal functions perform.
-
One client adds a precompile collision check that the execution specs and other clients do not have.
-
One client does not reject an invalid nonce before applying state changes, producing a divergent state root.
-
One collateral-removal path lacks the revert-if-auction-clearable check that the other paths have.
-
One contract inherits the standard renounce-ownership function without overriding it, unlike the other governance contracts that were patched.
-
One health check used less-than-or-equal while the liquidation check used strict greater-than, so the boundary case disagreed.
Seen in 1 report
-
One liquidation path does not set the deposit's liquidated flag or related state that the other path sets.
Seen in 1 report
-
One mint path assumed IDs equal a counter while another path allowed arbitrary IDs.
Seen in 1 report
-
One native reserve variable covered both LP deposits and synth backing, so LP share maths included funds LPs never provided.
-
One path sums pooled tokens before pricing while another prices each NFT individually and truncates, giving different totals.
Seen in 1 report
-
Only an add-header message is exposed, enforcing latest-height-plus-one, with no reachable remove or set message.
Seen in 1 report
-
Only exact string duplicates were checked, with no normalisation or mixed-script blocking.
-
Only the borrowed token is approved for the Curve pool, omitting approval for the other supplied tokens.
Seen in 1 report
-
Only the earner could call stopEarning, so removal from the approved list did not stop accrual.
Seen in 1 report
-
Only the feed URL string was checked for duplicates, not the actual XML content.
Seen in 1 report
-
Only the message value was passed as the L1 call value, omitting the ETH withdrawn from the bridge minter.
-
Only the pre-liquidation state is validated and no post-liquidation safety improvement is enforced.
Seen in 1 report
-
Only the price per token is validated, not the total collateral value.
Seen in 1 report
-
Only the single transfer function is overridden; the batch transfer path lacks the transferability check.
Seen in 1 report
-
Only the value one is treated as positive and all other values as negative, so the different-side check can be passed by two shorts.
Seen in 1 report
-
Open interest is calculated from margin before fees rather than the actual position size after fees.
Seen in 1 report
-
The open/increase branch of the bounty reservation leaves carry and settlement fields of the commitment effects at zero.
-
Operator precedence applies the division to the entire sum instead of only the new fee amount.
Seen in 1 report
-
The oracle hard-codes a 1:1 redemption assumption for expired principal tokens without checking the actual redemption path or slippage.
Seen in 1 report
-
Oracle storage was not cleared when an asset was removed, so stale entries contaminated the moving average after re-adding.
Seen in 1 report
-
Oracles were keyed by foreign asset alone rather than by the asset pair, so a second registration replaced the first.
Seen in 1 report
-
Order direction was fixed at creation from the current rate and not updated when the price crossed the take-profit before execution.
-
Order execution writes the new price only into the engine mark and not into the oracle's accepted basket, leaving the two stores out of sync.
-
Order IDs were built only from block number and user address, so different contracts could produce the same ID.
-
Order matching functions lack a check that buyer and seller addresses differ.
-
Order matching relies on validators acting fairly, without checks or incentives preventing them from manipulating matches for profit.
Seen in 1 report
-
Order of operations was wrong: asset removal preceded the earnings update.
Seen in 1 report
-
A LIMIT/OFFSET query is ordered only by a non-unique column so tied rows are not partitioned deterministically across pages.
-
Orders were keyed only by chain id and token pair, so different users' orders collided in one storage slot.
Seen in 1 report
-
OTP verification was performed only on the client side with no server-side validation.
-
Outcome names are concatenated with quotes but embedded quotes and commas are never escaped, so the resulting string is ambiguous.
Seen in 1 report
-
Override validation read the original campaign entry instead of the latest stored override.
-
Owner checks and display use the raw route string while token-ID selection uses the normalised label, with no preflight match.
Seen in 1 report
-
Owner lookup on a burned profile reverts and fails the whole collect.
-
The owner query normalises the name but the records query uses the raw URL name.
-
Ownership is derived from the v1 registry controller instead of the registrant.
-
Ownership of a newly created object was assigned to whoever first requested the redirect URL containing its ID, without checking that requester was the user who started creation.
Seen in 1 report
-
Ownership of the claimed first-party sender address was not verified, and asynchronous dispatch fell back to first-party delivery without re-checking the sender.
-
Ownership transfer does not validate that the new owner is authorised to use the callback.
Seen in 1 report
-
Ownership was verified only by the email tag inside a user-supplied feed, with no duplicate-content comparison against existing podcasts.
Seen in 1 report
-
Pages were served from the browser's cache or history after logout, without the server or page preventing them from being shown again.
-
Paid-plan restrictions were enforced only in the browser response rather than on the server.
Seen in 1 report
-
Pair overrides are applied after converting ETH to WETH and sorting the pair, so overrides cannot distinguish them.
Seen in 1 report