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.
-
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
-
The default check bypasses the grace period and does not compare against the first payment due date.
Seen in 1 report
-
The default claim function deletes loan data without first processing unclaimed tokens.
-
The default claim function does not check that each loan's lender is the calling contract.
-
The default reverse lookup allowed mismatches and kept only the name string, discarding the match result, so inherited default names were treated as verified.
-
The defaults setter assigns values without validating their relationships or ranges.
Seen in 1 report
-
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.
-
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
-
The degraded-mode check compares raw effective assets with maximum liability without counting collectible losses of open positions as backing.
-
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.
-
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.
-
The delay check only blocks opening and closing in the same transaction, not opening two opposite positions at different prices.
Seen in 1 report
-
The delay is measured with block.number, which does not advance predictably per transaction on Arbitrum and Optimism.
Seen in 1 report
-
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
-
The delayed order function submits only the current trade's size delta instead of including the accumulated queued size.
Seen in 1 report
-
The delayed swap calculation used the maximum of loan requirement and credit value instead of subtracting the credit.
Seen in 1 report
-
The delegate function accepts the zero address as a target and moves the delegate balance to it.
Seen in 1 report
-
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
-
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
-
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
-
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
-
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
-
The delegation function iterates input arrays without checking that token IDs are unique.
-
The delete action mishandled posts pending approval in groups with post-approval enabled.
Seen in 1 report
-
The delete and clear methods on a frozen Hash did not check the frozen flag before modifying it.
Seen in 1 report
-
The delete flow confuses display name and slug when two groups share a slug.
Seen in 1 report
-
The delete function lacks a check preventing deletion of outputs older than the finalisation period.
Seen in 1 report
-
The deletion endpoint performs no re-authentication and relies solely on the bearer token.
Seen in 1 report
-
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
-
The deletion page checks group ownership only on initial load and does not re-validate before deletion.
Seen in 1 report
-
The deletion process does not remove secondary email addresses from the database, leaving them tied to the deleted account.
-
The deletion routine flags or removes the account but does not invalidate existing session tokens.
Seen in 1 report
-
The deleverage function lacked the enabled-flag check that other vault account functions had.
Seen in 1 report
-
The deliver function transfers epoch rewards but never zeroes the stored per-epoch amount, allowing repeated transfers.
-
The dependency sync updates contract references without revoking old approvals and granting new ones.
Seen in 1 report
-
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
-
The deployment modifier uses inclusive comparisons for the rate bounds instead of exclusive ones.
Seen in 1 report
-
The deployment salt is derived only from name and symbol and the caller becomes owner without binding to signed metadata.
Seen in 1 report
-
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.
-
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
-
The deposit amount is not scaled from the token's decimals to the internal accounting format before allocation.
-
The deposit and mint functions accept no minimum shares or maximum assets, so users have no slippage protection.
-
The deposit and mint functions lack a minimum output parameter to guarantee the user receives a minimum number of shares.
Seen in 1 report
-
The deposit and withdraw functions were implemented without the logic to interact with the lending market despite documentation claiming otherwise.
Seen in 1 report
-
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
-
The deposit call data generator omits an ERC20 approve call before the cToken mint, relying on pre-existing approvals.
Seen in 1 report
-
The deposit call passes zero as the minimum output instead of calculating a bound.
Seen in 1 report
-
The deposit call uses a minimum-shares-out of zero and never verifies shares received.
Seen in 1 report
-
The deposit call uses the newly redeemed amount instead of the full requested amount, so pre-existing ETH is not converted.
-
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