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 era transition checks only a fixed rate threshold without considering the remaining stake value.
Seen in 1 report
-
The error from the API call is only logged and not returned, so the caller proceeds as if the call succeeded.
Seen in 1 report
-
The error handlers for orders only allowed retries when prices were empty or invalid, but did not handle errors about incorrect oracle block numbers, so such errors led to cancellation instead of a retry.
Seen in 1 report
-
The error path in the call function consumed gas for the failed transaction without adding it to the block gas total.
Seen in 1 report
-
The error path only refunds ERC20 inbound transfers and omits refunds for cross-chain swaps.
Seen in 1 report
-
The error-handling path for a failed swap bypassed the slippage check and transferred the output amount directly.
Seen in 1 report
-
The error-recording function did not reset the assigned high-water mark, leaving the operator reward-eligible.
Seen in 1 report
-
The escrow contract does not lock or restrict token transfers once a sale is pending.
-
The escrow fee recipient is not validated as non-zero, so a fee transfer to the zero address reverts.
Seen in 1 report
-
The escrow transfer did not check whether an auction already existed for the token.
Seen in 1 report
-
The etag is treated as optional input and the freshness comparison is skipped when it is absent.
-
The ETH payment path never verified that the declared sender was the account that actually paid.
Seen in 1 report
-
The ETHOracle contract does not convert the 8-decimal Chainlink price to the 18-decimal precision it advertises.
Seen in 1 report
-
The event argument is taken from the function input instead of the computed credit.
Seen in 1 report
-
The event declaration and emission omitted the boolean value parameter.
-
The event emission used the input total amount instead of the accumulated amount actually transferred.
Seen in 1 report
-
The event field is filled from the liquidator's pre-liquidation balance instead of a value for the liquidated account.
Seen in 1 report
-
The event hardcodes the sender instead of the resolved admin address.
Seen in 1 report
-
The event helper always uses the caller as receiver even when shares are bridged to a different destination address.
-
The event parameter name diverged from the struct field name, and event parameter names are frozen into the ABI.
Seen in 1 report
-
The event parser matched only known topic strings and the caller treated an unknown topic as a reason to skip the entire block.
-
The event processing function passes an empty string instead of the event's message field.
-
The EVM runner truncated the user-controlled 256-bit message value to 128 bits before the native transfer without rejecting values that do not fit.
Seen in 1 report
-
The excess calculation ignored deposit tokens already claimed through the sale claim, which did not update the redeemed or deposited amounts.
Seen in 1 report
-
The excess calculation subtracted only the net deposit amount and not the accumulated flash loan fee.
-
The exchange contribution was applied even when the token supply became zero, so the deducted amount could not be redeemed.
Seen in 1 report
-
The exchange liquidation calls the pool's liquidate function to hedge even though the short position is reduced by the same amount.
Seen in 1 report
-
The exchange rate calculation divides by total underlying without handling the case where it is zero while total supply is non-zero.
Seen in 1 report
-
The exchange rate factor could be driven to zero by making total assets large relative to supply.
Seen in 1 report
-
Medium
-
-
The exchange rate formula subtracts withdrawn reserves from the numerator, so withdrawing reserves increases the rate.
Seen in 1 report
-
The exchange rate used for deposits and withdrawals was stale between rebalances.
-
The exchange rate used to mint V2 tokens is derived from the pool's total cash and borrows, which can be manipulated by large borrows or repayments.
-
The exchange rate view function returns a stored rate without accruing interest when the interest rate model has changed.
Seen in 1 report
-
The execTransaction function lacks a check to prevent using the reserved batchId 0, allowing the nonce for that lane to be incremented outside the EntryPoint flow.
Seen in 1 report
-
The execute function checks liquidatability without first accruing interest on every debt token of the position, so stale debt values are used.
Seen in 1 report
-
The execute function does not delete the queued transaction from storage after a successful execution, allowing repeated execution.
Seen in 1 report
-
The execute function in the governance contract is not marked payable and does not forward ETH from the Timelock.
Seen in 1 report
-
The execute function reverts on failure instead of returning a success boolean.
-
The execute helper performs a plain call without forwarding value and the queue function is non-payable and stores no per-transaction value.
Seen in 1 report
-
The execution check used the newly set expiration period instead of the original one.
-
The execution config digest includes a treasury value resolved from block timestamp, so a scheduled succession changes the digest at an unmarked instant.
-
The execution configuration hash includes the treasury address and the router does not reject commitments whose execution window crosses a scheduled activation.
-
The execution fee was sized only for the main execution path, so when a failure triggered a second cancellation transaction, the remaining fee did not cover the keeper's gas cost.
-
The execution function accepts an arbitrary hop path from any caller without validating intermediate tokens.
-
The execution function does not refund remaining ETH after executing all calls.
Seen in 1 report
-
Medium
-
-
The execution path builds its snapshot from an already cap-clamped price and then applies the adverse shift, so a downward shift leaks below the policy price.
-
The execution path updates the trade price without re-checking stop-loss and take-profit levels against the new price.
Seen in 1 report
-
The execution step of the two-transaction liquidation reloads both reserves but never repeats the active and paused checks.
Seen in 1 report
-
The executor's execute function is not payable and the core does not forward the sent value to it.
Seen in 1 report
-
The exercise function prices the payment using spot reserves and passes a minimum LP amount of one, so no real slippage protection exists.