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,401 to 3,450 of 5,700
  1. The incentive uses the pool average price while the actual swap happens at the current price.

    Seen in 1 report
  2. The increase path collects carry at commitment but records it as zero in the commitment, so the bound check never sees it.

    Seen in 1 report
  3. The index calculation for the oldest sample does not handle the not-yet-wrapped case.

    Seen in 1 report
  4. The index initialisation uses a greater-than-zero check instead of comparing against the reward token initial index.

    Seen in 1 report
  5. The index is read after being set to zero, so the array update uses the wrong position.

    Seen in 1 report
  6. The index used to differentiate requests is hardcoded to zero instead of being incremented per user.

    Seen in 1 report
  7. The indexer name was used raw for display, expiry and the renewability gate while the signed calldata and price used the normalised label.

    Seen in 1 report
  8. The inflation rate is decayed before the gauges are checkpointed, so elapsed time is credited at the new rate.

    Seen in 1 report
  9. The inflation update applies the current rate to the whole elapsed time before checking whether the decay period has passed.

    Seen in 1 report
  10. The inflight counter was incremented only on the normal submission path but decremented for every transaction in executed blocks, including those written directly to the DA node.

    Seen in 1 report
  11. The ingestion API did not validate origin or referer and did not deduplicate or timestamp-check payloads.

    Seen in 1 report
  12. The inheritance validation only checks the level and originId/mutualId relationship, not that the claiming edge and the inheriting edge belong to the same challenge tree.

    Seen in 1 report
  13. The inherited claimRewards is not overridden to call the reward controller.

    Seen in 1 report
  14. The inherited maxWithdraw did not account for the withdrawal penalty.

    Seen in 1 report
  15. The init code hash constant was not updated after the pair contract bytecode changed.

    Seen in 1 report
  16. The initial liquidity path minted LP tokens for a one-sided deposit without simulating a swap or charging the swap fee.

    Seen in 1 report
  17. The initial liquidity path only verified supplied tokens belonged to the pool, not that every pool token was supplied with a non-zero amount.

    Seen in 1 report
  18. The initial share calculation uses the sum of the two amounts instead of the geometric mean, making the slippage parameter ineffective for the first deposit.

    Seen in 1 report
  19. The initial-margin check counts the account's own deferred trader claim as collateral, but settling it for a flat account converts it into free settlement the check does not count.

    Seen in 1 report
  20. The initialisation function checked for the alternative ETH address, but the constructor had already converted native ETH to the zero address, so the condition was always true and the code attempted to approve the zero address.

    Seen in 1 report
  21. The initialisation function lacks access control or a check preventing repeated calls.

    Seen in 1 report
  22. The initialisation path stored the minimum upgrade delay without applying the maximum-delay check the setter uses.

    Seen in 1 report
  23. The initialise function assigns fee values directly without checking each is below the unit.

    Seen in 1 report
  24. The initialize function checks that the legacy bridge address is non-zero but omits the assignment to the l1LegacyBridge state variable.

    Seen in 1 report
  25. The initializer or factory does not enforce that withdrawal penalties are greater than zero.

    Seen in 1 report
  26. The initiator fee is computed on the full transfer amount before determining how much is needed to pay the liens.

    Seen in 1 report
  27. The inner loop appending individual scores does not check the maximum sample limit, so the total can exceed the configured maximum.

    Seen in 1 report
  28. The input amount is used as the minimum output for a swap between tokens that are not pegged.

    Seen in 1 report
  29. The input filter only checked for the literal at character and did not decode HTML or URL encoding before validation.

    Seen in 1 report
  30. The input transfer function does not verify that the native value is zero when the input token is not ETH.

    Seen in 1 report
  31. The insolvency check compares instantaneous available cash against maximum side liability after each individual close without netting the unsettled loss of an offsetting position.

    Seen in 1 report
  32. The insolvency check uses old locked values before they are adjusted to maintain fixed leverage.

    Seen in 1 report
  33. The installer did not check whether the database already contained tables or admin users before running setup again.

    Seen in 1 report
  34. The instant-unbond path passes the fee-deducted amount to the share-removal hook instead of the full bonded amount.

    Seen in 1 report
  35. The insufficient-debt check ran before a settlement call that reduced the debt, so it used a stale value.

    Seen in 1 report
  36. The integration assumed claiming the main asset and extra rewards were separate operations, but the gauge returned all rewards in one call.

    Seen in 1 report
  37. The integration did not verify that the user initiating the link controlled the chat user id being linked.

    Seen in 1 report
  38. The integrity check relies on a hook or callback that application code can override.

    Seen in 1 report
  39. The integrity exchange had no ordering and no binding to the sender, so a peer's submission could be observed and replayed.

    Seen in 1 report
  40. The intent handler trusted a duplicate parameter and used the last value instead of the first.

    Seen in 1 report
  41. The interest accumulator is not updated when the pool had zero debt before the borrow.

    Seen in 1 report
  42. The interest calculation divides by a two-decimal base instead of a five-decimal base while the numerator has much higher precision.

    Seen in 1 report
  43. The interest calculation is not frozen during pause while all user actions that could mitigate risk are disabled.

    Seen in 1 report
  44. The interest formula uses the block-number difference as a proxy for elapsed time, which is unreliable where block production is not constant.

    Seen in 1 report
  45. The interest rate calculation did not cap utilisation, so it could exceed 100 percent when borrows exceeded deposits.

    Seen in 1 report
  46. The interest rate for a new loan is calculated before the borrowed amount is added to utilisation.

    Seen in 1 report
  47. The interest rate is derived from instantaneous utilisation with no time restriction on deposit, borrow and withdraw.

    Seen in 1 report
  48. The force-close cooldown is calculated from a general-purpose timestamp updated by many actions, including partial fills.

    Seen in 1 report
  49. The force-close path charges a spread benefiting the hedger while the normal fill path does not, creating an incentive to ignore close requests.

    Seen in 1 report
  50. The force-withdraw function did not verify that the caller owned the account ID, so anyone could create a pending request for any account.

    Seen in 1 report