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 exercise function transferred the strike unconditionally without checking for zero, which fails for tokens that revert on zero transfers.
Seen in 1 report
-
The exit cost derived from a value any user could increase, with no maximum-cost parameter.
Seen in 1 report
-
The exit function does not check that the destination is not mainnet for tokens native to the side chain.
-
The exit function returns the recipient's total balance of the output token instead of the balance difference.
Seen in 1 report
-
The exit functions hardcode the use-ETH flag instead of checking whether the pool's ETH index token is native or wrapped.
-
The exit logic requires the temporary cash balance to be exactly zero after repaying debt, but a positive balance is not refunded.
Seen in 1 report
-
The exit parameters return an empty minimum amounts array.
Seen in 1 report
-
The exit settlement credited the miner with increase_balance but omitted the record_transfer call that would insert a spendable zk-tree leaf.
Seen in 1 report
-
The expiration check uses strict greater-than instead of greater-than-or-equal.
Seen in 1 report
-
The expiration comparison operator is reversed, marking proposals expired while still within the voting period.
Seen in 1 report
-
The expired redemption function hardcoded the minimum token out to zero, removing slippage protection on the downstream swap.
Seen in 1 report
-
The Expired state is treated as final for cancellation but is derived from a mutable grace period.
Seen in 1 report
-
The expiry check compares the raw timestamp while the token ID rounds down to the start of the day.
Seen in 1 report
-
The expiry check used a strict less-than comparison, so an option was still valid at the exact timestamp a new epoch could start.
-
The expiry condition uses a strict greater-than comparison instead of greater-than-or-equal, so the current block is not considered expired.
Seen in 1 report
-
The expiry event is scheduled unconditionally at delegation creation while the matching active event is only scheduled after covenant signatures arrive.
Seen in 1 report
-
The exponential decay term was divided by the scaling factor along with the flat term when only the flat term should be.
Seen in 1 report
-
The export function omitted the core team addresses field, so the admin list was lost.
Seen in 1 report
-
The extend function lacks a check that the current time is within the expiration date plus grace period.
Seen in 1 report
-
The extend-lock function does not check whether the lock has already ended.
Seen in 1 report
-
Medium
-
-
The extension branch updated only the creation timestamp and forgot to shift the grace period.
Seen in 1 report
-
The extension fee subtracts the initial fee from a maximum deadline fee floored at the daily rate, causing an underflow.
Seen in 1 report
-
The extension function does not check that the pledge's reward token is still whitelisted.
Seen in 1 report
-
The extension is added to the original bond period instead of the remaining epochs.
Seen in 1 report
-
The external deploy function does not round the expiry to the nearest day unlike the internal payout handler.
Seen in 1 report
-
The external functions return the pre-penalty preview value and the internal function emits pre-penalty amounts instead of the computed payout.
Seen in 1 report
-
The external reward contract lets any caller claim for another address, while the vault assumes it will be the one to trigger the claim.
-
The extra-incentive claim flag is hard-coded false in the routine claim path while the deallocation path passes true.
Seen in 1 report
-
The extrinsic writes into the guardian's bounded index without consent, and no path removes entries from it.
-
The factory caps the fee at a lower value than the fee module allows and silently returns the default tick-spacing fee.
Seen in 1 report
-
The factory does not check that the minimum value is strictly less than the maximum value.
Seen in 1 report
-
The factory has no function to withdraw tokens it receives and has approved no spender.
Seen in 1 report
-
The factory has no registry or uniqueness check on token name and symbol before deploying.
-
The factory stored the period size only inside each pair and never kept a factory-level current value, so createPair had nothing to apply to new pairs.
Seen in 1 report
-
The factory stored the vault address immutably while the launchpad's vault was mutable.
Seen in 1 report
-
The factory used a mutable receipt address while each quest stored an immutable copy at creation.
Seen in 1 report
-
The factory uses create with a nonce-derived address, which can be front-run or reorged.
Seen in 1 report
-
The failed-attempt counter was kept only in memory for the current app session, so restarting the activity cleared it.
Seen in 1 report
-
The failed-attempt counter was reset by any successful login from the same IP, letting the attacker control the counter state.
Seen in 1 report
-
The failed-login counter resets on any successful login regardless of which account was used.
Seen in 1 report
-
The failure handler did not allow retrying the arbitrary call and immediately marked the transfer ID as used.
-
The failure path skipped the revert but never refunded the value attached to the failed call, leaving it in the contract balance.
Seen in 1 report
-
The fallback assumes the recipient can handle WETH when a direct ETH transfer fails.
Seen in 1 report
-
The fallback branch sends the wrapped token to the payload execution target rather than a user refund address.
-
The fallback for an unspecified refund account used the immediate caller, which is always the dispenser contract.
-
The fallback handler redirected any top-level path that was a valid package name without checking it matched a known website route.
Seen in 1 report
-
The fallback interpreted zipped data without reserving the first four bytes, so the data could collide with a function selector.
Seen in 1 report
-
The fallback stored the owed amount under the recipient while redemption was keyed to the caller and gated by startOperation.
-
The fee accrual was computed purely from elapsed block time and did not check whether order creation or execution had been disabled.
Seen in 1 report
-
The fee amount was derived by subtracting the liquidity amount from the total collected, so previously withdrawn but uncollected liquidity counted as fees.