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 fee amount, which was in value terms, was subtracted directly from the USDC balance without dividing by the settlement token price to convert it to USDC units.
-
The fee calculation added the value of early withdrawals to vault assets, so early withdrawers were counted but not charged.
-
The fee calculation compounds based on the time since the last fee charge, so the effective annual rate depends on how frequently the function is called.
Seen in 1 report
-
The fee calculation counts all prizes in the claim array as successful claims, even if some are already claimed or revert, leading to an incorrect lower fee per claim.
-
The fee calculation divides by 1,000 although the fee is stored in basis points.
Seen in 1 report
-
The fee calculation divides by the total fee rather than using the correct formula with the settlement fee percentage.
Seen in 1 report
-
The fee calculation ignored the number of requested versions and summed fees for all payloads.
Seen in 1 report
-
The fee calculation is applied only when opening a position and not when adding margin later.
Seen in 1 report
-
The fee calculation uses the dirty liquidation fee for partial liquidations but does not reserve enough collateral for the final liquidator.
Seen in 1 report
-
The fee calculation uses the wrong formula and an incorrect overflow condition, under-collecting fees.
-
The fee call passed a hardcoded period count of one instead of the user-supplied records value.
Seen in 1 report
-
The fee can be changed instantly by the pool manager with no delay.
Seen in 1 report
-
The fee change function only rejects zero values and enforces no upper or lower bounds.
Seen in 1 report
-
The fee deduction sat in a branch shared by external and internal swaps instead of only the external path.
Seen in 1 report
-
The fee denominator used BASE minus feePct instead of BASE, so fees were overstated.
Seen in 1 report
-
The fee destination is stored as an immutable value in each NFT contract instead of being read from the factory.
Seen in 1 report
-
The fee formula used the whole minimum price factor instead of only the profit portion and omitted dividing by the fee denominator.
-
The fee function returned early when the time since the last charge was below the delay, so a small deposit shielded a large one.
Seen in 1 report
-
The fee getter returned the tip instead of the fee cap for certain transaction types, making the cap check ineffective.
Seen in 1 report
-
The fee handler mints DAO fees but never approves the governance contract to transfer them, and the failure is swallowed.
-
The fee in the transfer message was not validated against the transferred amount or a maximum, so an attacker could set it arbitrarily high.
Seen in 1 report
-
The fee is a floating-point value rounded to two decimals, so small fractional fees round down to zero.
Seen in 1 report
-
The fee is calculated as a percentage of the current total supply and then minted directly, without accounting for the dilution caused by the minting itself.
Seen in 1 report
-
The fee is calculated from actual gas used during transfer, which the seller's token can inflate.
Seen in 1 report
-
The fee is calculated on collateral amount rather than outcome volume, making equivalent trades asymmetric.
Seen in 1 report
-
The fee is calculated on the total funds provided rather than the amount actually spent on votes.
Seen in 1 report
-
The fee is calculated only on the amount explicitly transferred, not on the total balance increase after Swivel orders execute.
Seen in 1 report
-
The fee is computed from the user-supplied input before the last-buy branch changes the actual SOL amount.
Seen in 1 report
-
The fee is computed with the debt amount as the base instead of the collateral bonus, contrary to the stated intent.
Seen in 1 report
-
The fee is deducted from the returned fill amount at the end of the buy-all function, so the return understates the gross spend.
Seen in 1 report
-
The fee is only paid when the escrow balance is sufficient, and nothing is paid otherwise.
-
The fee is subtracted from the deposit before pulling funds instead of pulling the full margin and accounting for the fee separately.
Seen in 1 report
-
The fee is subtracted from the subsidy amount but the separate transfer that would collect it is omitted.
Seen in 1 report
-
The fee is taken upfront on the theoretical reward amount rather than the rewards actually used.
Seen in 1 report
-
The fee logic did not distinguish a genuine liquidation where the caller supplies capital from a forced earmark repayment using the victim's collateral.
Seen in 1 report
-
The fee logic used a strict greater-than comparison against the exit window start, so at the exact start timestamp the full-fee branch was skipped.
Seen in 1 report
-
The fee parameter can be updated instantly with no rate limit.
Seen in 1 report
-
The fee payout was tied to msg.sender being the executor rather than to the designated executor address, and agents were allowed to call executeMinting with no delay protecting the executor.
Seen in 1 report
-
The fee rate is mutable and calculated at fill time rather than fixed when the order was signed.
-
The fee rate is not fixed per vault at creation and can be changed by the owner at any time.
Seen in 1 report
-
The fee rate was derived from the post-burn ratio and applied uniformly to the whole amount instead of integrating across the ratio range crossed.
Seen in 1 report
-
The fee recipient account is user-supplied and not validated against a trusted pool-configured address.
-
The fee refund logic did not check whether the account had actually paid the fee before crediting it back.
Seen in 1 report
-
The fee relied on the difference between pre- and post-balance of reward tokens, which an attacker could zero out by harvesting first.
Seen in 1 report
-
The fee rounds down to zero for small amounts and the early repayment discount draws on the pool's unassigned earnings.
Seen in 1 report
-
The fee setter had no upper bound, so the manager could set a fee above the base amount.
Seen in 1 report
-
Medium
-
-
The fee setter lacks an upper bound, allowing a rate that causes an underflow in the exercise calculation.
-
The fee setter lacks an upper bound, allowing a value that overflows the fee calculation.
Seen in 1 report
-
The fee share calculation used the deposit conversion formula, which assumes total assets increase, but minting fee shares only increases supply.
Seen in 1 report
-
The fee timestamp is only updated when the base asset is processed, so other reports in the batch reuse the old timestamp.
Seen in 1 report