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 open/increase reservation path checkpoints and transfers carry but returns no accounting result, so the lifecycle book validates signed ceilings against incomplete figures.
-
The opening fee was added to the user's debt without minting the corresponding amount, creating a permanent shortfall between debt and supply.
Seen in 1 report
-
The openPositionFarm function does not distribute the ICHI rewards after burning the old position, leaving them in the contract for anyone to claim.
-
The openShort function does not update total funds to include the net fees collected from the trade.
-
The operator proposal contract did not track or refund unused ETH after calling the operator.
Seen in 1 report
-
The option price is derived from the average swap output for the given amount rather than a true time-weighted average price, so larger exercises get better prices.
-
The oracle assumed all USD feeds have eight decimals and did not normalise against the ETH feed.
-
The oracle built an artificial cumulative price from the current trade price and subtracted the same value, so the time-weighted average simplified to the spot price.
-
The oracle call passed the borrow and collateral assets in the wrong order, returning an inverted ratio.
Seen in 1 report
-
The oracle contract explicitly reverted when a price was zero, treating zero as an invalid value.
Seen in 1 report
-
The oracle prices the vault token from spot total assets and supply via a preview call that can be manipulated in one transaction.
Seen in 1 report
-
The oracle read an exchange rate that moves with total borrows, so a large borrow inflated the accrual used at redemption.
Seen in 1 report
-
The oracle returns the base-token-to-pod price instead of the paired-token-to-pod price, omitting the asset-to-share ratio.
Seen in 1 report
-
The oracle rotation copies only the policy fields to the candidate oracle and does not seed its accepted prices, basket or accepted-basket flag, so ordering guards are skipped until the first update.
-
The oracle rotation logic copies policy fields but not the per-feed accepted timestamps, leaving the new oracle without the watermark state needed to enforce ordering.
Seen in 1 report
-
The oracle setup hardcodes the second token as the mapping key and cannot handle the first token.
Seen in 1 report
-
The oracle summed foreign prices and divided by summed stable prices, weighting large prices more heavily.
Seen in 1 report
-
The oracle validation required both the primary and secondary prices to be after the order block, instead of only the secondary price.
Seen in 1 report
-
The order amount and payment checksum were not validated server-side and the retry count could be manipulated.
-
The order execution path advances the engine mark without also advancing the oracle's accepted live basket, so the publish-order check rejects the older basket.
-
The order page trusted a user-supplied currency parameter and applied it to the price without converting the amount.
Seen in 1 report
-
The order validation did not check that maker and taker fees were zero.
-
The order-checking function both verifies and consumes the nonce, so a check has a side effect.
Seen in 1 report
-
The order-sizing formula omitted the swap fee factor, so reflected passive orders were sized as if no fee applied.
Seen in 1 report
-
The origin chain does not check whether automatic deploy is enabled on the target before locking tokens.
-
The original verification token was not invalidated when the email address changed.
Seen in 1 report
-
The OTP challenge was bound to a client-supplied email parameter rather than the logged-in account's stored email.
Seen in 1 report
-
The OTP cooldown was enforced client-side only and responses revealed whether a client number existed.
Seen in 1 report
-
The OTP requirement was enforced only in the PATCH handler while the PUT handler updated the full record without that check.
Seen in 1 report
-
The OTP-sending endpoint had no server-side limit on how many requests a client could make for the same account number.
Seen in 1 report
-
The out-of-order exit reporting function updates the exited count but does not re-order the utilisation heap.
Seen in 1 report
-
The outbound transfer did not check that the call value covered submission cost and gas fees.
Seen in 1 report
-
The outlier filter uses the arithmetic mean instead of the median, so a single extreme value skews the mean and standard deviation.
Seen in 1 report
-
The output calculation for V1 pools uses a simplified formula that does not account for the constant product with fees.
Seen in 1 report
-
The output token amount is only set inside a conditional block, so it stays zero when the condition is false.
Seen in 1 report
-
The overhead formula divided a byte-denominated encoding length by a word-denominated bootloader memory constant, inflating the result by a factor of thirty-two.
Seen in 1 report
-
The overridden transfer function allows only borrow, lend and loan contracts and omits the auction contract.
Seen in 1 report
-
The override calendar marks the oracle frozen for the whole UTC day without checking whether the underlying feed is actually publishing.
Seen in 1 report
-
The owed amount is capped at one cycle's payment plus interest instead of being proportional to time owed.
Seen in 1 report
-
Medium
-
-
The owned tokens index mapping was not scoped per owner, so different owners' index entries overwrote each other.
-
The owner can swap the pool address without migrating the funds held in the old pool.
Seen in 1 report
-
The ownership function returns the stored owner without checking whether the token exists.
Seen in 1 report
-
The ownership pricing function counts pool cash after the rebate has left but omits the funded, recoverable clawback reserve, so entry NAV is understated while that reserve is locked.
Seen in 1 report
-
The page hashes an IDNA ToASCII-transformed value instead of the ENSIP-15-normalised UTF-8 name that namehash is defined over.
-
The pagination cursor is the last row's non-unique sort value and a truncated page is only logged.
-
The pair address helper omitted the extra salt values used by the custom factory, so the guard compared against the wrong address.
Seen in 1 report
-
The pallet prefix-decodes inner calls and ignores trailing bytes while the official app uses a strict decoder and treats failure as a display fallback.
-
The parameter setter updates the fee and vesting period without first calling accrue.
Seen in 1 report
-
The parent hash check only runs when the supplied value is non-zero, so a zero value skips it entirely outside genesis.
-
The parser and serialiser changed document structure on a round-trip, which can tamper with XML-based protocols.
Seen in 1 report