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 tax classification was accepted from a client-controlled field without server-side validation against product and country.
Seen in 1 report
-
The team did not verify the legitimacy of a token and its issuer before approving it as collateral.
Seen in 1 report
-
The team member invitation feature was not disabled for sandbox programs.
Seen in 1 report
-
The team name update accepted empty or whitespace-only names while the leave-team confirmation depended on a non-empty name.
Seen in 1 report
-
The teller address was taken as a function parameter instead of being stored in contract state.
Seen in 1 report
-
The temporary password generator used a limited character set and the change policy allowed reuse.
Seen in 1 report
-
The terminal NAV snapshot used to price Junior redemptions included collected price impact as distributable assets without subtracting the potentially refundable amount still owed to open positions.
Seen in 1 report
-
The terminal receipt code used the raw block number instead of the protocol's L2-aware block number helper on Arbitrum.
-
The ternary expression assigned the debt balance variable to itself instead of assigning the cash balance.
Seen in 1 report
-
The third-party association step did not check whether the supplied email already belonged to another account, and disconnecting the original email left the duplicate in place.
Seen in 1 report
-
The third-party login handler always updated the stored full name from the provider profile on each login.
Seen in 1 report
-
The threshold and the proposer's voting power were read at different block timestamps.
Seen in 1 report
-
The threshold constant was a hundred times smaller than documented.
Seen in 1 report
-
The threshold was computed with ceiling division, which for even counts yields exactly half rather than a strict majority.
Seen in 1 report
-
The throttle identity was taken from a client-controlled forwarding header instead of the real connection address.
Seen in 1 report
-
The ticket form did not verify that the submitter controls the email address or is logged in.
Seen in 1 report
-
The tier check passed the ERC4626 share balance into a function whose thresholds are in underlying assets.
Seen in 1 report
-
The tier reserved rate was not validated against the maximum constant and was cast to a 16-bit integer, allowing values far above the intended cap.
Seen in 1 report
-
The time value's format and range were not validated before storing, breaking the calendar rendering.
Seen in 1 report
-
The time-weighted average price gave excessive weight to the last traded price and ignored trade size, so small trades could manipulate it.
Seen in 1 report
-
The timelock function called transfer directly without checking its return value.
Seen in 1 report
-
The timestamp boundary in batch creation excluded the last request before the report timestamp while claim eligibility allowed any timestamp up to it.
Seen in 1 report
-
The timestamp check used inclusive comparisons for invalid conditions, rejecting the documented equality boundaries.
Seen in 1 report
-
The timestamp update required a non-zero token balance, so staking after a full withdrawal left it stale.
Seen in 1 report
-
The timestamp used in the mempool key was recalculated for every transaction in a batch instead of being read once, so duplicates could receive different floored timestamps.
Seen in 1 report
-
The TLS liveness check only polled the socket and never asked the TLS library whether decrypted data was pending, while the body read was clamped to content length.
Seen in 1 report
-
The toggle address change did not sync the current status from the old toggle before switching.
Seen in 1 report
-
The token address was read from the end of calldata without verifying the calldata length.
Seen in 1 report
-
The token contract did not include a dedicated function to mint treasury tokens, forcing a minter change that triggered a timelock and temporarily removed minting permission from the reward distributor.
Seen in 1 report
-
The token contract never initialised the verification address and did not reject minting when it was the zero address.
Seen in 1 report
-
The token gas price was an integer with no decimal precision, so the smallest unit was too large relative to gas costs for low-decimal tokens.
Seen in 1 report
-
The token ID parameter was declared as an 8-bit integer instead of a 256-bit one.
Seen in 1 report
-
The token ID parameter was declared as a 128-bit integer instead of 256-bit.
Seen in 1 report
-
The token inherited the default eighteen decimals instead of explicitly setting eight for a Bitcoin-pegged asset.
-
The token limit was validated only at proposal creation and not re-checked at execution.
Seen in 1 report
-
The token parameter was passed to a database query without ensuring it was a single string, so an array was accepted.
Seen in 1 report
-
The token price calculation included premium collected but did not subtract the performance fee that would be charged on it.
-
The token transfer happened before the state update without an atomic transaction or cached context.
Seen in 1 report
-
The token transfer helper did not check whether the token address contained contract code, so calls to empty addresses returned success.
-
The token-sending helper did not wrap native ETH into wrapped ETH before attempting the transfer.
Seen in 1 report
-
The tokenize function ignored the return values of the score update, so totals were never refreshed.
Seen in 1 report
-
The tokens receiver variable was only set in the initializer and had no setter.
Seen in 1 report
-
The top-up bonus slice was recalculated against the current pool state on each call, so splitting a deposit into chunks let each chunk capture the full bonus.
-
The top-up calculation used the short order's stored price and collateral ratio instead of the current price and a minimum initial ratio.
Seen in 1 report
-
The top-up function assigned the multiplier from the initial lock duration instead of the newly calculated average duration.
-
The total assets calculation included tokens donated directly to the dispatcher even though that balance was not used in any fund flows.
Seen in 1 report
-
The total assets function read the pool balance without updating the liquidity index first.
Seen in 1 report
-
The total assets function returned a cached value that deposit and withdraw previews used while withdrawal calculations used the actual value.
Seen in 1 report
-
The total assets function returned only the reward pool balance and omitted earned but unclaimed rewards.
-
The total collateral counter was incremented on deposits but never decremented on withdrawals.
Seen in 1 report