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.
-
A refundable charge paid at open is booked as LP revenue with no matching refund liability in NAV.
Seen in 47 reports
-
The batch cache reuse path checks each stored feed against the basket's newest component time instead of each feed's own publish time.
Seen in 32 reports
-
The balance snapshot meant to be the pre-withdrawal baseline is taken after the withdrawal call, so the delta is always zero.
Seen in 30 reports
-
The route loader derives two different names from one URL parameter, using the normalised form for eligibility and expiry checks and the raw lowercased form for the transaction argument.
Seen in 30 reports
-
Capacity is read from a period-start asset checkpoint instead of the live vault balance, so mid-period payouts are invisible.
Seen in 17 reports
-
The helper computing time since epoch reads the live block timestamp instead of the timestamp argument passed by the caller.
Seen in 16 reports
-
The elapsed-time helper reads the current block timestamp instead of the timestamp argument passed to the period lookup.
Seen in 15 reports
-
The retry entrypoint is permissionless and re-queues a child order with the owner's stale limits, while the owner-only amendment requires the latched state with no pending orders, so the amendable state can be consumed atomically.
Seen in 14 reports
-
The contract reduces totalSupply at the start of unstaking while the tokens stay in the contract, so balance minus totalSupply overstates the surplus.
Seen in 13 reports
-
The ended-delegation branch uses a strict greater-than comparison against the next claimable period, so the equality case falls through to the active branch.
Seen in 13 reports
-
The force repay function omits the global cumulative earmarked decrement that the normal repay function performs.
Seen in 13 reports
-
The checkpoint library overwrites on an equal timestamp key and payout reads it with an inclusive lookup.
Seen in 12 reports
-
Rescue sets a terminal claimed marker on periods that are still open, and no path ever clears it.
Seen in 12 reports
-
The success boolean returned by the low-level native transfer call was ignored, so failed transfers did not revert.
Seen in 12 reports
-
The fee helper caps the deduction from the borrower's collateral but returns the uncapped nominal fee, so the shortfall comes from pooled funds.
Seen in 11 reports
-
The LP net asset value snapshot counts refundable positive VPI as revenue but omits the matching refund liability, and excludes the negative-VPI reserve that is certain to return to the pool.
Seen in 11 reports
-
The NAV snapshot counts collected positive VPI as final revenue without a reserve for the rebate the same position can reclaim on close, and omits the locked rebate reserve as a receivable.
Seen in 11 reports
-
The zapper sends leftover tokens to the immediate caller (the staking contract) instead of the original user's receiver address.
Seen in 11 reports
-
A timestamp-keyed checkpoint overwrites the latest entry when a new write shares the same timestamp, so a historical period-start value stays mutable within the boundary block.
Seen in 10 reports
-
Code trusts the requested transfer amount instead of measuring the balance change after the transfer.
Seen in 10 reports
-
Positive virtual price impact is booked as revenue and cash without a matching refundable liability, so redemptions priced while that cash is present pay out more than a fair share.
Seen in 10 reports
-
The forced-repayment and liquidation paths omit the global counter decrements that the normal repay and burn paths perform.
Seen in 10 reports
-
The jackpot check compares the stored streak count instead of the newly computed streak.
Seen in 10 reports
-
The liquidation and forced-repay paths transfer shares out without decrementing the deposited-shares ledger that other paths update.
Seen in 10 reports
-
The miner fee branch calls a raw balance increase without the record_transfer call that creates a spendable ZK-tree leaf.
Seen in 10 reports
-
The reward recipient is set to a vault or strategy contract that has no function to manage or transfer the reward token.
Seen in 10 reports
-
The transfer check required both sender and receiver to be whitelisted, but the zero address used for burns cannot be whitelisted.
Seen in 10 reports
-
The pending recapitalisation bucket is capped against total distributable equity without subtracting capital already allocated to the tranches, so it is counted twice.
Seen in 9 reports
-
The global deposited-shares counter is not decremented when shares leave during liquidation or forced repayment.
Seen in 9 reports
-
The owner-only amendment requires the Latched state with no pending orders, while the permissionless retry moves the protection to Triggered with a live child, so any caller can consume the only state the owner needs.
Seen in 9 reports
-
Reward surplus was derived from contract token balance minus totalSupply, but totalSupply dropped at unstake time while the tokens stayed in the contract until vesting ended.
Seen in 8 reports
-
The rescue function sets the per-period claimed flag on the source account even though it already moved the shares, and nothing clears that flag on unblock or on a new withdrawal request.
Seen in 8 reports
-
The retry entry point is permissionless and free while the owner's amend path requires a Latched state with no pending orders, so an attacker can atomically terminalise and re-queue an attempt.
Seen in 8 reports
-
The retry function has no owner check and moves the protection from latched back to triggered, while the owner-only amendment requires latched with an empty queue.
Seen in 8 reports
-
A fallback written for granting roles is reused by transaction-building callers, so a missing address record silently resolves to the registry owner rather than aborting.
Seen in 7 reports
-
The NAV snapshot counts refundable positive VPI as equity with no signed liability term, while only the negative branch is reserved.
Seen in 7 reports
-
Outflow paths such as force repay and liquidation transfer yield tokens out without decrementing the deposited shares counter, unlike withdraw and redeem.
Seen in 7 reports
-
Refundable VPI charges are booked as ordinary revenue and included in LP equity and redemption pricing without recording the offsetting obligation to refund them on close.
Seen in 7 reports
-
The batched distribution read live balances and recalculated the effective total supply per batch instead of using a snapshot fixed at the start.
Seen in 7 reports
-
The bootstrap deposit quote omits the check that rejects pricing when total assets are zero but share supply is non-zero, causing division by one and multiplication by the entire surviving supply.
Seen in 7 reports
-
The contract uses the transfer amount to calculate shares instead of checking the actual balance change.
Seen in 7 reports
-
The duplicate check compared the incoming code only against the most recently applied code instead of all applied promotions, and the total discount was not capped.
Seen in 7 reports
-
The exit path removes a delegation's effective stake in both the exit request and unstake or delegate, without tracking that it was already removed.
Seen in 7 reports
-
The leaf hash commits a floor-divided amount while the recorder accepts any non-zero credit, so sub-quantum remainders are never committed.
Seen in 7 reports
-
The period-start exposure is stored at the period-start timestamp and read with an inclusive lookup, so any flow in that boundary second rewrites the opening snapshot.
Seen in 7 reports
-
The server trusted a client-supplied price field instead of looking up and recalculating the price from product data.
Seen in 7 reports
-
The swap helper refunded leftover tokens to the immediate caller (the staking contract) rather than the original user, and the staking contract had no way to forward or recover them.
Seen in 7 reports
-
The withdrawal request function does not check the claimed mapping before burning shares and crediting a payout.
Seen in 7 reports
-
A freshness check calls the oracle price view, which enforces publish ordering against the engine mark, before evaluating the fallback meant to accept an accepted basket older than the mark.
Seen in 6 reports
-
Distribution reads live balances per batch instead of a snapshot and does not record which addresses were already paid.
Seen in 6 reports