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,751 to 2,800 of 5,700
  1. The deduction from the account's collateral is capped but the returned fee is not, so the excess comes from the shared balance.

    Seen in 1 report
  2. The default check bypasses the grace period and does not compare against the first payment due date.

    Seen in 1 report
  3. The default claim function deletes loan data without first processing unclaimed tokens.

    Seen in 1 report
  4. The default claim function does not check that each loan's lender is the calling contract.

    Seen in 1 report
  5. The default reverse lookup allowed mismatches and kept only the name string, discarding the match result, so inherited default names were treated as verified.

    Seen in 1 report
  6. The defaults setter assigns values without validating their relationships or ranges.

    Seen in 1 report
  7. The deferral check tests for exactly-zero junior principal rather than a dust threshold, and the share quote has no cap on newly minted shares.

    Seen in 1 report
  8. The degraded mode latch is triggered by a winning payout that reduces effective assets below maximum liability and provides no escape path for matured deposit escrows.

    Seen in 1 report
  9. The degraded-mode check compares raw effective assets with maximum liability without counting collectible losses of open positions as backing.

    Seen in 1 report
  10. The degraded-mode entry helper returns early when the latch is already set, so a later item in the same batch that restores solvency never re-evaluates or normalises the bit.

    Seen in 1 report
  11. The degraded-mode latch is driven by the larger side's maximum liability, which a single trader can keep elevated by holding a losing leg open.

    Seen in 1 report
  12. The delay check only blocks opening and closing in the same transaction, not opening two opposite positions at different prices.

    Seen in 1 report
  13. The delay is measured with block.number, which does not advance predictably per transaction on Arbitrum and Optimism.

    Seen in 1 report
  14. The delay setter compares with less-than-or-equal instead of less-than, so the minimum value itself can never be configured.

    Seen in 1 report
  15. The delayed order function submits only the current trade's size delta instead of including the accumulated queued size.

    Seen in 1 report
  16. The delayed swap calculation used the maximum of loan requirement and credit value instead of subtracting the credit.

    Seen in 1 report
  17. The delegate function accepts the zero address as a target and moves the delegate balance to it.

    Seen in 1 report
  18. The delegate function added the token ID to the new delegatee's list without removing it from the previous delegatee's list.

    Seen in 1 report
  19. The delegate function lacked a check to prevent the same lock NFT from being delegated more than once, and the delegated token array had a hard limit of 500 entries.

    Seen in 1 report
  20. The delegate returns a zero weight to signal the swap path, making the terminal compute a zero token count and revert on a non-zero minimum.

    Seen in 1 report
  21. The delegates function returns the account itself when no delegatee is set, so delegating to the zero address repeatedly subtracts votes from the account's own checkpoint.

    Seen in 1 report
  22. The delegation check compares the recipient's lock end to the sender's lock end, preventing undelegation to self unless the sender extends.

    Seen in 1 report
  23. The delegation function iterates input arrays without checking that token IDs are unique.

    Seen in 1 report
  24. The delete action mishandled posts pending approval in groups with post-approval enabled.

    Seen in 1 report
  25. The delete and clear methods on a frozen Hash did not check the frozen flag before modifying it.

    Seen in 1 report
  26. The delete flow confuses display name and slug when two groups share a slug.

    Seen in 1 report
  27. The delete function lacks a check preventing deletion of outputs older than the finalisation period.

    Seen in 1 report
  28. The deletion endpoint performs no re-authentication and relies solely on the bearer token.

    Seen in 1 report
  29. The deletion endpoint relied only on the existing session cookie and did not perform a re-authentication check before the irreversible action.

    Seen in 1 report
  30. The deletion page checks group ownership only on initial load and does not re-validate before deletion.

    Seen in 1 report
  31. The deletion process does not remove secondary email addresses from the database, leaving them tied to the deleted account.

    Seen in 1 report
  32. The deletion routine flags or removes the account but does not invalidate existing session tokens.

    Seen in 1 report
  33. The deleverage function lacked the enabled-flag check that other vault account functions had.

    Seen in 1 report
  34. The deliver function transfers epoch rewards but never zeroes the stored per-epoch amount, allowing repeated transfers.

    Seen in 1 report
  35. The dependency sync updates contract references without revoking old approvals and granting new ones.

    Seen in 1 report
  36. The deployment code did not check the Curve pool version and always called lp_token(), which newer pools do not implement.

    Seen in 1 report
  37. The deployment modifier uses inclusive comparisons for the rate bounds instead of exclusive ones.

    Seen in 1 report
  38. The deployment salt is derived only from name and symbol and the caller becomes owner without binding to signed metadata.

    Seen in 1 report
  39. The deployment script licensed the WETH vault in both the KeroseneManager and VaultLicenser, and licensed the Kerosene vault in the VaultLicenser, so the same vault could be registered in both mappings.

    Seen in 1 report
  40. The deposit amount is modified by a swap before being used as the baseline for the final spread check, so the check compares against an already-reduced amount.

    Seen in 1 report
  41. The deposit amount is not scaled from the token's decimals to the internal accounting format before allocation.

    Seen in 1 report
  42. The deposit and mint functions accept no minimum shares or maximum assets, so users have no slippage protection.

    Seen in 1 report
  43. The deposit and mint functions lack a minimum output parameter to guarantee the user receives a minimum number of shares.

    Seen in 1 report
  44. The deposit and withdraw functions were implemented without the logic to interact with the lending market despite documentation claiming otherwise.

    Seen in 1 report
  45. The deposit and withdraw wrappers passed the amount straight to the ERC4626 pool without a minimum-shares or minimum-assets bound.

    Seen in 1 report
  46. The deposit call data generator omits an ERC20 approve call before the cToken mint, relying on pre-existing approvals.

    Seen in 1 report
  47. The deposit call passes zero as the minimum output instead of calculating a bound.

    Seen in 1 report
  48. The deposit call uses a minimum-shares-out of zero and never verifies shares received.

    Seen in 1 report
  49. The deposit call uses the newly redeemed amount instead of the full requested amount, so pre-existing ETH is not converted.

    Seen in 1 report
  50. The deposit check requires total assets and total supply to be both zero or both positive, but direct transfers can make assets positive while supply stays zero.

    Seen in 1 report