Skip to content

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.

Back to the lesson 5,001 to 5,050 of 5,700
  1. The solvency check requires solvency at both the market price and the close price.

    Seen in 1 report
  2. 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.

    Seen in 1 report
  3. 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.

    Seen in 1 report
  4. 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.

    Seen in 1 report
  5. The sorting function did not move a new borrow into the first position when the first position was empty.

    Seen in 1 report
  6. 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
  7. The spam filter used a stale copy of the top-level domain list, so newer TLDs were not recognised.

    Seen in 1 report
  8. 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
  9. 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
  10. 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
  11. The spend function compared the requested amount to the limit but never reduced the stored limit after a successful transfer.

    Seen in 1 report
  12. The spender whitelist exempted the router from fees for all functions, including selling, not just adding liquidity.

    Seen in 1 report
  13. The spin limit uses calendar days while jackpot odds use fixed periods from campaign start, so the two disagree.

    Seen in 1 report
  14. The sponsor function allows a zero-amount deposit and unconditionally forces the recipient's delegation.

    Seen in 1 report
  15. The sponsor vault reimbursed liquidity fees without checking that the transfer was not self-dealing by the router owner.

    Seen in 1 report
  16. The spot price was not normalised back to 18 decimals, so the price limit check always reverted.

    Seen in 1 report
  17. The spread is computed from the two middle values for even input counts instead of a range covering the extremes.

    Seen in 1 report
  18. The squared APR term was divided by twice the seconds per year rather than by two, shrinking the compounding term.

    Seen in 1 report
  19. 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.

    Seen in 1 report
  20. The stabilisation function always reads the actual price target instead of selecting the same target as the supply-adjustment check.

    Seen in 1 report
  21. 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
  22. The stableswap slippage check used a one-sided inequality instead of comparing the absolute difference between pool and deposit ratios.

    Seen in 1 report
  23. The staging environment was publicly accessible and used test charges that bypassed real payment.

    Seen in 1 report
  24. The stake function did not call checkpoint before adding a service, so available rewards were not updated.

    Seen in 1 report
  25. The stake function does not check that the derivative count is greater than zero before processing the deposit.

    Seen in 1 report
  26. The stake function does not check that the minted share amount is greater than zero.

    Seen in 1 report
  27. 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
  28. The stake initialisation loop only updates checkpoints for currently active reward tokens, so historical per-token checkpoints are never reset.

    Seen in 1 report
  29. The stake limit was updated using the requested stake amount before the actual amount was known, and the actual amount could be lower.

    Seen in 1 report
  30. The stake time field was written on every stake but never read by any on-chain function.

    Seen in 1 report
  31. The Staked event omitted the reward value, so the stored reward could not be recovered from the log alone.

    Seen in 1 report
  32. The staked time bonus calculation hardcodes a division by two instead of referencing the configurable multiplier.

    Seen in 1 report
  33. The staking bonus is stored at stake time while governance can change bonus parameters without recalculating existing stakes.

    Seen in 1 report
  34. The staking check was conditionally disabled when active nodes were below a threshold, which holds in the initial cycles.

    Seen in 1 report
  35. The staking contract did not enforce a minimum staking duration or weight rewards by time.

    Seen in 1 report
  36. The staking contract does not check total supply plus new rewards against the maximum supply.

    Seen in 1 report
  37. The staking function calls the derivative price helper with the derivative's entire balance instead of the amount being staked.

    Seen in 1 report
  38. The staking function lacked a check that at least one reward token was configured, and accrual only began from the first reward token checkpoint.

    Seen in 1 report
  39. The stale-price threshold is much larger than the oracle heartbeat.

    Seen in 1 report
  40. The staleness check relied only on the feed timestamp and omitted the sequencer uptime feed.

    Seen in 1 report
  41. The standard claim path does not skip past a terminal refund entry at the head of the controller queue.

    Seen in 1 report
  42. The standard redemption function omits the allowance update call present in the deposit function.

    Seen in 1 report
  43. 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.

    Seen in 1 report
  44. The start function lacks access control and the strategy exchange rate is manipulable.

    Seen in 1 report
  45. The start setter lacked the ordering check that the end setter had.

    Seen in 1 report
  46. 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
  47. The starting index is derived from the block number, which is predictable.

    Seen in 1 report
  48. 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
  49. The state function uses a strict less-than comparison, so a tie is not treated as defeated.

    Seen in 1 report
  50. 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