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,601 to 2,650 of 5,700
  1. The contract inherits a generic pausable module rather than the token-specific pausable extension.

    Seen in 1 report
  2. The contract inherits a pausable base but does not expose public wrappers for the internal pause and unpause methods.

    Seen in 1 report
  3. The contract inherits an ownable base without overriding renounceOwnership, and an upgradeable base lacks a storage gap.

    Seen in 1 report
  4. The contract lacked a function to calculate and withdraw profits.

    Seen in 1 report
  5. The contract lacked a receive function to accept refunds for passive orders whose user is the contract itself.

    Seen in 1 report
  6. The contract lacks a payable receive or fallback function.

    Seen in 1 report
  7. The contract let an expired settlement remain usable for liquidation, so a borrower could liquidate a matured loan against a lender who still held the collateral for an unexecuted settlement.

    Seen in 1 report
  8. The contract matches user-supplied minimum amounts to a mutable list order without binding them to token addresses.

    Seen in 1 report
  9. The contract measures balance changes during the transaction and ignores any pre-existing ETH balance.

    Seen in 1 report
  10. The contract measures received amount via WETH balance when the output is ETH but never wraps native ETH.

    Seen in 1 report
  11. The contract measures time in block counts instead of block timestamps.

    Seen in 1 report
  12. The contract mints the NFT to itself and calls safeTransferFrom without approving itself.

    Seen in 1 report
  13. The contract only refunds the Aura token after burning the position, ignoring other reward tokens transferred to it.

    Seen in 1 report
  14. The contract passes the caller address to the router instead of the caller-supplied destination parameter.

    Seen in 1 report
  15. The contract queries ownerOf for every loan without handling a burned token, so one burned NFT blocks all paths.

    Seen in 1 report
  16. The contract reads raw total supply assets and shares from Morpho storage instead of the interest-adjusted expected assets when computing the maximum withdrawable amount.

    Seen in 1 report
  17. The contract reads the penalty fee from current settings at cancellation time instead of storing the fee that applied at listing.

    Seen in 1 report
  18. The contract records the full bid but only transfers the amount needed to cover existing liens.

    Seen in 1 report
  19. The contract records the nominal collateral amount instead of the actual received balance.

    Seen in 1 report
  20. The contract refunds excess native currency minus one wei and has no function to withdraw the remainder.

    Seen in 1 report
  21. The contract relied on a single token address to identify and block a token, which is insufficient for tokens that have multiple addresses.

    Seen in 1 report
  22. The contract relies on the square root price limit for slippage, but that parameter stops the swap early instead of reverting.

    Seen in 1 report
  23. The contract required primary and secondary oracle prices to straddle the trigger and reverted otherwise.

    Seen in 1 report
  24. The contract required the cumulative claimed amount to be zero before allowing a claim, blocking claims across different epochs.

    Seen in 1 report
  25. The contract required the two oracle prices to straddle the trigger price, so when both were worse than the trigger, the order reverted instead of executing at the trigger price.

    Seen in 1 report
  26. The contract requires a non-zero pool address but provides no way to set it.

    Seen in 1 report
  27. The contract requires exact equality between the penalty-adjusted repayment and a debt that increases every second, with no tolerance or clamping for small overpayments.

    Seen in 1 report
  28. The contract reset the last sender to the zero address before a possible refund, so the refund to the proxy reverted.

    Seen in 1 report
  29. The contract reverts unconditionally when unclaimed periods exceed a cap instead of batching claims or offering a recovery path.

    Seen in 1 report
  30. The contract sets a flag on an out-of-bounds price but does not store the new price, so clearing the flag leaves the stale price.

    Seen in 1 report
  31. The contract sets a non-zero allowance without first resetting an existing non-zero allowance to zero.

    Seen in 1 report
  32. The contract sets an allowance to maximum without first resetting it to zero.

    Seen in 1 report
  33. The contract snapshots the total balance for payout calculation only once at closing and does not adjust it when deposits are later refunded, allowing a temporary deposit to inflate the prize pool.

    Seen in 1 report
  34. The contract stores a fixed amount of a rebasing token instead of its shares, so the recorded amount does not adjust when the token's balance changes.

    Seen in 1 report
  35. The contract stores the initial deposit amount and uses that fixed value for withdrawals, ignoring balance changes from rebasing.

    Seen in 1 report
  36. The contract tracked deposited assets per receiver only on deposit and never adjusted that record when shares were transferred, so the profit calculation assumed a zero cost basis for anyone who acquired shares by transfer.

    Seen in 1 report
  37. The contract treats the total of held plus invested assets as spendable balance without first pulling funds back from the strategy.

    Seen in 1 report
  38. The contract tries to transfer a non-transferable stash token directly instead of converting it first.

    Seen in 1 report
  39. The contract trusted lender-supplied trade data and only checked that the bought amount was non-zero.

    Seen in 1 report
  40. The contract trusted return data from an externally called contract instead of only checking call success.

    Seen in 1 report
  41. The contract trusted the return value of an external claim call and added it to totalCollateral without verifying that the corresponding tokens were actually received.

    Seen in 1 report
  42. The contract updated its balance snapshot even when a withdrawal could be satisfied without liquidating the yield asset, double-counting the withdrawal and understating holdings.

    Seen in 1 report
  43. The contract used a greater-than-or-equal check on msg.value instead of requiring exact equality, and it never refunded the excess.

    Seen in 1 report
  44. The contract used a safe transfer that requires the ERC721 receiver callback without checking the asset actually supports ERC721.

    Seen in 1 report
  45. The contract used a try/catch pattern where the catch block (cancellation) was paid and executed even if the try block failed due to out-of-gas, and the gas supplied was not checked to ensure enough for the try block to succeed.

    Seen in 1 report
  46. The contract used plain transfer and transferFrom interfaces instead of a safe wrapper tolerant of non-returning tokens.

    Seen in 1 report
  47. The contract used safeTransferFrom to move tokens it already owned instead of transfer.

    Seen in 1 report
  48. The contract used the current price from a price feed oracle for delayed orders instead of the historical price from the archive oracle.

    Seen in 1 report
  49. The contract used the standard interface directly without checking return values or handling tokens with missing return values.

    Seen in 1 report
  50. The contract used the user-supplied deposit amount instead of measuring the actual balance change.

    Seen in 1 report