Skip to content

In-depth lesson · DoS

Root causes

Every point the DoS reports back under this heading, best-backed first, each with the reports it is seen in.

Back to the lesson 1,001 to 1,050 of 2,053
  1. The Content-Length value is not validated before being used in a size calculation, allowing an integer underflow that then affects a memory write.

    Seen in 1 report
  2. The contract allows a buyout to be started with a negligible amount and prevents any concurrent buyout, so a low-value buyout locks out higher offers until it expires.

    Seen in 1 report
  3. The contract allows anyone to add reward tokens without restriction, and the maximum limit can be reached by adding many tokens with minimal amounts.

    Seen in 1 report
  4. The contract allows deposits of any amount, even 1 wei, without a minimum, so an attacker can create many receipts cheaply.

    Seen in 1 report
  5. The contract allows minting zero shares when the stake rate is low, breaking the invariant that total stakes and staked tokens are both zero or both non-zero.

    Seen in 1 report
  6. The contract assumes its balance only changes through its own functions, so an external transfer makes the forfeit amount exceed the declared balance.

    Seen in 1 report
  7. The contract attempts to request new randomness from Chainlink VRF within the same transaction as the VRF callback, violating the VRF coordinator's reentrancy guard.

    Seen in 1 report
  8. The contract calls Chainlink's latestRoundData without error handling, so a reverting feed causes a permanent denial of service for price oracle access.

    Seen in 1 report
  9. The contract calls the deprecated latestRound function instead of the recommended latestRoundData, so if latestRound returns zero, subsequent arithmetic underflows.

    Seen in 1 report
  10. The contract caps the oracle payload at a fixed size that the required multi-signer data exceeds.

    Seen in 1 report
  11. The contract checks that its token balance is exactly zero after a transfer rather than checking the change in balance, so any extra tokens cause a revert.

    Seen in 1 report
  12. The contract does not enforce a minimum destination gas and hardcodes a relay gas value.

    Seen in 1 report
  13. The contract does not check that the oracle price is greater than zero before using it as a denominator.

    Seen in 1 report
  14. The contract does not check that the remaining ETH after creator payments exceeds the minimum purchase amount before calling buyToken.

    Seen in 1 report
  15. The contract does not check whether the token address is the special ETH placeholder before calling approve on it.

    Seen in 1 report
  16. The contract does not check whether the withdrawable amount is greater than zero before calling the external withdraw function, which reverts on a zero amount.

    Seen in 1 report
  17. The contract does not handle failed external calls inside loops, so a single revert aborts the entire batch.

    Seen in 1 report
  18. The contract does not limit the length of the details and image URI strings.

    Seen in 1 report
  19. The contract does not limit the user-supplied expiration value, so adding it to the deposit timestamp can overflow.

    Seen in 1 report
  20. The contract does not prevent totalShares from becoming zero while pendingCredit is non-zero, leading to division by zero in multiple functions.

    Seen in 1 report
  21. The contract does not validate that the loan-to-value ratio is within safe bounds, so extreme values cause division by zero or overflow during price calculation.

    Seen in 1 report
  22. The contract does not verify that sufficient gas remains after the inner call, so an inner out-of-gas failure is treated as a completed execution and the queued transaction is cleared.

    Seen in 1 report
  23. The contract enforces that new reward epochs must be strictly increasing, so any attempt to add a reward for a past epoch will revert if a later epoch has already been recorded.

    Seen in 1 report
  24. The contract has no upper bound on assets per order and loops over them during transfers.

    Seen in 1 report
  25. The contract hardcodes a gas limit of 30,000 for external calls, which may be insufficient for complex receiver logic.

    Seen in 1 report
  26. The contract has no maximum on shareholders, so fee distribution loops over an unbounded array.

    Seen in 1 report
  27. The contract iterates over an unbounded array of protections without limiting its size.

    Seen in 1 report
  28. The contract iterates over an unbounded per-user array on every action, and other users can inflate its length.

    Seen in 1 report
  29. The contract lacks a function to call the manager's allowHandler method, so the handlerCan mapping is never set and the modifier always reverts.

    Seen in 1 report
  30. The contract lets the recipient be changed at any time and does not check whether that address is blacklisted by the quote token before transferring margin during liquidation.

    Seen in 1 report
  31. The contract loops over the entire queue, so gas cost grows with queue length.

    Seen in 1 report
  32. The contract recalculates the curated pool count by iterating over an unbounded array instead of maintaining a separate counter.

    Seen in 1 report
  33. The contract records the requested transfer amount instead of the actual balance difference, so its recorded balance can exceed the real one.

    Seen in 1 report
  34. The contract requires an exact equality between its asset balance and a user-supplied maximum amount, which an attacker can trivially change by sending a small amount of the asset.

    Seen in 1 report
  35. The contract requires exact equality with the marketplace nonce, which is incremented even for skipped contract orders.

    Seen in 1 report
  36. The contract sends funds directly to the lender during closing, and the lender can revert the transfer.

    Seen in 1 report
  37. The contract sends its ETH balance to the fee burner even when no pool uses ETH, causing a require statement to fail.

    Seen in 1 report
  38. The contract sends funds directly to each beneficiary in a loop, so a single beneficiary that reverts on receipt causes the entire distribution transaction to fail.

    Seen in 1 report
  39. The contract trusts a user-supplied market address and only redeems the amount transferred, without verifying that the market is legitimate or that the redemption succeeded.

    Seen in 1 report
  40. The contract unconditionally attempts to transfer surplus tokens to the borrower during position closure, without handling the case where the borrower is blacklisted and the transfer reverts.

    Seen in 1 report
  41. The contract unconditionally repays residual debt without checking whether any debt remains.

    Seen in 1 report
  42. The contract uses a high gas limit for every creator recipient instead of only when a single recipient needs it, allowing multiple recipients to each consume the full limit.

    Seen in 1 report
  43. The contract uses a strict equality check between its balance and a caller-supplied parameter.

    Seen in 1 report
  44. The contract uses an assert to check that its yield share balance is zero after a swap, but does not account for pre-existing yield shares.

    Seen in 1 report
  45. The contract uses an exact equality check on the received token balance instead of allowing a minimum amount, so normal slippage causes reverts.

    Seen in 1 report
  46. The contract uses its actual token balance as an internal accounting value, which could be changed by anyone via a direct transfer.

    Seen in 1 report
  47. The contract uses safeTransfer, which for ERC777 tokens triggers a callback the recipient can revert.

    Seen in 1 report
  48. The contract uses a fixed-size PDA for storage and never frees space when positions are withdrawn, so repeated deposits exhaust the available space.

    Seen in 1 report
  49. The contract uses a high-level call that automatically copies all returned data into memory without limiting its size.

    Seen in 1 report
  50. The contract uses a push strategy, sending Ether to all bidders in a loop within the claim function, so a single malicious bidder can cause the entire transaction to revert.

    Seen in 1 report