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,051 to 2,100 of 5,700
  1. The burn used total contract balances including accrued fees instead of reserves.

    Seen in 1 report
  2. The buy function allows the purchase price to be set below total contributions.

    Seen in 1 report
  3. The buy function did not check that input and output assets differed, so the swap maths returned a near-zero input.

    Seen in 1 report
  4. The buy function does not accept or enforce a minimum output parameter.

    Seen in 1 report
  5. The buy function lacks access control for private parties and the final price can be inflated by unclaimable donations.

    Seen in 1 report
  6. The buy function never compares the current timestamp with the sale's end time.

    Seen in 1 report
  7. The buy function omitted a check on the islisted flag before processing a purchase.

    Seen in 1 report
  8. The buy function only checks that the new item count does not exceed the final count, so a zero-quantity buy after the sale still runs the payout branch.

    Seen in 1 report
  9. The buy function reverts instead of handling a purchase that would exceed the final ID, letting an attacker block others.

    Seen in 1 report
  10. The buy function transfers the NFT before collecting payment, creating a callback window.

    Seen in 1 report
  11. The buy token variable was overwritten with the plain staked token address, so the wrapping branch never ran.

    Seen in 1 report
  12. The buy-for-another-user path updates the same last-trade timestamp used for the seller's lock.

    Seen in 1 report
  13. The buyout check requires a minimum duration increase that is incompatible with short-duration liens.

    Seen in 1 report
  14. The buyout does not reset the lien's payee field to zero or to the new owner.

    Seen in 1 report
  15. The buyout flow burns the old lien and decreases the vault slope but creating the new lien does not increase it.

    Seen in 1 report
  16. The buyout path only decreases the selling vault's open-lien count and never increments the buying vault's count.

    Seen in 1 report
  17. The buyout start did not specify which fractions to take and took all held fractions.

    Seen in 1 report
  18. The buyout transfers the lien without calling the function that decrements the vault's per-epoch lien counter.

    Seen in 1 report
  19. The buyout updates lien terms but does not adjust the public vault's slope.

    Seen in 1 report
  20. The byte slice length was calculated as end index minus start index, omitting the plus one.

    Seen in 1 report
  21. The cache guard uses a membership test instead of checking that the previous transaction is the immediate predecessor in the cached order.

    Seen in 1 report
  22. The cache key for the inclusion-proof check omits the KZG commitments, so results are reused across sidecars with different commitments.

    Seen in 1 report
  23. The cached last file-choose event was not reset on cross-document navigation.

    Seen in 1 report
  24. The cached previous agent id is never updated inside the loop, so the cached address can be stale or uninitialised.

    Seen in 1 report
  25. The cached stored total assets does not include unlocked rewards from the current cycle, so subtracting a withdrawal causes an underflow.

    Seen in 1 report
  26. The cached total value was not refreshed before calculating LP tokens on deposit.

    Seen in 1 report
  27. The Cairo callback uses an assert for handler validation, which reverts on failure, whereas the Solidity version returns false.

    Seen in 1 report
  28. The Cairo implementation of the settlement function omits the input validation present in the Solidity version.

    Seen in 1 report
  29. The calculated tree root hash is never assigned to the named storage root return value, so the function always returns nil.

    Seen in 1 report
  30. The calculation divided by a power of ten based on decimals without checking the token had at most 18.

    Seen in 1 report
  31. The calculation of the current position omits the queued pending size delta.

    Seen in 1 report
  32. The calculation of the deduction incorrectly divides by the share instead of multiplying.

    Seen in 1 report
  33. The calculation sums all pool reserves without separating protocol-owned shares from user deposits.

    Seen in 1 report
  34. The calendar override is keyed to whole UTC days with no way to set intraday start or end times, so it cannot match New York-aligned feed closures.

    Seen in 1 report
  35. The calendar setter never validates that the combined weekend and holiday override freeze window fits inside the maximum allowed mark staleness.

    Seen in 1 report
  36. The callback endpoint accepted unauthenticated requests that replaced merchant settings with attacker-controlled values.

    Seen in 1 report
  37. The callback functions only update transaction status on failure and do not return locked or burned tokens to the sender.

    Seen in 1 report
  38. The callback paid out immediately without handling a reverting recipient, allowing forced retries.

    Seen in 1 report
  39. The callback reports only the quote token amount and omits the excess quote token used to cover rounding.

    Seen in 1 report
  40. The caller passed the account's current sequence number to commit_transaction instead of one less, so cleanup deleted the current transaction too.

    Seen in 1 report
  41. The caller trusts the swapped amount returned alongside an error instead of resetting it.

    Seen in 1 report
  42. The caller's address is used as the refund address without checking whether it is a contract that can handle refunds on the other chain.

    Seen in 1 report
  43. The caller-supplied amount is used as the source of truth across transfer, cap validation and minting instead of measuring the post-transfer balance delta.

    Seen in 1 report
  44. The callLoan function calculates late fees only on the current overdue period, not on all missed payment intervals.

    Seen in 1 report
  45. The campaign start time is stored but never validated as a lower bound.

    Seen in 1 report
  46. The cancel action lacks permission checks and can be used to bypass the permission check on the mark-as-paid action.

    Seen in 1 report
  47. The cancel check treats the expired state as final even though it depends on a mutable grace period.

    Seen in 1 report
  48. The cancel function did not check that the transfer's status was still on hold before cancelling and refunding.

    Seen in 1 report
  49. The cancel function does not reduce the all-vest-at state, leaving the vesting end block artificially high.

    Seen in 1 report
  50. The cancel function reads the index from the price checkpoint trace instead of the timestamp trace that indexes the requests tree.

    Seen in 1 report