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 2,551 to 2,600 of 5,700
  1. The contract did not refund excess message value after paying the bridge cost.

    Seen in 1 report
  2. The contract did not reject transactions that sent native currency when the source token was an ERC20.

    Seen in 1 report
  3. The contract did not set an allowance for the marketplace before calling functions that use transferFrom.

    Seen in 1 report
  4. The contract did not store the request timestamp or a snapshot of the streak and day indices when the spin started, so reward logic used the later callback timestamp.

    Seen in 1 report
  5. The contract did not track the amount of input consumed and never refunded the excess.

    Seen in 1 report
  6. The contract did not track which proposal was active, so any committed proposal could be settled.

    Seen in 1 report
  7. The contract did not use a safe transfer wrapper and ignored the boolean return value of the transfer.

    Seen in 1 report
  8. The contract did not validate that every level of a hat identifier corresponded to a real hat.

    Seen in 1 report
  9. The contract did not validate that the revenue contract address was registered.

    Seen in 1 report
  10. The contract did not validate that the token address in the Permit2 signature matched the vault's asset.

    Seen in 1 report
  11. The contract did not verify that a user's participation start time matched the programme start, so anyone could claim as if present from the beginning.

    Seen in 1 report
  12. The contract divides the token balance by the pool weight when computing TVL, though the balance from the pool already reflects the weight.

    Seen in 1 report
  13. The contract does not calculate the liquidity amount from the token amounts for the first deposit; it relies on the caller to provide a consistent set of values.

    Seen in 1 report
  14. The contract does not check that the destination chain and handler differ from the source chain and handler, allowing a self-transfer that mints new tokens.

    Seen in 1 report
  15. The contract does not check that the token is whitelisted before using its index from the whitelist.

    Seen in 1 report
  16. The contract does not check that total funds stays at least used funds when used funds increases or total funds decreases.

    Seen in 1 report
  17. The contract does not check the L2 sequencer uptime feed before using the oracle price.

    Seen in 1 report
  18. The contract does not check whether the copier is the original portfolio owner.

    Seen in 1 report
  19. The contract does not check whether the target address actually contains code before making a low-level call, relying only on the success flag which is true for non-existent accounts.

    Seen in 1 report
  20. The contract does not compare the signed price with the current on-chain mint price before accepting the signature.

    Seen in 1 report
  21. The contract does not implement the required receiver functions for ERC721 and ERC1155 tokens.

    Seen in 1 report
  22. The contract does not re-check position health after the swap, so a manipulated swap price can make the position undercollateralised.

    Seen in 1 report
  23. The contract does not remove tokens with zero balance from its distribution list and does not skip zero-value transfers, so a token that reverts on zero transfers causes every payout to fail.

    Seen in 1 report
  24. The contract does not revert on a late low bid and fails to credit the user's pending balance.

    Seen in 1 report
  25. The contract does not store the reward token list per token ID and re-fetches it from the external pool, so removed tokens are no longer tracked.

    Seen in 1 report
  26. The contract does not track how much native value has already been accounted for within a transaction.

    Seen in 1 report
  27. The contract does not track individual deposit amounts; it calculates available funds as the total balance minus locked funds, so refunds are not proportional to each depositor's contribution.

    Seen in 1 report
  28. The contract does not track which tokens have already had the protocol fee deducted, so leftover paired LP tokens are counted again and charged twice.

    Seen in 1 report
  29. The contract does not validate that the amount argument equals the native value sent.

    Seen in 1 report
  30. The contract does not validate that the number of NFTs transferred in a sell order is greater than zero.

    Seen in 1 report
  31. The contract enforced one vest per user by reverting, without checking who created it.

    Seen in 1 report
  32. The contract enforced strict sequential resolution of proposals without any timeout or override mechanism.

    Seen in 1 report
  33. The contract enforces a 50% limit per call but does not track cumulative withdrawals over time.

    Seen in 1 report
  34. The contract enforces a minimum token amount equal to the stream duration in seconds without adjusting for decimals or value.

    Seen in 1 report
  35. The contract enforces the liquidationInitialAsk limit on every lien in the stack even though only the first lien's value is used for auctions.

    Seen in 1 report
  36. The contract exposes only an add function for the whitelist and no remove or toggle.

    Seen in 1 report
  37. The contract fails to validate that the tier specified when depositing an NFT is within the bounds of existing tiers.

    Seen in 1 report
  38. The contract handling code mishandled nested reverts and delegatecall, allowing credit without a transfer.

    Seen in 1 report
  39. The contract hard-coded an additional 1% slippage tolerance instead of respecting the user's limit.

    Seen in 1 report
  40. The contract hardcodes a minimum output of zero for token swaps.

    Seen in 1 report
  41. The contract hardcodes an 18-decimal scaling factor in arithmetic operations.

    Seen in 1 report
  42. The contract hardcodes the slippage protection parameters to zero instead of letting the user specify them.

    Seen in 1 report
  43. The contract has a function to add supported tokens but none to remove them, so a depegged token stays accepted indefinitely.

    Seen in 1 report
  44. The contract ignored the boolean success value returned by the external withdraw-and-unwrap call.

    Seen in 1 report
  45. The contract ignores the boolean success value returned by ERC20 transfer and transferFrom calls.

    Seen in 1 report
  46. The contract implemented only an add function with no corresponding remove function.

    Seen in 1 report
  47. The contract implements a rescue function only for ERC20 tokens, not the native token.

    Seen in 1 report
  48. The contract infers the previous block's gas price from the current transaction's gas price.

    Seen in 1 report
  49. The contract inherited pausable checks but the developer forgot to add public pause and unpause functions.

    Seen in 1 report
  50. The contract inherited the pausable base but never exposed public pause and unpause functions.

    Seen in 1 report