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 inherits a generic pausable module rather than the token-specific pausable extension.
Seen in 1 report
-
The contract inherits a pausable base but does not expose public wrappers for the internal pause and unpause methods.
Seen in 1 report
-
The contract inherits an ownable base without overriding renounceOwnership, and an upgradeable base lacks a storage gap.
Seen in 1 report
-
The contract lacked a function to calculate and withdraw profits.
Seen in 1 report
-
The contract lacked a receive function to accept refunds for passive orders whose user is the contract itself.
-
The contract lacks a payable receive or fallback function.
Seen in 1 report
-
The contract let an expired settlement remain usable for liquidation, so a borrower could liquidate a matured loan against a lender who still held the collateral for an unexecuted settlement.
Seen in 1 report
-
The contract matches user-supplied minimum amounts to a mutable list order without binding them to token addresses.
Seen in 1 report
-
The contract measures balance changes during the transaction and ignores any pre-existing ETH balance.
Seen in 1 report
-
The contract measures received amount via WETH balance when the output is ETH but never wraps native ETH.
Seen in 1 report
-
The contract measures time in block counts instead of block timestamps.
Seen in 1 report
-
The contract mints the NFT to itself and calls safeTransferFrom without approving itself.
Seen in 1 report
-
The contract only refunds the Aura token after burning the position, ignoring other reward tokens transferred to it.
Seen in 1 report
-
The contract passes the caller address to the router instead of the caller-supplied destination parameter.
Seen in 1 report
-
The contract queries ownerOf for every loan without handling a burned token, so one burned NFT blocks all paths.
Seen in 1 report
-
The contract reads raw total supply assets and shares from Morpho storage instead of the interest-adjusted expected assets when computing the maximum withdrawable amount.
Seen in 1 report
-
The contract reads the penalty fee from current settings at cancellation time instead of storing the fee that applied at listing.
Seen in 1 report
-
The contract records the full bid but only transfers the amount needed to cover existing liens.
-
The contract records the nominal collateral amount instead of the actual received balance.
Seen in 1 report
-
The contract refunds excess native currency minus one wei and has no function to withdraw the remainder.
Seen in 1 report
-
The contract relied on a single token address to identify and block a token, which is insufficient for tokens that have multiple addresses.
-
The contract relies on the square root price limit for slippage, but that parameter stops the swap early instead of reverting.
-
The contract required primary and secondary oracle prices to straddle the trigger and reverted otherwise.
Seen in 1 report
-
The contract required the cumulative claimed amount to be zero before allowing a claim, blocking claims across different epochs.
Seen in 1 report
-
The contract required the two oracle prices to straddle the trigger price, so when both were worse than the trigger, the order reverted instead of executing at the trigger price.
Seen in 1 report
-
The contract requires a non-zero pool address but provides no way to set it.
Seen in 1 report
-
The contract requires exact equality between the penalty-adjusted repayment and a debt that increases every second, with no tolerance or clamping for small overpayments.
-
The contract reset the last sender to the zero address before a possible refund, so the refund to the proxy reverted.
-
The contract reverts unconditionally when unclaimed periods exceed a cap instead of batching claims or offering a recovery path.
Seen in 1 report
-
The contract sets a flag on an out-of-bounds price but does not store the new price, so clearing the flag leaves the stale price.
Seen in 1 report
-
The contract sets a non-zero allowance without first resetting an existing non-zero allowance to zero.
Seen in 1 report
-
The contract sets an allowance to maximum without first resetting it to zero.
Seen in 1 report
-
The contract snapshots the total balance for payout calculation only once at closing and does not adjust it when deposits are later refunded, allowing a temporary deposit to inflate the prize pool.
-
The contract stores a fixed amount of a rebasing token instead of its shares, so the recorded amount does not adjust when the token's balance changes.
-
The contract stores the initial deposit amount and uses that fixed value for withdrawals, ignoring balance changes from rebasing.
Seen in 1 report
-
The contract tracked deposited assets per receiver only on deposit and never adjusted that record when shares were transferred, so the profit calculation assumed a zero cost basis for anyone who acquired shares by transfer.
-
The contract treats the total of held plus invested assets as spendable balance without first pulling funds back from the strategy.
Seen in 1 report
-
The contract tries to transfer a non-transferable stash token directly instead of converting it first.
Seen in 1 report
-
The contract trusted lender-supplied trade data and only checked that the bought amount was non-zero.
-
The contract trusted return data from an externally called contract instead of only checking call success.
-
The contract trusted the return value of an external claim call and added it to totalCollateral without verifying that the corresponding tokens were actually received.
Seen in 1 report
-
The contract updated its balance snapshot even when a withdrawal could be satisfied without liquidating the yield asset, double-counting the withdrawal and understating holdings.
Seen in 1 report
-
The contract used a greater-than-or-equal check on msg.value instead of requiring exact equality, and it never refunded the excess.
Seen in 1 report
-
The contract used a safe transfer that requires the ERC721 receiver callback without checking the asset actually supports ERC721.
-
The contract used a try/catch pattern where the catch block (cancellation) was paid and executed even if the try block failed due to out-of-gas, and the gas supplied was not checked to ensure enough for the try block to succeed.
Seen in 1 report
-
The contract used plain transfer and transferFrom interfaces instead of a safe wrapper tolerant of non-returning tokens.
-
The contract used safeTransferFrom to move tokens it already owned instead of transfer.
Seen in 1 report
-
The contract used the current price from a price feed oracle for delayed orders instead of the historical price from the archive oracle.
Seen in 1 report
-
The contract used the standard interface directly without checking return values or handling tokens with missing return values.
Seen in 1 report
-
The contract used the user-supplied deposit amount instead of measuring the actual balance change.
Seen in 1 report