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 5,201 to 5,250 of 5,700
  1. The total collateral ratio check was only performed once before the redemption loop, not on each iteration.

    Seen in 1 report
  2. The total debt check ran before the new lien was appended to the liens array, so it ignored the new lien.

    Seen in 1 report
  3. The total locked collateral was reduced by the collateral transferred out instead of being scaled by the same debt-proportion factor used elsewhere.

    Seen in 1 report
  4. The total net cost calculation included the full borrowing fee amount even though the fee receiver's portion was already included separately, causing double counting.

    Seen in 1 report
  5. The total royalty was incremented without checking the recipient was non-zero while the transfer was skipped.

    Seen in 1 report
  6. The total supply function read the contract's own entry in the token balance mapping rather than its native currency balance.

    Seen in 1 report
  7. The total value of all shares was calculated but not divided by total token supply.

    Seen in 1 report
  8. The total-contracts-sold variable was reset to zero on each withdrawal instead of persisting.

    Seen in 1 report
  9. The total-value helper used a stale internal accumulator of shares rather than the contract's live balance, double counting shares moved during liquidation.

    Seen in 1 report
  10. The totalRewardUnits variable was not decremented when an observer's reward was decremented for voting against the majority.

    Seen in 1 report
  11. The tradability state setter did not verify spot price against the oracle before allowing a state that disabled swapping but permitted removal.

    Seen in 1 report
  12. The trade end timestamp was set to the auction end and not reset on early settlement.

    Seen in 1 report
  13. The trade functions did not subtract hedging fees from used funds after hedging added them, so the fees were double-counted.

    Seen in 1 report
  14. The trade size calculation read instantaneous AMM pool reserves instead of using a manipulation-resistant oracle.

    Seen in 1 report
  15. The trade type was read from user input instead of being hardcoded to the single exact-in variant, so the caller could flip the direction of the trade.

    Seen in 1 report
  16. The trading module revoked the sell token allowance after every swap, and a user could pick the same pool as the strategy, zeroing its infinite allowance.

    Seen in 1 report
  17. The transaction hash did not include the execution time, so identical calls produced the same hash.

    Seen in 1 report
  18. The transaction ID hash omitted the application priority while block ordering compared priority before ID, so duplicate IDs could coexist.

    Seen in 1 report
  19. The transaction object cached priority gas price and cost on first executability and never recomputed them when the base fee changed.

    Seen in 1 report
  20. The transaction origin address was used instead of the immediate caller address when emitting the event.

    Seen in 1 report
  21. The transaction pipe returned the committed sequence number from global state instead of the highest used sequence number, so the replay check used a stale value after cleanup.

    Seen in 1 report
  22. The transaction was added to the mempool before the send operation, with no rollback if the send failed.

    Seen in 1 report
  23. The transfer call used the underlying token address instead of the principal token address.

    Seen in 1 report
  24. The transfer code unconditionally decoded a boolean return value, which failed when the token returned no data.

    Seen in 1 report
  25. The transfer endpoint did not validate that the amount was positive, so a negative value reversed credit and debit.

    Seen in 1 report
  26. The transfer function checked only the grantor's remaining unclaimed amount, so moving the amount to the vesting manager blocked reallocation from the original grantor.

    Seen in 1 report
  27. The transfer function checked the contract's own balance instead of the sender's balance.

    Seen in 1 report
  28. The transfer function compared the raw free balance to zero instead of the price-adjusted value of the transferred amount.

    Seen in 1 report
  29. The transfer function deducted a fee from the sender before checking that the total amount including the fee was within the allowance.

    Seen in 1 report
  30. The transfer function did not call the registry to update the holding position for either the source or destination account.

    Seen in 1 report
  31. The transfer function did not check whether sender and recipient were the same, so a self-transfer credited without debiting.

    Seen in 1 report
  32. The transfer function did not verify interface support before proceeding and silently did nothing.

    Seen in 1 report
  33. The transfer function downcast the share amount to a smaller integer type than the balance store used.

    Seen in 1 report
  34. The transfer function moved votes between sender and recipient instead of their respective delegatees.

    Seen in 1 report
  35. The transfer function returned early when the recipient was already the owner, so insufficient balance was not detected.

    Seen in 1 report
  36. The transfer function skipped the real token transfer when the balance was short but still updated the internal accounting.

    Seen in 1 report
  37. The transfer function trusted tx.origin and skipped the normal approval step.

    Seen in 1 report
  38. The transfer function updated only the creator field and left royalty target and fee route unchanged.

    Seen in 1 report
  39. The transfer handler trusted a user-supplied fee field and transferred it from the recipient without validating it against any limit or actual cost.

    Seen in 1 report
  40. The transfer helper checked ERC721 support before ERC1155, so dual-interface tokens were handled as single-item ERC721.

    Seen in 1 report
  41. The transfer helper returned the input amount instead of the actual shares received.

    Seen in 1 report
  42. The transfer hook added recipients to the holders array based only on zero balance, without checking the amount or excluding the zero address.

    Seen in 1 report
  43. The transfer hook checked the from address even when burning to the zero address.

    Seen in 1 report
  44. The transfer hook did not skip the cooldown reset when sender and receiver were the same address.

    Seen in 1 report
  45. The transfer hook skipped fee caching for the pair address, so LP tokens minted to the pair left debts uninitialised.

    Seen in 1 report
  46. The transfer hook updated user rewards but not the global reward accumulator before balances changed.

    Seen in 1 report
  47. The transfer hook used pending rewards with the fresh flag off, skipping the global index update.

    Seen in 1 report
  48. The transfer logic failed to adjust the vault's total supply balance when the recipient was the sponsorship address.

    Seen in 1 report
  49. The transfer override omitted buy order contracts from the allowed set.

    Seen in 1 report
  50. The transfer overrides ignored approved addresses, deviating from the token standard.

    Seen in 1 report