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,501 to 2,550 of 5,700
  1. The contact form endpoint lacked any rate limiting or human-verification challenge.

    Seen in 1 report
  2. The contract accepted any token address as input without restricting tokens that revert on transfer.

    Seen in 1 report
  3. The contract accepted msg.value in a branch that called a non-payable function and had no logic to refund or convert the ETH, so the value was trapped.

    Seen in 1 report
  4. The contract accepted slippage parameters but never used them.

    Seen in 1 report
  5. The contract allowed agents to create and cancel return-from-CoreVault requests without any fee, timelock or limit, and the redemption check counted all pending requests against available funds.

    Seen in 1 report
  6. The contract allows a staker to be considered inactive and withdraw their stake even when their last staked assertion is not confirmed, and it does not prevent staking on a different branch.

    Seen in 1 report
  7. The contract allows burning parent-cannot-control without requiring cannot-unwrap, so unwrapping and rewrapping clears the fuse.

    Seen in 1 report
  8. The contract approves a router for the swap amount but never resets the allowance afterwards.

    Seen in 1 report
  9. The contract asserts the router allowance is zero after a swap but never resets leftover allowance.

    Seen in 1 report
  10. The contract assigned the undistributed remainder to the last holder in the array instead of handling it neutrally.

    Seen in 1 report
  11. The contract assumed that the exact transfer amount was received and did not check the actual balance change, so non-standard tokens caused a mismatch between recorded and actual collateral.

    Seen in 1 report
  12. The contract assumed the bridge charged ETH for delivery, but the bridge covers delivery by burning gas on L1.

    Seen in 1 report
  13. The contract assumed the LP token did not reduce an infinite allowance on transfer, so a later approval call reverted.

    Seen in 1 report
  14. The contract assumed the pool would not exist, but pool creation is permissionless.

    Seen in 1 report
  15. The contract assumed the received amount equalled the transferred amount without checking the balance change.

    Seen in 1 report
  16. The contract assumed the reward token and the staked token were identical.

    Seen in 1 report
  17. The contract assumes a third-party pool implements the Uniswap V3 pool interface when it does not.

    Seen in 1 report
  18. The contract assumes deposit yield will always exceed the CPI-based redemption rate without any guarantee.

    Seen in 1 report
  19. The contract assumes it holds only one asset and reverts if its balance contains more, but does not clean up tokens sent before deployment.

    Seen in 1 report
  20. The contract assumes the same address across chains and does not let the user specify a destination address.

    Seen in 1 report
  21. The contract assumes the Sense principal token and the vault share the same decimals.

    Seen in 1 report
  22. The contract assumes the transferred amount equals the received amount without comparing balances before and after.

    Seen in 1 report
  23. The contract calculates payouts based on a balance snapshot at competition close but does not prevent deposits from being refunded after that point.

    Seen in 1 report
  24. The contract calculates the next epoch's start time from the genesis timestamp and the current epoch length, ignoring past changes.

    Seen in 1 report
  25. The contract calculates the redeemed amount from holdings but burns the full user-supplied amount without checking sufficiency.

    Seen in 1 report
  26. The contract called ERC20 transferFrom without verifying its boolean return value, so a token returning false was treated as successful.

    Seen in 1 report
  27. The contract called the swap router without first approving it to spend the tokens.

    Seen in 1 report
  28. The contract calls deposit and redeem on the ERC4626 vault without a minimum output amount.

    Seen in 1 report
  29. The contract calls router functions with an outdated signature that lacks the newly introduced parameter.

    Seen in 1 report
  30. The contract calls the fee-and-rewards update after reducing liquidity to zero, which the pool program rejects.

    Seen in 1 report
  31. The contract calls the router method that operates on Bento shares instead of one that handles raw ERC20 tokens.

    Seen in 1 report
  32. The contract calls the standard approve function directly, which reverts for tokens that return no boolean.

    Seen in 1 report
  33. The contract checked its own ether balance instead of the winning bid amount against the reserve price.

    Seen in 1 report
  34. The contract checks the sent ETH is at least the total price but never computes or returns the difference.

    Seen in 1 report
  35. The contract checks whether an auction is active instead of whether it exists.

    Seen in 1 report
  36. The contract credited the amount stated in the payment call rather than measuring the actual balance change.

    Seen in 1 report
  37. The contract credits the requested transfer amount instead of measuring the actual balance increase.

    Seen in 1 report
  38. The contract credits the requested transfer amount rather than measuring the actual balance change.

    Seen in 1 report
  39. The contract did not account for a user-based cooldown that any deposit resets for the whole contract.

    Seen in 1 report
  40. The contract did not check that input and output tokens differ and recorded the starting balance after withdrawal.

    Seen in 1 report
  41. The contract did not check that the admin hat existed before creating a child hat, and later creation of the admin overwrote the child's lastHatId.

    Seen in 1 report
  42. The contract did not check the actual balance received after a fee-on-transfer transfer.

    Seen in 1 report
  43. The contract did not check the boolean returned by the low-level native transfer call and did not revert on failure.

    Seen in 1 report
  44. The contract did not check the price feed's updated-at timestamp.

    Seen in 1 report
  45. The contract did not check whether the desired output token was already WETH before swapping, so it ran a pointless swap that incurred a fee.

    Seen in 1 report
  46. The contract did not check whether the token pair already existed or verify the current pool price before adding liquidity.

    Seen in 1 report
  47. The contract did not clear the compromised flag when an address was restored.

    Seen in 1 report
  48. The contract did not compare the actual balance increase with the expected amount when funding a promotion.

    Seen in 1 report
  49. The contract did not handle a reverting mint, so the whole execution reverted and the tokens remained in the gateway.

    Seen in 1 report
  50. The contract did not mark EIP-712 signatures as used, allowing replay within the validity window.

    Seen in 1 report