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 2,201 to 2,250 of 5,700
  1. The claim function reads the current global maximum prize count instead of the value in effect when prizes were set.

    Seen in 1 report
  2. The claim function reads the stored accrued balance without first updating the reward index and recalculating newly earned rewards.

    Seen in 1 report
  3. The claim function reverts the entire batch if any single prize was already claimed instead of skipping it.

    Seen in 1 report
  4. The claim function short-circuited when the reward pool address was zero instead of implementing gauge reward claiming.

    Seen in 1 report
  5. The claim function stored the factor-adjusted claimable total as the claimed amount rather than the raw claimable amount, so later claims for the same time slot were offset incorrectly.

    Seen in 1 report
  6. The claim function trusted a stored signer count that was not refreshed before the limit check.

    Seen in 1 report
  7. The claim function unconditionally includes a set-withdraw-address message without handling chains that disable it.

    Seen in 1 report
  8. The claim function uses the original minimum reserve price instead of the actual purchase price.

    Seen in 1 report
  9. The claim functions increased total collateral but omitted the asset manager update call that other deposit flows use.

    Seen in 1 report
  10. The claim hard-coded the wrap flag to false while the receive function rejected native currency outside withdrawals.

    Seen in 1 report
  11. The claim loop ignores the grant return value and never writes the remaining zero balance back to storage.

    Seen in 1 report
  12. The claim loop marks every epoch up to the requested one as claimed without checking that the requested epoch is not in the future.

    Seen in 1 report
  13. The claim path did not check emergency mode and kept crediting earnings to a drawing whose settlement function was disabled.

    Seen in 1 report
  14. The claim path unconditionally deposited back into the same veNFT, which rejected expired locks.

    Seen in 1 report
  15. The claim payout is capped at the contract balance without recording the shortfall.

    Seen in 1 report
  16. The claim routine added the cached reward to the payout but never zeroed it afterwards.

    Seen in 1 report
  17. The claim routine processes a bounded number of iterations, so pending rewards beyond that limit are never claimed before the token is burned.

    Seen in 1 report
  18. The claim subtracts the cached total fee balance instead of only the claimed amount.

    Seen in 1 report
  19. The claim updates the recipient balance without first synchronising their emission data.

    Seen in 1 report
  20. The claimable amount calculation does not account for token merges, allowing repeated claims on the same underlying balance.

    Seen in 1 report
  21. The claimable amount is credited from the requested transfer amount rather than the actual increase in the vault's token balance.

    Seen in 1 report
  22. The claimable amount is read into memory before being updated, so the gauge is not notified of the reward.

    Seen in 1 report
  23. The claimable amount was deducted before the equality check that zeroes the claim rate.

    Seen in 1 report
  24. The claimable amount was fixed at request time rather than recalculated at claim time.

    Seen in 1 report
  25. The claimable balance is assigned with equals instead of added to, so each launch overwrites the previous amount.

    Seen in 1 report
  26. The claimable calculation returns the initial release amount without subtracting the amount the user has already claimed.

    Seen in 1 report
  27. The claimable check used a non-strict comparison for the deadline, allowing a ticket to be both claimable and considered unclaimed.

    Seen in 1 report
  28. The claimable collateral factor key was never added to the list of keys the config keeper is permitted to set, so it remained at its default of zero.

    Seen in 1 report
  29. The claimed amount is calculated from the contract's entire ETH balance rather than only the ETH obtained from swapping the user's locked tokens, so donated ETH is counted as part of the claim.

    Seen in 1 report
  30. The claimed amount was set to the newly calculated due amount instead of being added to the previous total.

    Seen in 1 report
  31. The claimed mapping was keyed by the recipient address rather than the caller.

    Seen in 1 report
  32. The claimed-epoch bit check shifted by an epoch ID wider than the 256-bit storage variable, so it always returned false.

    Seen in 1 report
  33. The claimer contract allows re-entrancy through winner-controlled hooks, so a winner can call claimPrizes again within the afterClaimPrize hook and divert fees.

    Seen in 1 report
  34. The claimPrize function does not verify that the pool is not shut down, allowing claims during shutdown when the draw is not finalised.

    Seen in 1 report
  35. The clearinghouse's default handler does nothing and its defund function cannot handle the collateral token.

    Seen in 1 report
  36. The client did not cryptographically bind sender identity and direction fields to the encrypted message content.

    Seen in 1 report
  37. The client did not restrict use of the client certificate to the original host when following redirects.

    Seen in 1 report
  38. The client queries UTXOs with zero minimum confirmations, so it includes unconfirmed outputs from anyone.

    Seen in 1 report
  39. The client treats a pre-execution pool import notification as final payment and has no handler to clear the paid state when the transaction is replaced, dropped or fails.

    Seen in 1 report
  40. The client treats the two disable settings independently and concludes there is no network to run on, so it disconnects.

    Seen in 1 report
  41. The client trusted a server success flag instead of the server enforcing verification and issuing an unalterable session state.

    Seen in 1 report
  42. The client trusted a success boolean in the response rather than the server enforcing OTP validation before performing the change.

    Seen in 1 report
  43. The client trusted a success flag in the server response instead of the server enforcing the code check.

    Seen in 1 report
  44. The client trusted the server's JSON response to decide promo code validity without additional server-side verification or session state.

    Seen in 1 report
  45. The client trusts the quoted fee with only a floor check that caps the permit at the full wallet balance.

    Seen in 1 report
  46. The client zeroed the account balance directly on the state object instead of redirecting the change to the token contract's storage.

    Seen in 1 report
  47. The client zeroed the stored origin timestamp after a match and then accepted any packet with a zero origin timestamp.

    Seen in 1 report
  48. The client-side account metadata marked the destination program as writable and the destination program PDA as read-only, opposite to the on-chain Execute struct which requires the PDA to be writable.

    Seen in 1 report
  49. The client-side flow relied on the server response to decide whether password confirmation succeeded, and the password was not re-checked when setup was finalised.

    Seen in 1 report
  50. The client-side flow trusted the server's JSON response body to decide whether verification succeeded.

    Seen in 1 report