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 limit calculation added the maximum daily increase to 100% before multiplying instead of using just the increase percentage.
Seen in 1 report
-
The limit check runs before the code decides whether the call adds, updates or removes a delegation.
Seen in 1 report
-
The limit check was applied only to non-whitelisted tokens, but the counter it compared against was incremented for every token, including whitelisted ones.
-
The limit checked the buyer's current balance rather than the total number purchased.
Seen in 1 report
-
The limit setter did not incorporate circulating burned OHM while the mint path did, creating a mismatch.
Seen in 1 report
-
The limit was enforced only on the sender's current balance, not on total deposited or transferred amounts.
Seen in 1 report
-
The limit was tracked per account and transfers did not carry over the used limit.
Seen in 1 report
-
The line-splitting logic handles only a few emoji sequences and fails on other multi-byte Unicode characters.
Seen in 1 report
-
Medium
-
-
The linear decrease formula coefficients were not calibrated to reach the target fee at the phase transition slot.
Seen in 1 report
-
The liquidability check uses a stale total debt shares value because the debt update function is not called first.
Seen in 1 report
-
The liquidate function capped the collateral payout to available slashable collateral without letting the caller specify a minimum acceptable amount.
Seen in 1 report
-
The liquidate function hardcodes the full minted amount as the burn amount instead of accepting a partial amount from the liquidator.
-
The liquidate function lets the caller supply arbitrary calldata for a router call, giving them execution control mid-liquidation.
Seen in 1 report
-
The liquidate function updates the individual borrow record but fails to decrement total borrows for the debt token.
Seen in 1 report
-
The liquidation and order-fee functions destructure only the price and discard the invalid boolean.
Seen in 1 report
-
The liquidation auction's price decay calculation does not account for sequencer downtime, unlike the price oracle which has an uptime check.
-
The liquidation bonus is computed from the collateral ratio minus one (the user's equity share) instead of from the debt being burned.
Seen in 1 report
-
The liquidation calculation uses an average adjust factor across all markets instead of the chosen repay and seize markets.
-
The liquidation calls the amount-owed function with interest excluded.
Seen in 1 report
-
The liquidation check compares only the original borrowed amount to the collateral value and ignores accrued interest.
Seen in 1 report
-
The liquidation check only compares the collateral-to-debt ratio after a partial liquidation without considering continued price falls.
Seen in 1 report
-
The liquidation check only ensured the closable amount was zero and did not verify that the liquidator's order reduced the position.
-
The liquidation check only verified that the liquidatee's balance increased, not that the increase came from the liquidator.
-
The liquidation check uses only the total collateral ratio including Kerosene and omits a condition that the non-Kerosene collateral value must be at least the minted amount.
-
The liquidation check was performed before the funding and borrowing state was updated, so it evaluated the position against outdated global fee factors.
Seen in 1 report
-
The liquidation code always calls the fee vault's withdraw even when the converted fee is zero, and the vault rejects zero amounts.
Seen in 1 report
-
The liquidation condition reads the current global loan term instead of a per-position term stored at creation.
Seen in 1 report
-
The liquidation converted loan tokens to debt shares with rounding down, so a non-zero repayment burned zero shares.
Seen in 1 report
-
The liquidation fee is subtracted before the safety check, and the lower bound is allowed to equal the minimum.
-
The liquidation fee reads a live, manipulable global collateralisation value derived from total deposited yield tokens.
Seen in 1 report
-
The liquidation function accepts arbitrary swap data without validating that the swap executes at a fair price or through a trusted router.
-
The liquidation function accrued only the account's interest, not the global cumulative rate.
Seen in 1 report
-
The liquidation function burns the requested debt amount without checking whether the collateral returned was capped.
Seen in 1 report
-
The liquidation function caps returned collateral at the remaining collateral without checking whether it covers the expected bonus and claim.
Seen in 1 report
-
The liquidation function did not verify the account remained sufficiently collateralised after unwrapping yield tokens.
Seen in 1 report
-
The liquidation function does not burn the remaining repaid USDO, unlike the repayment function.
-
The liquidation function does not check whether the current time is within the auction window before performing critical state updates.
Seen in 1 report
-
The liquidation function does not transfer the borrowed ETH to the lender.
Seen in 1 report
-
The liquidation function returned early with an uninitialized fee structure, so the fee receiver's portion was never calculated or paid.
-
The liquidation function reverted when the requested debt amount exceeded the maximum allowed, instead of capping the amount to the maximum.
Seen in 1 report
-
The liquidation function reverts when the spot price is more than 5% below the stored TWAP, without considering a sustained price drop.
Seen in 1 report
-
The liquidation function subtracts the repayment from the current debt without checking that the repayment does not exceed it.
-
The liquidation logic allows symbol prices to be updated between partial liquidations without restricting the number of open positions.
Seen in 1 report
-
The liquidation logic always requires burning the full debt but caps the collateral share at 100% when the collateral ratio is below 1, leaving no reward for the liquidator.
Seen in 1 report
-
The liquidation logic calculates default from the time since the last repayment instead of the payment due date.
Seen in 1 report
-
The liquidation logic does not check that the health factor improves after liquidation.
Seen in 1 report
-
The liquidation logic resets the party's allocated balance to zero without adding profits from profitable positions while still deducting losses from the counterparty.
Seen in 1 report
-
The liquidation logic values bounded Kerosene at twice the price of unbounded Kerosene but does not allow liquidators to withdraw the seized bounded tokens.
Seen in 1 report
-
The liquidation path adds the full new shortfall to the global bad debt total instead of the difference from the position's previous bad debt, while the position record is overwritten.
-
The liquidation path and the voluntary close path exit at the same frozen stored mark but assess different charges, and nothing stops an owner steering its own solvent position across the liquidation threshold.
Seen in 1 report