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 deposit cap check only considers active stakes and pending deposits are not re-checked when they become active.
Seen in 1 report
-
Deposit logic leaves unspent tokens in the contract and the TVL calculation ignores tokens held directly by the vault.
Seen in 1 report
-
Deposit updates balances without verifying that tokens were actually transferred.
Seen in 1 report
-
Deposit, withdraw and trade functions have no deadline parameter or check.
Seen in 1 report
-
Deposits and withdrawals are allowed in the same transaction with no time weighting or fees, so a large deposit before a gain event captures it.
Seen in 1 report
-
Deposits are accepted whenever projected net asset value is positive without bounding the resulting share supply, so a near-zero denominator mints enormous share counts.
Seen in 1 report
-
Deposits were keyed only by proposal ID without recording the source vault.
Seen in 1 report
-
Deprecated gauges are excluded from the total freed weight, so the loop frees more user gauge weight than needed.
Seen in 1 report
-
Derivation code validates batcher-supplied fields against themselves instead of against L1-consensus-enforced values.
-
Developers passed incorrect values to external contracts, such as a zero address for a token or a ratio instead of a minimum amount.
Seen in 1 report
-
Medium
-
-
Deviation is calculated as a percentage of the larger value rather than the mean or TWAP.
Seen in 1 report
-
Different JSON parsers at the gateway and backend handle duplicate keys inconsistently, and the signature check is applied only to certain event types.
Seen in 1 report
-
Different parsers were used for validating the email domain and for delivering the mail, so an encoded local part was interpreted differently by each.
Seen in 1 report
-
Different registration errors revealed existing emails and the login endpoint had no rate limit.
Seen in 1 report
-
Direct transfers to the stable swap address were not blocked, so they bypassed the hooks that update the EMA oracle.
Seen in 1 report
-
Discount eligibility was checked when the coupon was added but not re-validated after the cart changed.
Seen in 1 report
-
Discount eligibility was decided from a user-supplied email address and the coupon cookie was set with no authentication or ownership check.
Seen in 1 report
-
Discovery takes the indexer-supplied address verbatim without recomputing it from signers, threshold and nonce.
Seen in 1 report
-
Display names were not treated as case-insensitive when checking for duplicates.
Seen in 1 report
-
Displayed total and signed permit value come from two independent quote round-trips with no reconciliation.
Seen in 1 report
-
distribute resets total votes without checkpointing individual user balances, leaving bribe accounting out of sync.
Seen in 1 report
-
Distribution logic does not account for revenue forwarded under a previous configuration.
-
Distribution shares used current total voting power instead of the total at distribution creation.
Seen in 1 report
-
Dividing by total supply without a minimum stake lets reward per token become extremely large when total supply is one wei.
Seen in 1 report
-
Documentation promised a redeem function that was never implemented, leaving no way to reduce supply.
Seen in 1 report
-
Medium
-
-
Domain verification was skipped or flawed for the add-new-domain redirect feature.
Seen in 1 report
-
Donations credit the nominal transfer amount rather than the amount actually received.
Seen in 1 report
-
Donations increase the pool NAT balance without minting corresponding pool tokens, so the ratio can be manipulated.
-
Download permission is checked only when a link is created and existing links are not re-validated.
Seen in 1 report
-
Draw and donate functions change the token count without first updating the reward zone emission data.
-
Duration validation checks only a lower bound and granularity, with no upper bound, and period ends use checked arithmetic that can overflow.
Seen in 1 report
-
Dust is calculated from oracle prices and a fixed scale instead of the actual token amounts returned by the token amount function, ignoring tick range and decimals.
Seen in 1 report
-
Each fee is calculated independently on the amount rather than on the summed basis points.
Seen in 1 report
-
Each fee is validated in isolation rather than validating the sum against a maximum.
Seen in 1 report
-
Each gauge's share is computed from the current balance without recording amounts already distributed.
Seen in 1 report
-
Each purchase advances the epoch start, lowering the price for the next buyer without slippage protection.
Seen in 1 report
-
Each stake records only a deposit timestamp and withdrawal validation reads the current global minimum period.
Seen in 1 report
-
Earned reward shares were not associated with the vault they originated from, so claims could name any whitelisted vault.
Seen in 1 report
-
Eligibility and cancellation rules were enforced only at a specific client interaction rather than re-validated server-side when state was built or committed.
-
Email addresses were compared as raw strings without normalising provider-specific aliases before the duplicate check.
Seen in 1 report
-
Email addresses were compared as raw strings without normalising them before the duplicate check.
Seen in 1 report
-
Email addresses were not canonicalised (plus tags not stripped) before rate limits were enforced.
-
Email addresses were not normalised before checking for existing accounts or enforcing trial limits.
-
Email addresses were not normalised before uniqueness checks, so dot variations counted as new accounts.
Seen in 1 report
-
Email addresses were not validated before invitations were sent, allowing invalid addresses to bounce.
Seen in 1 report
-
Email associations were not fully removed on account deletion, so a previously verified email was treated as confirmed in a new account.
Seen in 1 report
-
Email content was processed even when SPF and DKIM verification failed instead of being rejected.
Seen in 1 report
-
Email ownership is not verified before the address is marked as registered, and unverified emails cannot be re-registered.
Seen in 1 report
-
Email ownership was not verified at signup and the address could be changed between the join request and verification.
-
Email replies are authenticated only by sender display name and address, without a secret token or signature check.
Seen in 1 report