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 interest rate setter updates the rate without first accruing debt.
Seen in 1 report
-
Interest was updated only once per block, so a borrow and repay in the same block incurred no interest.
-
The interface declares a return value that the native contract does not return.
-
Interface implementation is verified by a self-reported boolean rather than checking the required callback functions exist.
Seen in 1 report
-
Interface NatSpec comments were written to an earlier or intended design and were not updated when the implementation changed.
-
Internal balances were updated from the requested transfer amount rather than the actual received amount.
Seen in 1 report
-
Liquidity was calculated from the requested transfer amount rather than the actual received balance.
Seen in 1 report
-
Invitation acceptance validated the invited email in isolation without correlating it to the device's active primary account and the organiser's ownership of the group.
Seen in 1 report
-
Invitation links were not invalidated after use or after an admin revoked the user.
Seen in 1 report
-
IPv6 addresses were normalised to a single host address instead of being grouped by the subnet the client controls.
Seen in 1 report
-
The junior deposit quote and fee accrual mint shares without bounding the mint against remaining supply headroom.
Seen in 1 report
-
kickWithDeposit lacks the final LUP above HTP check that other removal functions perform.
Seen in 1 report
-
kickWithDeposit omits the auction-debt-locked check present in other deposit removal functions.
Seen in 1 report
-
killGauge updates the total epoch weight but leaves the per-gauge weight entry in place.
Seen in 1 report
-
There is no domain ownership verification before storing a custom domain, combined with no limit on the number of domains per repository.
Seen in 1 report
-
There is no slippage protection on exit functions combined with a modulo-based unlock time calculation that changes abruptly at period boundaries.
-
Leave and withdraw checked only the buyout state, not who started the buyout.
Seen in 1 report
-
Leftover tokens are supplied to the lending pool without any withdrawal path for that token.
Seen in 1 report
-
A less-than-or-equal comparison was used where a strict less-than was intended.
Seen in 1 report
-
Leverage uses debt value plus margin value as the numerator instead of position value, assuming they are equal.
Seen in 1 report
-
Leverage was validated only when explicitly set, not when positions were opened through order execution.
Seen in 1 report
-
Liabilities are read from the stored borrow balance at last settlement instead of the up-to-date balance including accrued interest.
-
Liens are identified by a mutable array index that shifts when entries are deleted, instead of by a stable identifier.
-
Limit and allowance updates are only called in the branch where the contract holds enough output token, not in the swap branch.
-
The limit index check is placed only inside the collateral-pull branch.
Seen in 1 report
-
Limit orders required oracle block numbers strictly greater than the order's update block while market swaps could use the current block.
Seen in 1 report
-
Link detection does not account for URLs with extra subdomains or suffixes.
Seen in 1 report
-
Liquidatability used an EMA price while the seized amount used spot price.
-
Liquidation cleanup cancels pending orders without charging their notional or accounting for the price difference after the bound price is known.
Seen in 1 report
-
Liquidation clears the warning state unconditionally without checking whether the account is healthy afterwards.
-
Liquidation closes all positions without enforcing the taker invariant check.
Seen in 1 report
-
Liquidation does not update the position manager's record of the user's balance.
Seen in 1 report
-
Liquidation does not verify that the post-liquidation health factor improves, and the average adjust factor can be lowered by seizing a high-LTV asset.
Seen in 1 report
-
Liquidation functions do not handle the trading fee for pending quotes, leaving it with the fee collector.
Seen in 1 report
-
Liquidation functions modify party state without incrementing the parties' nonces, so previously signed messages stay valid.
-
The liquidation health test omits the pending open's committed margin from reachable collateral.
-
Liquidation hooks do not check whether the borrower has exited the market.
Seen in 1 report
-
Liquidation logic updated internal accounting instead of transferring tokens, so it was not affected by token pauses that blocked user protective actions.
Seen in 1 report
-
Liquidation still attempts a swap for an asset the account does not hold when one liability remains.
Seen in 1 report
-
Liquidation subtracts a capped amount from locked collateral instead of recalculating it from remaining debt.
-
Liquidation transfers debt tokens into the vault without updating the vault's internal recorded balance for that token.
-
Liquidation treats debt and collateral shares as asset amounts without converting through the indexes.
-
Liquidation used the manipulable pool spot price and tick to derive collateral composition and penalty weighting.
-
Liquidation validation does not limit the trade size to the position's available synthetic balance.
Seen in 1 report
-
Liquidations were allowed immediately after unpause with no grace period.
Seen in 1 report
-
Liquidations burn tokens instead of having liquidators pay into the liquidity pool, creating a feedback loop.
Seen in 1 report
-
Liquidity could be added and removed instantly without penalty while fees were distributed immediately.
Seen in 1 report
-
Liquidity to burn was calculated from pool token reserves, which is invalid for V3 pools that support single-sided liquidity.
Seen in 1 report
-
Liquidity units were calculated from deposited amounts without enforcing the current reserve ratio.
-
List membership was not cleaned up on deactivation, so reactivation restored the entry without the victim being able to remove it.