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 contract did not refund excess message value after paying the bridge cost.
Seen in 1 report
-
The contract did not reject transactions that sent native currency when the source token was an ERC20.
Seen in 1 report
-
The contract did not set an allowance for the marketplace before calling functions that use transferFrom.
Seen in 1 report
-
The contract did not store the request timestamp or a snapshot of the streak and day indices when the spin started, so reward logic used the later callback timestamp.
-
The contract did not track the amount of input consumed and never refunded the excess.
Seen in 1 report
-
The contract did not track which proposal was active, so any committed proposal could be settled.
-
The contract did not use a safe transfer wrapper and ignored the boolean return value of the transfer.
Seen in 1 report
-
The contract did not validate that every level of a hat identifier corresponded to a real hat.
Seen in 1 report
-
The contract did not validate that the revenue contract address was registered.
-
The contract did not validate that the token address in the Permit2 signature matched the vault's asset.
Seen in 1 report
-
The contract did not verify that a user's participation start time matched the programme start, so anyone could claim as if present from the beginning.
Seen in 1 report
-
The contract divides the token balance by the pool weight when computing TVL, though the balance from the pool already reflects the weight.
Seen in 1 report
-
The contract does not calculate the liquidity amount from the token amounts for the first deposit; it relies on the caller to provide a consistent set of values.
Seen in 1 report
-
The contract does not check that the destination chain and handler differ from the source chain and handler, allowing a self-transfer that mints new tokens.
-
The contract does not check that the token is whitelisted before using its index from the whitelist.
Seen in 1 report
-
The contract does not check that total funds stays at least used funds when used funds increases or total funds decreases.
-
The contract does not check the L2 sequencer uptime feed before using the oracle price.
Seen in 1 report
-
The contract does not check whether the copier is the original portfolio owner.
Seen in 1 report
-
The contract does not check whether the target address actually contains code before making a low-level call, relying only on the success flag which is true for non-existent accounts.
Seen in 1 report
-
The contract does not compare the signed price with the current on-chain mint price before accepting the signature.
Seen in 1 report
-
The contract does not implement the required receiver functions for ERC721 and ERC1155 tokens.
Seen in 1 report
-
The contract does not re-check position health after the swap, so a manipulated swap price can make the position undercollateralised.
-
The contract does not remove tokens with zero balance from its distribution list and does not skip zero-value transfers, so a token that reverts on zero transfers causes every payout to fail.
-
The contract does not revert on a late low bid and fails to credit the user's pending balance.
Seen in 1 report
-
The contract does not store the reward token list per token ID and re-fetches it from the external pool, so removed tokens are no longer tracked.
Seen in 1 report
-
The contract does not track how much native value has already been accounted for within a transaction.
Seen in 1 report
-
The contract does not track individual deposit amounts; it calculates available funds as the total balance minus locked funds, so refunds are not proportional to each depositor's contribution.
Seen in 1 report
-
The contract does not track which tokens have already had the protocol fee deducted, so leftover paired LP tokens are counted again and charged twice.
Seen in 1 report
-
The contract does not validate that the amount argument equals the native value sent.
Seen in 1 report
-
The contract does not validate that the number of NFTs transferred in a sell order is greater than zero.
Seen in 1 report
-
The contract enforced one vest per user by reverting, without checking who created it.
Seen in 1 report
-
Medium
-
-
The contract enforced strict sequential resolution of proposals without any timeout or override mechanism.
Seen in 1 report
-
The contract enforces a 50% limit per call but does not track cumulative withdrawals over time.
Seen in 1 report
-
The contract enforces a minimum token amount equal to the stream duration in seconds without adjusting for decimals or value.
Seen in 1 report
-
The contract enforces the liquidationInitialAsk limit on every lien in the stack even though only the first lien's value is used for auctions.
Seen in 1 report
-
The contract exposes only an add function for the whitelist and no remove or toggle.
Seen in 1 report
-
The contract fails to validate that the tier specified when depositing an NFT is within the bounds of existing tiers.
Seen in 1 report
-
The contract handling code mishandled nested reverts and delegatecall, allowing credit without a transfer.
Seen in 1 report
-
Critical
-
-
The contract hard-coded an additional 1% slippage tolerance instead of respecting the user's limit.
Seen in 1 report
-
The contract hardcodes a minimum output of zero for token swaps.
Seen in 1 report
-
The contract hardcodes an 18-decimal scaling factor in arithmetic operations.
Seen in 1 report
-
The contract hardcodes the slippage protection parameters to zero instead of letting the user specify them.
Seen in 1 report
-
The contract has a function to add supported tokens but none to remove them, so a depegged token stays accepted indefinitely.
-
The contract ignored the boolean success value returned by the external withdraw-and-unwrap call.
-
The contract ignores the boolean success value returned by ERC20 transfer and transferFrom calls.
Seen in 1 report
-
The contract implemented only an add function with no corresponding remove function.
Seen in 1 report
-
The contract implements a rescue function only for ERC20 tokens, not the native token.
Seen in 1 report
-
The contract infers the previous block's gas price from the current transaction's gas price.
-
The contract inherited pausable checks but the developer forgot to add public pause and unpause functions.
-
The contract inherited the pausable base but never exposed public pause and unpause functions.
Seen in 1 report