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.
-
Trust was decided only from the GitHub organisation in the notebook URL, not from who authored or reviewed the notebook.
Seen in 1 report
-
Two components disagree on handler address encoding and the message is marked consumed before the downstream check.
Seen in 1 report
-
Two contracts each require the other's address in their constructors, creating a circular dependency.
Seen in 1 report
-
Two contracts used different time units (seconds versus epochs) to determine lock expiry, causing inconsistent active status.
Seen in 1 report
-
Two different transfer methods are both invoked inside one transfer function.
Seen in 1 report
-
Two error flags are combined with a bitwise OR producing a value the switch statement does not handle.
Seen in 1 report
-
Two gap-filling functions share logic but only one requests and distributes the missing reward.
-
Two independent paths to the special entropy value exist with no check preventing both in the same generation.
Seen in 1 report
-
Two module functions hard-coded the unwrap flag to false, so the helper that builds the composed message was never used.
Seen in 1 report
-
Two opposite actions share the same type hash and used-signature registry, so a signature is valid for either.
Seen in 1 report
-
Two separate reward-token registries, one in the facet and one in the treasury, were not kept in sync.
Seen in 1 report
-
Two struct variables are assigned to the same memory location, so extrapolation uses initial values.
Seen in 1 report
-
Two swap and liquidity functions were missing the when-not-paused modifier.
Seen in 1 report
-
Two timestamp checks use mismatched strict comparisons, so the exact start timestamp is accepted by both.
Seen in 1 report
-
Two transfer paths enforce different health checks, so the stricter free-balance requirement can be sidestepped.
-
Unclaimed reserves from a finished reserve auction are still included in liabilities.
Seen in 1 report
-
Unicode escape sequences in user input were not sanitised before being used to build email content.
Seen in 1 report
-
Uniqueness is scoped per account and only checked against already-verified rows at request time, with no re-check when the token is consumed.
-
Unlocking sets the listing owner to zero, so the NFT is no longer treated as protected.
Seen in 1 report
-
Unregistering an operator vault does not clear the auto-deployed vault mapping, leaving a stale address.
Seen in 1 report
-
Unstake writes a new checkpoint for a later period instead of correcting the previously scheduled checkpoint.
-
Unstake zeroes a vesting duration's staked amount even when no tokens from that duration are removed.
Seen in 1 report
-
Unstaking unlocks the NFT for transfer without checking whether tokens remain in the stake-at-risk contract.
-
Unstaking used the warm-up credits amount, which included pending rebase rewards.
Seen in 1 report
-
Unwrapping zeroes a node's expiry even when it still has child nodes, so the parent no longer constrains the child.
-
The update function processes rewards before storing the new parameters, so the old values are cached and used.
Seen in 1 report
-
Update returns early past the end block without first accruing the per-share reward.
Seen in 1 report
-
Updating a user's pending epoch on every deposit pushes earlier pending deposits forward out of sync with global settlement.
-
Updating the minimum collateralisation ratio does not rescale the stored total locked collateral.
Seen in 1 report
-
User-supplied name fields were inserted into email templates without sanitising or escaping.
-
Username validation compares against banned words without normalising Unicode.
-
Username validation did not reserve names that collide with static server resources, and profiles were placed at the site root.
-
Usernames are stored without trimming or normalising surrounding whitespace and near-duplicates are not flagged.
-
Users can withdraw all funds at any time without a delay or lock, so they can exit before a pending slash.
Seen in 1 report
-
Users' swapped assets are not segregated from collected fees, so the owner's withdrawal transfers the entire balance.
-
Validation accepted one wrong character and ignored case, and challenge generation lacked randomness.
Seen in 1 report
-
Validation and action read different occurrences of a duplicated parameter.
Seen in 1 report
-
Validation blocked one exact pattern rather than normalising and comparing branch names exactly.
Seen in 1 report
-
Validation compared the buyer's constraint to the seller's constraint instead of comparing the constructed item count to the seller's maximum.
Seen in 1 report
-
Validation compares the cash amount directly to the minimum credit without converting between cash and credit.
Seen in 1 report
-
Validation counts token IDs across all buy orders but never checks that each individual order names the tokens it pays for.
-
Validation iterated over deposits but never rejected a transaction with an empty deposit list.
Seen in 1 report
-
The validation layer and business-logic layer use JSON parsers with different duplicate-key policies while forwarding the raw body.
-
Validation only checked for missing fields rather than rejecting null values, and the bookings endpoint mishandled an empty array in a date filter.
Seen in 1 report
-
Validation only checked the input was non-empty after trimming and did not strip zero-width Unicode characters.
Seen in 1 report
-
Validation only checked whether slippage exceeded the limit and did not reject zero, which downstream logic read as no limit.
Seen in 1 report
-
Validation only checks the numeric part of the code and there is no rate limiting.
Seen in 1 report
-
Validation rejects an empty address even though the keeper treats an empty address as the signal to delete the hook.
Seen in 1 report
-
Validation relied on a trivial arithmetic check and a short exclusion list with no cryptographic signature.
Seen in 1 report
-
Validation used a blacklist of control and whitespace characters instead of a whitelist of allowed characters.
Seen in 1 report
-
Medium
-