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 451 to 500 of 5,700
  1. The setCap function subtracted the strategy's entire balance from the vault balance instead of only the excess amount withdrawn.

    Seen in 2 reports
  2. 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
  3. 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
  4. The share removal function ignores each deposit's unlock status, so the penalty is applied to the total withdrawal.

    Seen in 2 reports
  5. 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
  6. 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
  7. 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.

    Seen in 2 reports
  8. The strategy assumed redeem returns the full requested amount and used a strict balance check that reverts on any shortfall.

    Seen in 2 reports
  9. The subscribe and subscription endpoints enforced no server-side rate limiting or CAPTCHA, so automated submissions were unlimited.

    Seen in 2 reports
  10. The subscription restriction was enforced only in the interface, and the backend did not validate the request structure or the user's plan.

    Seen in 2 reports
  11. The supply function checked only the vault's own configured cap, not each market's or the underlying pool's maximum deposit.

    Seen in 2 reports
  12. The swap function had no minimum output or deadline parameters.

    Seen in 2 reports
  13. The swap set the minimum output equal to the input amount, giving no slippage protection against price manipulation.

    Seen in 2 reports
  14. The transfer function did not delete the timelock entry, leaving stale recipient data.

    Seen in 2 reports
  15. 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.

    Seen in 2 reports
  16. The unallocated remainder went to the last holder in an enumerable set whose order ordinary transfers could change.

    Seen in 2 reports
  17. The unstake and restake routines validated only the amount moved, not the remaining stake against the minimum.

    Seen in 2 reports
  18. The update endpoint bound all submitted JSON fields without an allow-list, so extra fields were processed.

    Seen in 2 reports
  19. The use of a decreasing value (totalSupply) to generate unique identifiers can lead to collisions when tokens are burned.

    Seen in 2 reports
  20. The utilisation calculation does not cap the result at 100 percent, producing a borrow rate above the maximum.

    Seen in 2 reports
  21. The value returned by an external claim call was added to total collateral without verifying tokens arrived.

    Seen in 2 reports
  22. The verifier decodes only the first 32 to 64 bytes of opaque fill payloads instead of fully decoding the settler ABI layout.

    Seen in 2 reports
  23. The view read a stored accumulator without applying the time-based settlement that the claim path performs.

    Seen in 2 reports
  24. The webhook checked only that a signature header was present rather than validating it against the payload, and kept no record of processed events.

    Seen in 2 reports
  25. The wipe branch in store_trie_updates_for_block writes a tombstone and continues, so new storage slots for recreated accounts are never persisted.

    Seen in 2 reports
  26. The withdraw call passes the claim flag, sending rewards to the strategy address with no way to forward them.

    Seen in 2 reports
  27. The withdraw collateral function omits the pause checks that supply collateral performs.

    Seen in 2 reports
  28. The withdraw function checked only the executor and custodian address in returned data, not that the data came from an actual burn.

    Seen in 2 reports
  29. The wrapper ignores source-token refunds from the aggregator and has no sweep or unwrap function.

    Seen in 2 reports
  30. The wrapper ignores the router's reported spent amount and does not refund unspent tokens or reset the allowance.

    Seen in 2 reports
  31. 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.

    Seen in 2 reports
  32. Time-delay constants were given values in seconds rather than the intended days.

    Seen in 2 reports
  33. Totals were calculated from client-supplied quantities without checking they were positive integers, and checkout trusted that total for payment decisions.

    Seen in 2 reports
  34. Trial restrictions and usage quotas were enforced only in the browser or a client-side cookie, not on the server.

    Seen in 2 reports
  35. Two multipliers are applied in sequence instead of only the correct one, and the yearly formula uses the wrong divisors.

    Seen in 2 reports
  36. Verification status is enforced only in the browser and not re-checked by the backend on restricted routes.

    Seen in 2 reports
  37. 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.

    Seen in 2 reports
  38. Voting delay and period were set in blocks with values far too small for the chain's block time.

    Seen in 2 reports
  39. Withdraw burns the token without claiming pending bribes, and the claim function requires ownership.

    Seen in 2 reports
  40. Withdrawing unsold tokens reduces the contract balance without reducing the stored total for sale.

    Seen in 2 reports
  41. 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.

    Seen in 2 reports
  42. Yield tokens are pulled from the distributor before checking that any eligible supply exists, and the function returns early without refunding.

    Seen in 2 reports
  43. A two-factor failure counter is keyed on the phone number field rather than the account ID.

    Seen in 1 report
  44. A 15-second interval was passed where 900 seconds was intended.

    Seen in 1 report
  45. A 256-bit amount is cast to 192 bits without a range check.

    Seen in 1 report
  46. A 256-bit value is truncated to 160 bits without checking that the discarded upper bits are zero.

    Seen in 1 report
  47. A base-unit borrowed amount is compared against a USD-denominated limit without conversion.

    Seen in 1 report
  48. A base64-encoded object is used as an identifier without verifying the user's authorisation.

    Seen in 1 report