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 incentive uses the pool average price while the actual swap happens at the current price.
-
The increase path collects carry at commitment but records it as zero in the commitment, so the bound check never sees it.
-
The index calculation for the oldest sample does not handle the not-yet-wrapped case.
Seen in 1 report
-
The index initialisation uses a greater-than-zero check instead of comparing against the reward token initial index.
Seen in 1 report
-
The index is read after being set to zero, so the array update uses the wrong position.
Seen in 1 report
-
The index used to differentiate requests is hardcoded to zero instead of being incremented per user.
-
The indexer name was used raw for display, expiry and the renewability gate while the signed calldata and price used the normalised label.
-
The inflation rate is decayed before the gauges are checkpointed, so elapsed time is credited at the new rate.
-
The inflation update applies the current rate to the whole elapsed time before checking whether the decay period has passed.
Seen in 1 report
-
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.
-
The ingestion API did not validate origin or referer and did not deduplicate or timestamp-check payloads.
Seen in 1 report
-
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.
-
The inherited claimRewards is not overridden to call the reward controller.
Seen in 1 report
-
The inherited maxWithdraw did not account for the withdrawal penalty.
-
The init code hash constant was not updated after the pair contract bytecode changed.
-
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
-
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
-
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
-
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
-
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.
-
The initialisation function lacks access control or a check preventing repeated calls.
Seen in 1 report
-
The initialisation path stored the minimum upgrade delay without applying the maximum-delay check the setter uses.
Seen in 1 report
-
The initialise function assigns fee values directly without checking each is below the unit.
Seen in 1 report
-
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
-
The initializer or factory does not enforce that withdrawal penalties are greater than zero.
Seen in 1 report
-
The initiator fee is computed on the full transfer amount before determining how much is needed to pay the liens.
Seen in 1 report
-
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
-
The input amount is used as the minimum output for a swap between tokens that are not pegged.
Seen in 1 report
-
Critical
-
-
The input filter only checked for the literal at character and did not decode HTML or URL encoding before validation.
Seen in 1 report
-
The input transfer function does not verify that the native value is zero when the input token is not ETH.
Seen in 1 report
-
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
-
The insolvency check uses old locked values before they are adjusted to maintain fixed leverage.
-
The installer did not check whether the database already contained tables or admin users before running setup again.
-
The instant-unbond path passes the fee-deducted amount to the share-removal hook instead of the full bonded amount.
Seen in 1 report
-
The insufficient-debt check ran before a settlement call that reduced the debt, so it used a stale value.
Seen in 1 report
-
The integration assumed claiming the main asset and extra rewards were separate operations, but the gauge returned all rewards in one call.
-
The integration did not verify that the user initiating the link controlled the chat user id being linked.
Seen in 1 report
-
High
-
-
The integrity check relies on a hook or callback that application code can override.
Seen in 1 report
-
The integrity exchange had no ordering and no binding to the sender, so a peer's submission could be observed and replayed.
-
The intent handler trusted a duplicate parameter and used the last value instead of the first.
Seen in 1 report
-
The interest accumulator is not updated when the pool had zero debt before the borrow.
Seen in 1 report
-
The interest calculation divides by a two-decimal base instead of a five-decimal base while the numerator has much higher precision.
-
The interest calculation is not frozen during pause while all user actions that could mitigate risk are disabled.
Seen in 1 report
-
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
-
The interest rate calculation did not cap utilisation, so it could exceed 100 percent when borrows exceeded deposits.
Seen in 1 report
-
The interest rate for a new loan is calculated before the borrowed amount is added to utilisation.
Seen in 1 report
-
The interest rate is derived from instantaneous utilisation with no time restriction on deposit, borrow and withdraw.
-
The force-close cooldown is calculated from a general-purpose timestamp updated by many actions, including partial fills.
-
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
-
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