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 solvency check requires solvency at both the market price and the close price.
-
The solvency check runs after each item in a caller-ordered batch rather than on the final post-batch state, so a transient intermediate state latches degraded mode.
-
The solvency check that latches degraded mode runs only after a close settles and is never rejected, while the admission buffer is small enough for one actor to fill both sides.
-
The solvency latch is sticky and only cleared by an owner-only function, while the open gate and latch threshold are separated by a small buffer.
-
The sorting function did not move a new borrow into the first position when the first position was empty.
Seen in 1 report
-
The source chain sends only the raw collateral value to the destination chain and omits existing borrows, so the destination validates against gross collateral.
Seen in 1 report
-
The spam filter used a stale copy of the top-level domain list, so newer TLDs were not recognised.
Seen in 1 report
-
The sparse-file branch of the open call returns early without truncating to the logged progress, and the finish step only hashes bytes so far without shrinking the file.
Seen in 1 report
-
The SPC controller did not observe updates to the PaymentRequestSpec, so the displayed amount stayed static while the signing logic read the live mutated state.
Seen in 1 report
-
The specification lets annotations and signature fields define arbitrary appearance and position, and viewers do not adequately verify or display them.
Seen in 1 report
-
The spend function compared the requested amount to the limit but never reduced the stored limit after a successful transfer.
Seen in 1 report
-
The spender whitelist exempted the router from fees for all functions, including selling, not just adding liquidity.
Seen in 1 report
-
The spin limit uses calendar days while jackpot odds use fixed periods from campaign start, so the two disagree.
-
The sponsor function allows a zero-amount deposit and unconditionally forces the recipient's delegation.
Seen in 1 report
-
The sponsor vault reimbursed liquidity fees without checking that the transfer was not self-dealing by the router owner.
Seen in 1 report
-
The spot price was not normalised back to 18 decimals, so the price limit check always reverted.
Seen in 1 report
-
The spread is computed from the two middle values for even input counts instead of a range covering the extremes.
Seen in 1 report
-
The squared APR term was divided by twice the seconds per year rather than by two, shrinking the compounding term.
Seen in 1 report
-
The squeeze calculation uses a start cap based on the current cycle start rather than the drip's last update time, allowing a receiver to squeeze funds for a period before the drip was created.
-
The stabilisation function always reads the actual price target instead of selecting the same target as the supply-adjustment check.
Seen in 1 report
-
The stabilize function can be called by anyone at any time, so an attacker can sandwich the price movement it causes.
Seen in 1 report
-
Medium
-
-
The stableswap slippage check used a one-sided inequality instead of comparing the absolute difference between pool and deposit ratios.
Seen in 1 report
-
The staging environment was publicly accessible and used test charges that bypassed real payment.
Seen in 1 report
-
The stake function did not call checkpoint before adding a service, so available rewards were not updated.
-
The stake function does not check that the derivative count is greater than zero before processing the deposit.
Seen in 1 report
-
The stake function does not check that the minted share amount is greater than zero.
Seen in 1 report
-
The stake function skips reward payout when paused or frozen, so accrued rewards are not settled before a new staker joins.
Seen in 1 report
-
The stake initialisation loop only updates checkpoints for currently active reward tokens, so historical per-token checkpoints are never reset.
-
The stake limit was updated using the requested stake amount before the actual amount was known, and the actual amount could be lower.
-
The stake time field was written on every stake but never read by any on-chain function.
-
The Staked event omitted the reward value, so the stored reward could not be recovered from the log alone.
Seen in 1 report
-
The staked time bonus calculation hardcodes a division by two instead of referencing the configurable multiplier.
-
The staking bonus is stored at stake time while governance can change bonus parameters without recalculating existing stakes.
Seen in 1 report
-
The staking check was conditionally disabled when active nodes were below a threshold, which holds in the initial cycles.
Seen in 1 report
-
The staking contract did not enforce a minimum staking duration or weight rewards by time.
-
The staking contract does not check total supply plus new rewards against the maximum supply.
-
The staking function calls the derivative price helper with the derivative's entire balance instead of the amount being staked.
-
The staking function lacked a check that at least one reward token was configured, and accrual only began from the first reward token checkpoint.
-
The stale-price threshold is much larger than the oracle heartbeat.
Seen in 1 report
-
The staleness check relied only on the feed timestamp and omitted the sequencer uptime feed.
Seen in 1 report
-
The standard claim path does not skip past a terminal refund entry at the head of the controller queue.
Seen in 1 report
-
The standard redemption function omits the allowance update call present in the deposit function.
Seen in 1 report
-
The start draw ID used in getVaultPortion can refer to a draw that has been overwritten in the total accumulator but not in the vault and donation accumulators, causing inconsistent ranges.
-
The start function lacks access control and the strategy exchange rate is manipulable.
-
The start setter lacked the ordering check that the end setter had.
Seen in 1 report
-
The start time was only registered in the time bitmap when the block timestamp was strictly less than the start time.
Seen in 1 report
-
The starting index is derived from the block number, which is predictable.
Seen in 1 report
-
The state database only sets the code hash for accounts implementing the account interface, so a vesting account at the address leaves deployed bytecode unlinked.
Seen in 1 report
-
The state function uses a strict less-than comparison, so a tie is not treated as defeated.
Seen in 1 report
-
The state machine does not update its status when the primary oracle is working and the fallback is frozen, so it keeps returning an invalid price.
Seen in 1 report