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.
-
Liveness and deepfake detectors rely on classifiers that synthetic media can fool and do not combine multiple signals.
Seen in 1 report
-
Loan storage was deleted before the debt transfer, so the lender address was zero.
Seen in 1 report
-
Location was decided from a client-controlled forwarding header rather than the real network source address.
Seen in 1 report
-
Lock bookkeeping is keyed to deposit events only, so share transfers change balances without updating the per-user stake entries.
Seen in 1 report
-
Lock duration is calculated from the current block timestamp without rounding to the start of the weekly cycle.
-
The lock position is stored per NFT index without checking for an existing owner.
-
Locked collateral is computed from the pre-subtraction debt and then a globally clamped free amount is subtracted without recomputing the raw locked value.
Seen in 1 report
-
Locked tokens were released twice, once during the burn and again in the acquire function.
Seen in 1 report
-
Locking funds omits the call that increases the action-locked balance.
-
The loop increment is placed only in the else branch so skipped indices are reprocessed.
-
Loss deduction is calculated per position against the current allocated balance instead of netting all positions first.
-
Loss protection applied to all pools without restricting which tokens could be paired.
Seen in 1 report
-
Low participation and lack of oversight let a single large token holder propose and vote through a transfer to themselves.
Seen in 1 report
-
LP positions are valued from current manipulable pool reserves rather than a manipulation-resistant ratio.
Seen in 1 report
-
LP value is derived from live token balances instead of the pair's stored reserves.
-
LP value was calculated from current pool balances and price, which a flash loan can manipulate within one transaction.
Seen in 1 report
-
LP balances from several users are aggregated under one address and the pool only allows transferring the whole aggregated balance.
-
LP tokens are burned before the reward fee is deducted.
-
LP tokens were calculated from the minimum share ratio, so excess from disproportionate deposits was not returned to the user.
Seen in 1 report
-
LP tokens were minted from the minimum of the two proportional shares without adjusting deposits to the pool ratio.
Seen in 1 report
-
LUP is calculated after removing the deposit but before adding it to the destination.
Seen in 1 report
-
LUP is calculated before the kicking penalty is added and not recalculated afterwards.
-
The LUP used in the check is calculated from the old deposit state with increased debt.
-
Mail routing settings did not enforce the domain ownership verification step required elsewhere in signup.
Seen in 1 report
-
The manager only trims and lowercases instead of applying full normalisation before availability checks.
-
manageToken only melts when the registry was not refreshed in the current block.
Seen in 1 report
-
Mappings were keyed only by the shift index rather than by market index.
Seen in 1 report
-
Margin calculation hard-codes six decimals and does not rescale AMM values.
-
Mass assignment: the server deserialised the whole request body into the transaction record without checking which fields the client could set.
-
Matching compares an aggregated item count and per-item membership instead of checking the taker multiset equals the maker multiset.
Seen in 1 report
-
Max deposit and max mint return a constant instead of checking the external vault's limits.
Seen in 1 report
-
MAX_BPS is defined as 1000 instead of the standard 10000.
-
maxDebtCached was set to the full debt when it was the last collateral, making neededToSaveVault zero.
-
maxDeposit checks only the deposit limit while deposit additionally reverts when the amount rounds down to zero shares.
-
Maximum liability took the larger of long and short envelopes without netting offsetting exposure held by the same owner, so a hedged pair consumed the whole risk capacity.
-
maxMint converted the absolute deposit limit to shares and subtracted totalSupply, which is not equivalent to converting only the remaining asset capacity once rounding and virtual shares apply.
-
maxMint converted the deposit limit to shares with floor rounding while mint converted those shares back to assets with ceiling rounding, so the round trip could exceed the limit.
-
maxMint converted the deposit limit with floor rounding while mint enforced an asset ceiling with ceiling rounding, and maxDeposit ignored the same limit.
Seen in 1 report
-
Merkle proof verification accepts empty proofs when the leaf equals the root and does not enforce minimum proof lengths.
-
Merkle proof verification does not distinguish leaf hashes from intermediate hashes.
Seen in 1 report
-
Migration built from a cached subgraph snapshot instead of reading the live registry immediately before submission.
-
The migration plan is built from cached discovery and submit only compares approval keys.
-
Minimum amount checks are hardcoded assuming 18-decimal tokens.
Seen in 1 report
-
Minimum output is calculated without adjusting for the token's decimals, so it is only correct for six-decimal tokens.
Seen in 1 report
-
Mint and burn functions lacked a slippage protection parameter.
Seen in 1 report
-
Mint and burn use different conversion methods that do not preserve the share amount when yield accrues.
Seen in 1 report
-
Mint and burn used one price feed instead of the ratio of both prices.
Seen in 1 report
-
Mint and redeem lacked minimum output parameters so users could not set slippage tolerance.
Seen in 1 report
-
Minted units were calculated from current reserves without a user-supplied minimum.
Seen in 1 report
-
Minted voting shares are not reduced when unvested backing tokens are recalled.
Seen in 1 report