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 close planner folds the execution fee into the net rebate and caps the treasury-eligible fee by withheld cash, which is zero on a rebate close.
Seen in 4 reports
-
Commit reserves only the margin delta and a capped bounty, while execution-time fees and reserves are drawn from free settlement that the withdrawal guard never re-checks.
Seen in 4 reports
-
Deposit logic assumed the full amount was transferred and credited it, without measuring the actual balance change for fee-on-transfer tokens.
Seen in 4 reports
-
LP and synth values were derived from the instantaneous AMM spot price instead of a manipulation-resistant source.
Seen in 4 reports
-
The NAV used for deposit pricing omits the guaranteed rebate reserve that the pool will collect.
Seen in 4 reports
-
Post-trade bounds and leverage limits are re-checked against live margin at execution rather than margin recorded at commitment.
Seen in 4 reports
-
Protection validation reads the oracle's accepted live basket, which enforces publish order against the engine mark, while order fills advance the engine mark without advancing that basket.
Seen in 4 reports
-
Servers trust identifiers, prices or email addresses supplied by the client instead of re-deriving them.
Seen in 4 reports
-
State fields such as plot identifier, dirty flag, locker address and loan status are not updated or cleared when a position moves or closes.
Seen in 4 reports
-
The add-level function never sets the boost price per block, and the only setter is a one-time reinitialiser or is not exposed.
Seen in 4 reports
-
The basket publish time was changed from oldest to newest component time but the reuse coverage check still compares every stored feed against the newest time.
Seen in 4 reports
-
The boolean return value of transfer and transferFrom was not checked.
Seen in 4 reports
-
The bootstrap branch assigns the Senior high-water mark instead of raising it, and a second function repeats the assignment under a weaker condition.
Seen in 4 reports
-
The claimable calculation reads the live global cap factor for every historical epoch instead of storing the factor that applied per epoch.
Seen in 4 reports
-
The commission claim reuses an active-token check meant for new accrual, blocking claims for already-accrued balances.
Seen in 4 reports
-
The commission claim validates the token against the current active reward token list instead of a historical registry of tokens that were ever reward tokens.
Seen in 4 reports
-
The enable token function assigns a brand-new sale struct to storage, overwriting the sold count and total for sale instead of merging them.
Seen in 4 reports
-
The equity used to price LP shares includes positive price impact collected on an open without reserving the rebate the still-open position can later reclaim.
Seen in 4 reports
-
The ERC20 transfer hook is never overridden to move or create stake records, so lock metadata and share balances drift apart.
Seen in 4 reports
-
The fee function returns the full calculated fee even when only a smaller amount, often zero, was actually deducted from the account.
Seen in 4 reports
-
The fee is deducted from the borrower but the payout is gated on the post-seizure remaining collateral balance rather than on the fee already being available.
Seen in 4 reports
-
The global MYT shares counter is not decremented in forced repay, fee resolution and liquidation paths.
Seen in 4 reports
-
The insolvency trigger compares cash against a worst-case liability bound without netting the offsetting leg, and the latch is sticky and owner-only.
Seen in 4 reports
-
The limiter keys on a client-supplied forwarding header or on the raw unnormalised identifier instead of a trusted source address.
Seen in 4 reports
-
The liquidation repay routine decrements the per-account earmarked balance but omits the matching decrement of the global cumulative earmarked counter that the normal repay path performs.
Seen in 4 reports
-
The maximum views convert the whole deposit limit to shares and subtract supply instead of converting the remaining asset capacity, and they skip the rounding and zero-share checks the execution paths apply.
Seen in 4 reports
-
The open/increase reservation path records carryCollectedAssets as zero even though carry is checkpointed and debited in the same call, so the bound checks never see it.
Seen in 4 reports
-
The pending amount is tracked by adding the requested amount and subtracting the received amount, which diverge when the rebasing stETH balance changes between request and claim.
Seen in 4 reports
-
The pending claimant bucket cap counts the whole distributable balance including assets already attributed to senior principal, so a no-inflow settlement consumes the residual.
Seen in 4 reports
-
The permissionless retry shares the same latched, no-pending state as the owner-only amendment, with no owner priority interval or cumulative retry bound.
Seen in 4 reports
-
The permissionless retry shares the same required state as the owner-only amend but has no owner check or grace period, so a third party can move the protection out of the amendable state first.
Seen in 4 reports
-
The poke function reuses the internal vote logic that accrues rewards but lacks the once-per-epoch restriction that the vote function has.
Seen in 4 reports
-
The poke path accrues rewards on every call without recording that the epoch's reward was already granted, and lacks the once-per-epoch guard the vote function has.
Seen in 4 reports
-
The redemption request function accepts an arbitrary controller without consent, and the no-ID claim calls only inspect the first refundable request in the controller queue.
Seen in 4 reports
-
The request function authenticates only the share owner and accepts any non-zero controller, while claim functions consume each controller's queue strictly from the head.
Seen in 4 reports
-
The request function authorises the share owner rather than the named controller, and a full-balance request skips the minimum size check, so a stranger can plant a guaranteed non-claimable head in another LP's queue.
Seen in 4 reports
-
The retry entry point is permissionless and re-queues an attempt with unchanged stored limits, so a third party can keep the protection out of the Latched state.
Seen in 4 reports
-
The retry function has no owner check, delay or caller priority and can run atomically with the relatch, so the Latched state is never observable to the owner.
Seen in 4 reports
-
The role check was applied unconditionally, including on revocation, so revocation fails once the role is gone.
Seen in 4 reports
-
The settleable recap bucket is capped by the full distributable rather than by backing not already assigned, so a second pass subtracts value already credited to Senior.
Seen in 4 reports
-
The stored Transmuter balance pointer was advanced to the full current balance even when only part of the cover had been consumed.
Seen in 4 reports
-
The strategy inherited a reward-claiming interface but left the claim function empty and never called the distributor.
Seen in 4 reports
-
The sync trie hashes handlers did not track or deduplicate voters, so one node could inflate a hash's vote count.
Seen in 4 reports
-
The transfer flow mixed a raw name for owner lookup and display with a normalised label for permission checks and token ID derivation.
Seen in 4 reports
-
The treasury address was folded into the committed configuration preimage and re-checked against the live value at execution, so a legitimate rotation voided valid orders.
Seen in 4 reports
-
The validator returns success early when the parent state lookup fails, and treats a zero expected root as matching.
Seen in 4 reports
-
Withdraw fails to decrease total voting and does not write a voting checkpoint, so repeated poke calls inflate the denominator used for bribe rewards.
Seen in 4 reports
-
A missing return statement in one branch makes a successful transfer report failure.
Seen in 3 reports
-
A single mutable global factor computed the per-epoch claim cap for all past epochs, so changing it retroactively altered historical entitlements.
Seen in 3 reports
-
Accounting and share minting use the requested transfer amount rather than the actual balance increase.
Seen in 3 reports