Skip to content

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.

Back to the lesson 3,001 to 3,050 of 5,700
  1. The era transition checks only a fixed rate threshold without considering the remaining stake value.

    Seen in 1 report
  2. 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
  3. 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
  4. 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
  5. The error path only refunds ERC20 inbound transfers and omits refunds for cross-chain swaps.

    Seen in 1 report
  6. The error-handling path for a failed swap bypassed the slippage check and transferred the output amount directly.

    Seen in 1 report
  7. The error-recording function did not reset the assigned high-water mark, leaving the operator reward-eligible.

    Seen in 1 report
  8. The escrow contract does not lock or restrict token transfers once a sale is pending.

    Seen in 1 report
  9. The escrow fee recipient is not validated as non-zero, so a fee transfer to the zero address reverts.

    Seen in 1 report
  10. The escrow transfer did not check whether an auction already existed for the token.

    Seen in 1 report
  11. The etag is treated as optional input and the freshness comparison is skipped when it is absent.

    Seen in 1 report
  12. The ETH payment path never verified that the declared sender was the account that actually paid.

    Seen in 1 report
  13. The ETHOracle contract does not convert the 8-decimal Chainlink price to the 18-decimal precision it advertises.

    Seen in 1 report
  14. The event argument is taken from the function input instead of the computed credit.

    Seen in 1 report
  15. The event declaration and emission omitted the boolean value parameter.

    Seen in 1 report
  16. The event emission used the input total amount instead of the accumulated amount actually transferred.

    Seen in 1 report
  17. The event field is filled from the liquidator's pre-liquidation balance instead of a value for the liquidated account.

    Seen in 1 report
  18. The event hardcodes the sender instead of the resolved admin address.

    Seen in 1 report
  19. The event helper always uses the caller as receiver even when shares are bridged to a different destination address.

    Seen in 1 report
  20. The event parameter name diverged from the struct field name, and event parameter names are frozen into the ABI.

    Seen in 1 report
  21. The event parser matched only known topic strings and the caller treated an unknown topic as a reason to skip the entire block.

    Seen in 1 report
  22. The event processing function passes an empty string instead of the event's message field.

    Seen in 1 report
  23. 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
  24. 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
  25. The excess calculation subtracted only the net deposit amount and not the accumulated flash loan fee.

    Seen in 1 report
  26. The exchange contribution was applied even when the token supply became zero, so the deducted amount could not be redeemed.

    Seen in 1 report
  27. 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
  28. 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
  29. The exchange rate factor could be driven to zero by making total assets large relative to supply.

    Seen in 1 report
  30. The exchange rate formula subtracts withdrawn reserves from the numerator, so withdrawing reserves increases the rate.

    Seen in 1 report
  31. The exchange rate used for deposits and withdrawals was stale between rebalances.

    Seen in 1 report
  32. 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.

    Seen in 1 report
  33. The exchange rate view function returns a stored rate without accruing interest when the interest rate model has changed.

    Seen in 1 report
  34. 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
  35. 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
  36. The execute function does not delete the queued transaction from storage after a successful execution, allowing repeated execution.

    Seen in 1 report
  37. The execute function in the governance contract is not marked payable and does not forward ETH from the Timelock.

    Seen in 1 report
  38. The execute function reverts on failure instead of returning a success boolean.

    Seen in 1 report
  39. 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
  40. The execution check used the newly set expiration period instead of the original one.

    Seen in 1 report
  41. The execution config digest includes a treasury value resolved from block timestamp, so a scheduled succession changes the digest at an unmarked instant.

    Seen in 1 report
  42. The execution configuration hash includes the treasury address and the router does not reject commitments whose execution window crosses a scheduled activation.

    Seen in 1 report
  43. 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.

    Seen in 1 report
  44. The execution function accepts an arbitrary hop path from any caller without validating intermediate tokens.

    Seen in 1 report
  45. The execution function does not refund remaining ETH after executing all calls.

    Seen in 1 report
  46. 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.

    Seen in 1 report
  47. The execution path updates the trade price without re-checking stop-loss and take-profit levels against the new price.

    Seen in 1 report
  48. The execution step of the two-transaction liquidation reloads both reserves but never repeats the active and paused checks.

    Seen in 1 report
  49. The executor's execute function is not payable and the core does not forward the sent value to it.

    Seen in 1 report
  50. The exercise function prices the payment using spot reserves and passes a minimum LP amount of one, so no real slippage protection exists.

    Seen in 1 report