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 liquidation path does not apply the frozen close spread, and the withdrawal guard only checks price health, so a solvent winner can empty its carry sources and become liquidatable.
-
The liquidation path pays a keeper bounty and waives charges without checking whether the caller is the position owner.
-
The liquidation path previews seizable collateral before accruing accumulated earnings.
-
The liquidation path repays at maturity with discounting disabled, skipping conversion of unassigned earnings into the accumulator.
-
The liquidation path transfers the internal scaled collateral amount directly instead of converting it with the token scale, unlike deposit and withdraw.
-
The liquidation path updated per-account balances but omitted decrementing the global deposit-cap counters.
Seen in 1 report
-
The liquidation payout was computed from the proportion of one debt token repaid instead of the proportion of total debt value repaid.
-
The liquidation penalty was computed from the position's full value instead of the debt amount, so the fee shrank as collateral fell below debt.
-
The liquidation permission function lacks a special case for deprecated markets, so it always requires the market to be listed and the borrower to have a shortfall.
Seen in 1 report
-
The liquidation process does not lock the counterparty's funds or prevent deallocation while a liquidation is in progress.
-
The liquidation routine reduced the user's position but never decreased the bank's total lent counter.
Seen in 1 report
-
The liquidation share allocation calls the share calculation with the deposit rounding direction, subtracting one and failing the share price validation.
-
The liquidation signature omits nonces for both parties so it does not become invalid when their states change.
-
The liquidation surcharge was calculated on the uncapped collateral amount instead of the actual collateral to liquidate, leading to an underflow when the price dropped drastically.
Seen in 1 report
-
The liquidator chooses which collateral to seize and the post-liquidation health check does not prevent repeated liquidations below the intended threshold.
-
The liquidator claim function did not call settleAuction, so the collateral token and its associations were not burned or removed.
Seen in 1 report
-
The liquidator was paid in underlying tokens without ensuring the contract held enough of them.
Seen in 1 report
-
The liquidator's share is set to zero when the account's loss exceeds the liquidation fee.
-
The liquidity removal required remaining reserves above a dust threshold, blocking full collateral withdrawal during liquidation when only one borrower existed.
Seen in 1 report
-
The liquidity spread validation returns early when net liquidity is zero even if total liquidity is positive, skipping the premium update.
Seen in 1 report
-
The listing count is decremented before the checkpoint, so the utilisation rate is wrong.
Seen in 1 report
-
The listing does not store fee values at creation time, so purchase reads whatever fee the plan currently has.
Seen in 1 report
-
The listing update function allows changing the denomination while bids are active, and refunds use the current denomination rather than the bid's original one.
-
The loan creation function set the rollable flag to true by default.
Seen in 1 report
-
Medium
-
-
The location edit endpoint lacks server-side authorisation on the location identifier.
Seen in 1 report
-
The lock amount was transferred in the calling function and again inside the NFT creation function.
Seen in 1 report
-
The lock condition checks whether the delegate has an active proposal or has voted, which a malicious delegate can keep true.
Seen in 1 report
-
The lock function does not check whether the caller is an externally owned account.
Seen in 1 report
-
The lock function only checkpoints voting power when a delegatee is set.
Seen in 1 report
-
The lockCapital function iterates over active protections without first calling the function that accrues premium and expires protections, and the inner functions also lack expiration checks.
-
The locked-collateral variable is capped but the actual token transfer and shares-deposited variable are not.
-
The locker calls safeTransferFrom internally rather than externally, so the sender stays the user instead of the locker and the authorisation check fails.
Seen in 1 report
-
The locking function did not restrict which contracts could lock tokens on behalf of users.
Seen in 1 report
-
The lockout counter is keyed to the client IP address rather than the targeted user account.
Seen in 1 report
-
The lockout was keyed only to the account identifier and could be triggered by unauthenticated requests, with no rate limiting or extra verification.
Seen in 1 report
-
The login endpoint relied solely on per-IP rate limiting with no account-based lockout or pre-authentication challenge.
Seen in 1 report
-
The login form did not validate the format of the email or password fields, allowing any string to be used as credentials.
Seen in 1 report
-
The lookbehind window for nominee checkpoints was shorter than the maximum lock period, discarding history too early.
Seen in 1 report
-
The loop bound used the owner count minus one, so the final owner index was never examined.
Seen in 1 report
-
The loop broke instead of continuing when the amount to withdraw from a provider was below the minimum pull.
Seen in 1 report
-
The loop checks the page counter after processing and increments it after the check, so it runs for extra pages beyond the configured maximum.
-
The loop condition compared an absolute array index against a relative pending count.
-
The loop condition exited before the insufficient-tranche handler ran for remaining tranches, skipping the manager notification.
-
The loop reused the single message value for every iteration instead of tracking how much had already been sent.
-
The loop used a strict greater-than comparison instead of continuing until the value was strictly below the threshold.
Seen in 1 report
-
The loss calculation assumed amounts were in the native token but was given stable-asset amounts, and the result was paid without conversion.
Seen in 1 report
-
The loss calculation ignored the slip adjustment applied to asymmetric deposits.
-
The loss calculation relies on spot reserves that can be manipulated within one transaction.
Seen in 1 report
-
The loss calculation subtracts the repayment from total debt including accrued interest instead of from principal debt only.
Seen in 1 report
-
The loss check compared redeemed ETH against the original requested amount instead of the capped amount actually redeemed.