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 setCap function subtracted the strategy's entire balance from the vault balance instead of only the excess amount withdrawn.
Seen in 2 reports
-
The share conversion divides by total assets plus one and uses no decimals offset, so a near-zero asset balance with unchanged supply mints shares far out of proportion to the deposit.
Seen in 2 reports
-
Medium
-
Medium
-
-
The share price snapshot omits the trader reserve that will repay the rebate, so the rebate is treated as a loss until the position closes.
Seen in 2 reports
-
The share removal function ignores each deposit's unlock status, so the penalty is applied to the total withdrawal.
Seen in 2 reports
-
The solvency check compares pool cash against worst-case liability without counting the losing side's margin-backed loss, so a covered receivable is treated as a shortfall.
Seen in 2 reports
-
High -
High
-
-
The solvency check counts physical cash minus trader claims but ignores the collectible loss on the losing leg that margin fully backs.
Seen in 2 reports
-
High -
High
-
-
The solvency test used when closing a position is looser than the test used when opening one, so a close can trip the sticky degraded-mode latch without any real loss.
Seen in 2 reports
-
The strategy approved the router for only the requested allocation amount while the router's deposit function tried to pull the strategy's entire token balance.
-
The strategy assumed redeem returns the full requested amount and used a strict balance check that reverts on any shortfall.
-
The subscribe and subscription endpoints enforced no server-side rate limiting or CAPTCHA, so automated submissions were unlimited.
Seen in 2 reports
-
The subscription restriction was enforced only in the interface, and the backend did not validate the request structure or the user's plan.
-
The supply function checked only the vault's own configured cap, not each market's or the underlying pool's maximum deposit.
-
The swap function had no minimum output or deadline parameters.
-
The swap set the minimum output equal to the input amount, giving no slippage protection against price manipulation.
Seen in 2 reports
-
The transfer function did not delete the timelock entry, leaving stale recipient data.
-
The transfer restriction checked the recipient address at transfer time but the recipient vault may not yet exist, so a predicted address bypassed the check.
-
The unallocated remainder went to the last holder in an enumerable set whose order ordinary transfers could change.
-
The unstake and restake routines validated only the amount moved, not the remaining stake against the minimum.
Seen in 2 reports
-
The update endpoint bound all submitted JSON fields without an allow-list, so extra fields were processed.
-
The use of a decreasing value (totalSupply) to generate unique identifiers can lead to collisions when tokens are burned.
-
The utilisation calculation does not cap the result at 100 percent, producing a borrow rate above the maximum.
Seen in 2 reports
-
The value returned by an external claim call was added to total collateral without verifying tokens arrived.
-
The verifier decodes only the first 32 to 64 bytes of opaque fill payloads instead of fully decoding the settler ABI layout.
-
The view read a stored accumulator without applying the time-based settlement that the claim path performs.
-
The webhook checked only that a signature header was present rather than validating it against the payload, and kept no record of processed events.
-
The wipe branch in store_trie_updates_for_block writes a tombstone and continues, so new storage slots for recreated accounts are never persisted.
-
The withdraw call passes the claim flag, sending rewards to the strategy address with no way to forward them.
-
The withdraw collateral function omits the pause checks that supply collateral performs.
-
The withdraw function checked only the executor and custodian address in returned data, not that the data came from an actual burn.
-
The wrapper hard-codes useUnderlying to true instead of checking whether the fCash token's asset token is the underlying.
Seen in 2 reports
-
Medium
-
Medium
-
-
The wrapper ignores source-token refunds from the aggregator and has no sweep or unwrap function.
-
The wrapper ignores the router's reported spent amount and does not refund unspent tokens or reset the allowance.
-
The writer did not enforce the same maximum line length as the reader, and the Set-Cookie length check covered only the value, not domain or path.
-
Time-delay constants were given values in seconds rather than the intended days.
Seen in 2 reports
-
Totals were calculated from client-supplied quantities without checking they were positive integers, and checkout trusted that total for payment decisions.
-
Trial restrictions and usage quotas were enforced only in the browser or a client-side cookie, not on the server.
-
Two multipliers are applied in sequence instead of only the correct one, and the yearly formula uses the wrong divisors.
Seen in 2 reports
-
Verification status is enforced only in the browser and not re-checked by the backend on restricted routes.
-
Verifier nullification is global at the verifier layer but local at the game layer, and resolve and closeGame never re-check whether a supporting proof's verifier has since been nullified.
-
Voting delay and period were set in blocks with values far too small for the chain's block time.
-
Withdraw burns the token without claiming pending bribes, and the claim function requires ownership.
Seen in 2 reports
-
Withdrawing unsold tokens reduces the contract balance without reducing the stored total for sale.
-
Yield distribution is split into multiple calls without a balance snapshot, so transfers between calls cause the same balance to be counted more than once.
-
Yield tokens are pulled from the distributor before checking that any eligible supply exists, and the function returns early without refunding.
-
A two-factor failure counter is keyed on the phone number field rather than the account ID.
Seen in 1 report
-
A 15-second interval was passed where 900 seconds was intended.
-
A 256-bit amount is cast to 192 bits without a range check.
Seen in 1 report
-
A 256-bit value is truncated to 160 bits without checking that the discarded upper bits are zero.
Seen in 1 report
-
A base-unit borrowed amount is compared against a USD-denominated limit without conversion.
-
A base64-encoded object is used as an identifier without verifying the user's authorisation.
Seen in 1 report