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 credit function updates storage but not the in-memory shares, and the final save overwrites storage with the stale value.
Seen in 1 report
-
The credit paths called increase_balance without the accompanying record_transfer call that creates the zk-tree leaf needed to exit funds.
-
The credits variable was assigned rather than accumulated inside the loop over legs.
-
The cross-chain call is made without attaching a relayer fee.
-
The cross-chain deposit path called the vault deposit function from the composer without verifying the original depositor's restricted role.
Seen in 1 report
-
The cross-chain transaction sender is set to the transaction signer rather than the address that emitted the event.
-
The cross-chain TVL update stores the raw amount from the source chain without converting to the base chain token's decimals.
-
The CSP was deployed in report-only mode instead of enforcement mode, so violations were not blocked.
Seen in 1 report
-
The cumulative accumulator added the previous average price rather than the last observed spot price, and elapsed time was recovered by dividing cumulative price by average price.
-
The cumulative index field is never written back during reward accrual.
Seen in 1 report
-
The cumulative rate function does not write back the updated last event time.
-
The curator implements a submit function for adding an adapter but omits the matching one for removal.
Seen in 1 report
-
The current lender manager address is used as a marker in the bid's lender field, so changing it breaks the link to the NFT owner.
Seen in 1 report
-
The current manager fee rate is applied to pending fees without first checkpointing or collecting those fees at the old rate.
Seen in 1 report
-
The current price function includes the moving average as a component when storing a new moving average.
-
The current week is cast to an 8-bit integer before indexing the jackpot prize array, so it wraps after 255.
Seen in 1 report
-
The current-password check on the delete-account endpoint had no rate limit or lockout.
Seen in 1 report
-
The cursor bounds checked only the bin and position, not the bin's token composition, which could be manipulated independently.
-
The curve setters did not check that each point was greater than or equal to the previous one.
Seen in 1 report
-
The custom CAPTCHA was enforced only for well-known public email providers, so any other domain skipped it.
Seen in 1 report
-
The DA layer trusted the outer sequence number supplied by the submitting node instead of checking it against the signed inner transaction.
-
The DA layer trusted the transaction ID supplied by the submitting node instead of recomputing it from the signed transaction data.
Seen in 1 report
-
The daemon did not limit the number of ephemeral associations that could be created under one trusted key.
Seen in 1 report
-
The daily allowance check is applied only in the mint function and not in transfers.
-
The daily limit and email verification were enforced only in the page interface, not on the backend endpoint that processes the download.
-
The daily limit reset ran after the limit had been increased in withdraw or repay, overwriting the increased value.
Seen in 1 report
-
The daily withdrawal limit was tracked globally for the vault rather than per user.
Seen in 1 report
-
The dataCopy precompile returned the input slice directly instead of making a deep copy.
Seen in 1 report
-
The date calculation reuses the original day of month without checking it exists in the target month.
-
The deallocate and transfer allocation functions lack a check that the counterparty is not in liquidation.
-
The deallocate function calls the vault withdraw without a minimum-shares-out or slippage check.
Seen in 1 report
-
The deallocate function did not account for the lending pool's token rounding and requested more than the strategy's balance.
Seen in 1 report
-
The deallocate function redeems only the nominal underlying amount, leaving appreciated shares behind.
-
The deallocate function returns the requested amount rather than the actual redeemed amount when dust logic redeems all shares.
-
The deallocation approves and returns only the exact requested amount, ignoring yield accrued in the adapter.
Seen in 1 report
-
The deallocation wraps only the redeemed ETH rather than the requested amount, so the wrapped balance falls short of the required amount.
-
The debond fee is already subtracted inside the weighted index conversion and is then subtracted again by the unwrap fee adjustment.
-
The debt asset is transferred before the interest rate update, so the added liquidity is counted twice.
Seen in 1 report
-
The debt calculation omitted owed realised PnL.
Seen in 1 report
-
The debt increase function lacked the isAllowed check present in the collateral addition function.
Seen in 1 report
-
The debt reporting function accepts a user-supplied list of vaults, allowing selective reporting that omits loss-making vaults.
-
The debt subtraction caps the amount freed but does not re-evaluate rawLocked, so a later sync uses stale values.
-
The debt subtraction computes the amount to free with the new higher ratio and leaves a positive residual lock.
Seen in 1 report
-
The debug flag is checked before the internal flag, so a transaction with both takes the debug path.
Seen in 1 report
-
The decay calculation set the amount in flight to zero when it was less than the decay instead of keeping the original amount.
Seen in 1 report
-
The decimal scaling factor in the sqrt price formula was wrong in both branches.
Seen in 1 report
-
The decoder did not verify that the entire input was consumed, so trailing bytes were accepted.
Seen in 1 report
-
The decrease leverage override passes the contract's own address to the vault withdraw call instead of the position address from the parameters.
Seen in 1 report
-
The decrease path cancels stop orders by removing them from storage without calling the refund logic used in normal cancellations.
Seen in 1 report
-
The decrement loop skips zero-lifetime slots and exits early without handling the case where total lifetime across slots is less than the value to decrement.
Seen in 1 report