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 claim function reads the current global maximum prize count instead of the value in effect when prizes were set.
Seen in 1 report
-
The claim function reads the stored accrued balance without first updating the reward index and recalculating newly earned rewards.
Seen in 1 report
-
The claim function reverts the entire batch if any single prize was already claimed instead of skipping it.
Seen in 1 report
-
The claim function short-circuited when the reward pool address was zero instead of implementing gauge reward claiming.
Seen in 1 report
-
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.
-
The claim function trusted a stored signer count that was not refreshed before the limit check.
-
The claim function unconditionally includes a set-withdraw-address message without handling chains that disable it.
Seen in 1 report
-
The claim function uses the original minimum reserve price instead of the actual purchase price.
Seen in 1 report
-
The claim functions increased total collateral but omitted the asset manager update call that other deposit flows use.
-
The claim hard-coded the wrap flag to false while the receive function rejected native currency outside withdrawals.
Seen in 1 report
-
The claim loop ignores the grant return value and never writes the remaining zero balance back to storage.
Seen in 1 report
-
The claim loop marks every epoch up to the requested one as claimed without checking that the requested epoch is not in the future.
-
The claim path did not check emergency mode and kept crediting earnings to a drawing whose settlement function was disabled.
Seen in 1 report
-
The claim path unconditionally deposited back into the same veNFT, which rejected expired locks.
Seen in 1 report
-
The claim payout is capped at the contract balance without recording the shortfall.
Seen in 1 report
-
The claim routine added the cached reward to the payout but never zeroed it afterwards.
Seen in 1 report
-
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
-
The claim subtracts the cached total fee balance instead of only the claimed amount.
-
The claim updates the recipient balance without first synchronising their emission data.
Seen in 1 report
-
The claimable amount calculation does not account for token merges, allowing repeated claims on the same underlying balance.
Seen in 1 report
-
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
-
The claimable amount is read into memory before being updated, so the gauge is not notified of the reward.
Seen in 1 report
-
The claimable amount was deducted before the equality check that zeroes the claim rate.
-
The claimable amount was fixed at request time rather than recalculated at claim time.
-
The claimable balance is assigned with equals instead of added to, so each launch overwrites the previous amount.
-
The claimable calculation returns the initial release amount without subtracting the amount the user has already claimed.
Seen in 1 report
-
The claimable check used a non-strict comparison for the deadline, allowing a ticket to be both claimable and considered unclaimed.
-
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.
-
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
-
The claimed amount was set to the newly calculated due amount instead of being added to the previous total.
-
The claimed mapping was keyed by the recipient address rather than the caller.
Seen in 1 report
-
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
-
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
-
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
-
The clearinghouse's default handler does nothing and its defund function cannot handle the collateral token.
Seen in 1 report
-
The client did not cryptographically bind sender identity and direction fields to the encrypted message content.
Seen in 1 report
-
The client did not restrict use of the client certificate to the original host when following redirects.
Seen in 1 report
-
The client queries UTXOs with zero minimum confirmations, so it includes unconfirmed outputs from anyone.
Seen in 1 report
-
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
-
The client treats the two disable settings independently and concludes there is no network to run on, so it disconnects.
Seen in 1 report
-
The client trusted a server success flag instead of the server enforcing verification and issuing an unalterable session state.
-
The client trusted a success boolean in the response rather than the server enforcing OTP validation before performing the change.
-
The client trusted a success flag in the server response instead of the server enforcing the code check.
Seen in 1 report
-
The client trusted the server's JSON response to decide promo code validity without additional server-side verification or session state.
-
The client trusts the quoted fee with only a floor check that caps the permit at the full wallet balance.
Seen in 1 report
-
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
-
The client zeroed the stored origin timestamp after a match and then accepted any packet with a zero origin timestamp.
-
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.
-
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
-
The client-side flow trusted the server's JSON response body to decide whether verification succeeded.
Seen in 1 report