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 3,151 to 3,200 of 5,700
  1. The fee transfer to the referral destination is always attempted and any failure reverts the whole transaction, and the creator can change the destination at any time.

    Seen in 1 report
  2. The fee used the raw requested count while the oracle silently capped returned records.

    Seen in 1 report
  3. The fee was a percentage of the strike price rather than the premium, so zero-strike options paid nothing.

    Seen in 1 report
  4. The fee was calculated on the post-fee quote amount, understating it for shorts.

    Seen in 1 report
  5. The fee was calculated only on the initial lent amount, not on the premium after orders executed.

    Seen in 1 report
  6. The fee was computed from raw input amounts instead of amounts normalised to the current pool ratio, so fee charged and fee credited diverge.

    Seen in 1 report
  7. The fee was computed from the order's listed price instead of the amount filled.

    Seen in 1 report
  8. The fee was computed from the output amount of the last pool in the route rather than from the input amount or from each step.

    Seen in 1 report
  9. The fee-assessment path reuses the same last-update timestamp that the entry and exit cooldown check relies on.

    Seen in 1 report
  10. The fee-claim function reads the gauge's total token balance instead of only the fees received from the collect call.

    Seen in 1 report
  11. The fee-inclusive calculation subtracts fees from the amount before those fees are applied instead of dividing by the sum of fees plus one hundred percent.

    Seen in 1 report
  12. The file locking mechanism does not verify the file exists before applying the lock.

    Seen in 1 report
  13. The file was written to its final destination before hash verification and not deleted on mismatch.

    Seen in 1 report
  14. The fill fraction is stored in a narrow integer type without checking that numerator and denominator fit.

    Seen in 1 report
  15. The fill function defaults the remaining liability but does not delete the remaining auction data.

    Seen in 1 report
  16. The fill price is pinned to the first oracle print after commit but the order lifetime is chosen by the trader, so a short deadline acts as free cancellation.

    Seen in 1 report
  17. The fill-or-kill check reverted on any remaining amount instead of only when the remainder was at least the lot size.

    Seen in 1 report
  18. The filter compared raw code points rather than normalising the visual appearance of the text.

    Seen in 1 report
  19. The filtered slice was created but never assigned back, so the original unfiltered list was used.

    Seen in 1 report
  20. The filtering layer and the backend resolve duplicate parameter names by different rules, so the validated value is not the acted-on value.

    Seen in 1 report
  21. The final auction end is set to a duration rather than an actual timestamp, so the end check is ineffective.

    Seen in 1 report
  22. The final balance check and transfer used the user-supplied receiving asset id rather than the asset returned by the last swap.

    Seen in 1 report
  23. The final check demands an exact zero borrow balance instead of checking the account is no longer in shortfall.

    Seen in 1 report
  24. The final holder's share is computed as the whole remaining amount rather than their proportional balance.

    Seen in 1 report
  25. The final payout setter lacked a check that the payout had not already been finalised.

    Seen in 1 report
  26. The finalisation check required the validator to be active at claim time rather than checking whether the timelock had already completed.

    Seen in 1 report
  27. The finalisation check required the validator to be active without comparing the timelock expiry against the deactivation timestamp.

    Seen in 1 report
  28. The finalisation logic assumed tokens only arrive during finalisation, but with a zero cooldown they arrive earlier, so the balance difference is zero.

    Seen in 1 report
  29. Withdrawal finalisation required every withdrawal request to succeed before releasing any funds, with no minimum position size to avoid rounding failures.

    Seen in 1 report
  30. The fingerprint comparison is wrapped in a length check, so a wrong-length value skips verification instead of failing.

    Seen in 1 report
  31. The finish-liquidation function transfers tokens without calling the internal accounting function to update the recorded reserve balance.

    Seen in 1 report
  32. The firmware did not parse or validate the unlock time field before signing.

    Seen in 1 report
  33. The firmware update process compares version strings with integer comparison operators, so the version checks always fail and any firmware version is accepted.

    Seen in 1 report
  34. The first deposit set total liquidity units directly with no minimum locked.

    Seen in 1 report
  35. The first mint does not lock a minimum amount of liquidity, so the share price can be manipulated.

    Seen in 1 report
  36. The first-deposit logic assumes pool reserves are dust, but after a module change the new module holds the entire liquidity, so the dust-removal sends all funds to the manager.

    Seen in 1 report
  37. The fix disabled liquidations only while repay was paused but added no grace period after repay resumed, so repayments could be frontrun.

    Seen in 1 report
  38. The fixed liquidator reward and liquidation discount are too small relative to gas cost when a slashing reduces the underlying value of stETH shares.

    Seen in 1 report
  39. The fixed rate is computed from current floating debt rather than an average, so it can be moved within one block.

    Seen in 1 report
  40. The flash fee function returns the change fee directly without scaling for token decimals.

    Seen in 1 report
  41. The Flash file allowed all domains and accepted a URL parameter that loaded and executed external SWF code.

    Seen in 1 report
  42. The flash loan function transfers only the pool fee and omits the protocol fee.

    Seen in 1 report
  43. The flash loan path updates the reserve supply but does not cache the reserve, so a later action reloads the stale value.

    Seen in 1 report
  44. The flash loan trusts the token's transfer return value instead of comparing pool balances before and after.

    Seen in 1 report
  45. The flash-loan path validates only per-reserve pause state and never checks the global pause flag.

    Seen in 1 report
  46. The flashAction callback omits the initiator address from its parameters.

    Seen in 1 report
  47. The flashloan fee was derived from a swap fee set by the first swap in each block.

    Seen in 1 report
  48. The flip detection multiplies the new vote by a zero tally, so the condition fails to detect a flip.

    Seen in 1 report
  49. The flow reserved the subdomain before verification and had no cleanup when registration failed.

    Seen in 1 report
  50. The for and against vote indices are swapped in the success comparison.

    Seen in 1 report