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 1,151 to 1,200 of 5,700
  1. The interest rate setter updates the rate without first accruing debt.

    Seen in 1 report
  2. Interest was updated only once per block, so a borrow and repay in the same block incurred no interest.

    Seen in 1 report
  3. The interface declares a return value that the native contract does not return.

    Seen in 1 report
  4. Interface implementation is verified by a self-reported boolean rather than checking the required callback functions exist.

    Seen in 1 report
  5. Interface NatSpec comments were written to an earlier or intended design and were not updated when the implementation changed.

    Seen in 1 report
  6. Internal balances were updated from the requested transfer amount rather than the actual received amount.

    Seen in 1 report
  7. Liquidity was calculated from the requested transfer amount rather than the actual received balance.

    Seen in 1 report
  8. 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
  9. Invitation links were not invalidated after use or after an admin revoked the user.

    Seen in 1 report
  10. IPv6 addresses were normalised to a single host address instead of being grouped by the subnet the client controls.

    Seen in 1 report
  11. The junior deposit quote and fee accrual mint shares without bounding the mint against remaining supply headroom.

    Seen in 1 report
  12. kickWithDeposit lacks the final LUP above HTP check that other removal functions perform.

    Seen in 1 report
  13. kickWithDeposit omits the auction-debt-locked check present in other deposit removal functions.

    Seen in 1 report
  14. killGauge updates the total epoch weight but leaves the per-gauge weight entry in place.

    Seen in 1 report
  15. 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
  16. There is no slippage protection on exit functions combined with a modulo-based unlock time calculation that changes abruptly at period boundaries.

    Seen in 1 report
  17. Leave and withdraw checked only the buyout state, not who started the buyout.

    Seen in 1 report
  18. Leftover tokens are supplied to the lending pool without any withdrawal path for that token.

    Seen in 1 report
  19. A less-than-or-equal comparison was used where a strict less-than was intended.

    Seen in 1 report
  20. Leverage uses debt value plus margin value as the numerator instead of position value, assuming they are equal.

    Seen in 1 report
  21. Leverage was validated only when explicitly set, not when positions were opened through order execution.

    Seen in 1 report
  22. Liabilities are read from the stored borrow balance at last settlement instead of the up-to-date balance including accrued interest.

    Seen in 1 report
  23. Liens are identified by a mutable array index that shifts when entries are deleted, instead of by a stable identifier.

    Seen in 1 report
  24. Limit and allowance updates are only called in the branch where the contract holds enough output token, not in the swap branch.

    Seen in 1 report
  25. The limit index check is placed only inside the collateral-pull branch.

    Seen in 1 report
  26. 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
  27. Link detection does not account for URLs with extra subdomains or suffixes.

    Seen in 1 report
  28. Liquidatability used an EMA price while the seized amount used spot price.

    Seen in 1 report
  29. 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
  30. Liquidation clears the warning state unconditionally without checking whether the account is healthy afterwards.

    Seen in 1 report
  31. Liquidation closes all positions without enforcing the taker invariant check.

    Seen in 1 report
  32. Liquidation does not update the position manager's record of the user's balance.

    Seen in 1 report
  33. 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
  34. Liquidation functions do not handle the trading fee for pending quotes, leaving it with the fee collector.

    Seen in 1 report
  35. Liquidation functions modify party state without incrementing the parties' nonces, so previously signed messages stay valid.

    Seen in 1 report
  36. The liquidation health test omits the pending open's committed margin from reachable collateral.

    Seen in 1 report
  37. Liquidation hooks do not check whether the borrower has exited the market.

    Seen in 1 report
  38. 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
  39. Liquidation still attempts a swap for an asset the account does not hold when one liability remains.

    Seen in 1 report
  40. Liquidation subtracts a capped amount from locked collateral instead of recalculating it from remaining debt.

    Seen in 1 report
  41. Liquidation transfers debt tokens into the vault without updating the vault's internal recorded balance for that token.

    Seen in 1 report
  42. Liquidation treats debt and collateral shares as asset amounts without converting through the indexes.

    Seen in 1 report
  43. Liquidation used the manipulable pool spot price and tick to derive collateral composition and penalty weighting.

    Seen in 1 report
  44. Liquidation validation does not limit the trade size to the position's available synthetic balance.

    Seen in 1 report
  45. Liquidations were allowed immediately after unpause with no grace period.

    Seen in 1 report
  46. Liquidations burn tokens instead of having liquidators pay into the liquidity pool, creating a feedback loop.

    Seen in 1 report
  47. Liquidity could be added and removed instantly without penalty while fees were distributed immediately.

    Seen in 1 report
  48. Liquidity to burn was calculated from pool token reserves, which is invalid for V3 pools that support single-sided liquidity.

    Seen in 1 report
  49. Liquidity units were calculated from deposited amounts without enforcing the current reserve ratio.

    Seen in 1 report
  50. List membership was not cleaned up on deactivation, so reactivation restored the entry without the victim being able to remove it.

    Seen in 1 report