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 4,351 to 4,400 of 5,700
  1. The refund calculation multiplied the available amount by the weight, so zero weight produced a zero refund with no special case.

    Seen in 1 report
  2. The refund calculation subtracted a storage value from a variable that had just been set to that same value, so the result was always zero.

    Seen in 1 report
  3. The refund calculation subtracted the whole contract balance from itself, giving zero, and the bought amount sent to the receiver included the refund.

    Seen in 1 report
  4. The refund calculation used a funding value that was decremented during bid claims instead of the original capacity.

    Seen in 1 report
  5. The refund calculation uses only the unused amount and ignores the tax-free allocation.

    Seen in 1 report
  6. The refund condition added a gas-unit constant to a wei-denominated fee, so overpayments smaller than that constant were not refunded.

    Seen in 1 report
  7. The refund function carries the when-not-paused modifier, so refunds cannot run while paused.

    Seen in 1 report
  8. The refund function fails to decrease the locked ETH counter by the refunded amount.

    Seen in 1 report
  9. The refund function only considers the fee payer and ignores the fee granter who actually paid.

    Seen in 1 report
  10. The refund function transfers the NFT back to the funder but does not remove the corresponding deposit receipt from the NFT deposits array.

    Seen in 1 report
  11. The refund function transfers the NFT back to the funder but fails to remove the deposit identifier from the list of NFT deposits, so the deposit limit is consumed by refunded entries.

    Seen in 1 report
  12. The refund helper only forwarded the contract's native balance and had no logic to forward ERC20 balances returned by the router.

    Seen in 1 report
  13. The refund limit was enforced only in the standard return flow rather than centrally across all refund channels.

    Seen in 1 report
  14. The refund logic sends attached value to the redemption recipient rather than back to the caller.

    Seen in 1 report
  15. The refund logic used cumulative block gas used instead of the individual transaction's gas used.

    Seen in 1 report
  16. The refund mechanism assumed caller and account were different, so a self-transfer injected no real value.

    Seen in 1 report
  17. The refund threshold compared msg.value in wei against a gas-unit constant instead of converting the gas allowance into a wei value first.

    Seen in 1 report
  18. The refund time was computed from the current block timestamp instead of the stored foreclosure time.

    Seen in 1 report
  19. The refund used a contract-call helper that reverts for accounts with no code instead of a plain transfer.

    Seen in 1 report
  20. The refund was based on the full calldata length rather than the actual gas consumed, and zero bytes cost less gas than the refund rate assumed.

    Seen in 1 report
  21. The refund was paid to the transaction recipient rather than to the contract whose code actually did the work, and registration of recipients was permissionless.

    Seen in 1 report
  22. The region check relied on session state that was not re-evaluated when switching accounts.

    Seen in 1 report
  23. The register function lacked an aggregate check that the sent value covered the sum of supply and collateral.

    Seen in 1 report
  24. The registered underlyings array can only grow and has no way to remove or reset entries.

    Seen in 1 report
  25. The registration and linking logic did not check whether a certification was already linked to another account before allowing a new link.

    Seen in 1 report
  26. The registration endpoint accepted requests without verifying the reCAPTCHA token server-side.

    Seen in 1 report
  27. The registration endpoint did not check for an existing account before creating a new one, overwriting the existing record.

    Seen in 1 report
  28. The registration endpoint did not limit how many account creation requests could be made from the same source in a time window.

    Seen in 1 report
  29. The registration endpoint does not compare the submitted OTP with the one sent to the email before creating the account.

    Seen in 1 report
  30. The registration endpoint lacked rate limiting and uniqueness checks on the email, and the login flow did not enforce email verification.

    Seen in 1 report
  31. The registration flow activated accounts immediately without requiring email ownership verification.

    Seen in 1 report
  32. The registration flow derives availability, price, display and calldata from the raw route parameter using only lowercasing and a suffix strip, never calling a normaliser.

    Seen in 1 report
  33. The registration form did not check whether the email domain belongs to a known disposable email provider.

    Seen in 1 report
  34. The registration function had no access control and no way to move a token between lists, so the first registrant fixed its category permanently.

    Seen in 1 report
  35. The registration functions only allowed unregistered contracts and provided no mechanism to update the NFT association after loss or transfer.

    Seen in 1 report
  36. The registration handler bound a hidden client-supplied account tier parameter to the new user record.

    Seen in 1 report
  37. The registration process did not require email ownership verification before activating the account.

    Seen in 1 report
  38. The registration process did not verify that the captcha response parameter had a value.

    Seen in 1 report
  39. The registration state machine copies the name into its context once, so a later change of the name in the URL updates the display but not the pending registration.

    Seen in 1 report
  40. The registration state machine is created with only the chain ID and is never cancelled when the selected name changes.

    Seen in 1 report
  41. The registry uses the mutable inner puzzle hash as the unique identifier instead of the immutable launcher ID.

    Seen in 1 report
  42. The reinvest function lacked access control, letting any caller set trade parameters that favour themselves.

    Seen in 1 report
  43. The reinvestment threshold compared raw token amounts rather than their combined value, and fee downscaling was skipped when any liquidity went to pool fees.

    Seen in 1 report
  44. The rejectInvalidRedemption function omitted the call to payOrBurnExecutorFee before deleting the request, leaving the fee unaccounted for.

    Seen in 1 report
  45. The rejection and refund paths remove the epoch from the global queue but never unlink it from the per-controller head.

    Seen in 1 report
  46. The rejection function requires collateral to be at least the amount being rejected, which a small reduction defeats.

    Seen in 1 report
  47. The relayer fee was recorded before the swap, so a revert undid the whole transaction and the fee could not be claimed.

    Seen in 1 report
  48. The release function only handles collateral already deposited and does not pull pending redistributed collateral.

    Seen in 1 report
  49. The release system lacked fine-grained permissions and change notifications, so any collaborator could silently replace release assets.

    Seen in 1 report
  50. The relist function does not check whether the listing originated from a liquidation.

    Seen in 1 report