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 transfer to the referral destination is always attempted and any failure reverts the whole transaction, and the creator can change the destination at any time.
Seen in 1 report
-
The fee used the raw requested count while the oracle silently capped returned records.
-
The fee was a percentage of the strike price rather than the premium, so zero-strike options paid nothing.
Seen in 1 report
-
The fee was calculated on the post-fee quote amount, understating it for shorts.
Seen in 1 report
-
The fee was calculated only on the initial lent amount, not on the premium after orders executed.
Seen in 1 report
-
The fee was computed from raw input amounts instead of amounts normalised to the current pool ratio, so fee charged and fee credited diverge.
-
The fee was computed from the order's listed price instead of the amount filled.
Seen in 1 report
-
The fee was computed from the output amount of the last pool in the route rather than from the input amount or from each step.
Seen in 1 report
-
The fee-assessment path reuses the same last-update timestamp that the entry and exit cooldown check relies on.
Seen in 1 report
-
The fee-claim function reads the gauge's total token balance instead of only the fees received from the collect call.
Seen in 1 report
-
The fee-inclusive calculation subtracts fees from the amount before those fees are applied instead of dividing by the sum of fees plus one hundred percent.
Seen in 1 report
-
The file locking mechanism does not verify the file exists before applying the lock.
Seen in 1 report
-
The file was written to its final destination before hash verification and not deleted on mismatch.
Seen in 1 report
-
The fill fraction is stored in a narrow integer type without checking that numerator and denominator fit.
Seen in 1 report
-
The fill function defaults the remaining liability but does not delete the remaining auction data.
-
The fill price is pinned to the first oracle print after commit but the order lifetime is chosen by the trader, so a short deadline acts as free cancellation.
-
The fill-or-kill check reverted on any remaining amount instead of only when the remainder was at least the lot size.
Seen in 1 report
-
The filter compared raw code points rather than normalising the visual appearance of the text.
Seen in 1 report
-
The filtered slice was created but never assigned back, so the original unfiltered list was used.
Seen in 1 report
-
The filtering layer and the backend resolve duplicate parameter names by different rules, so the validated value is not the acted-on value.
Seen in 1 report
-
The final auction end is set to a duration rather than an actual timestamp, so the end check is ineffective.
-
The final balance check and transfer used the user-supplied receiving asset id rather than the asset returned by the last swap.
Seen in 1 report
-
The final check demands an exact zero borrow balance instead of checking the account is no longer in shortfall.
Seen in 1 report
-
The final holder's share is computed as the whole remaining amount rather than their proportional balance.
-
The final payout setter lacked a check that the payout had not already been finalised.
Seen in 1 report
-
The finalisation check required the validator to be active at claim time rather than checking whether the timelock had already completed.
Seen in 1 report
-
The finalisation check required the validator to be active without comparing the timelock expiry against the deactivation timestamp.
Seen in 1 report
-
The finalisation logic assumed tokens only arrive during finalisation, but with a zero cooldown they arrive earlier, so the balance difference is zero.
-
Withdrawal finalisation required every withdrawal request to succeed before releasing any funds, with no minimum position size to avoid rounding failures.
Seen in 1 report
-
The fingerprint comparison is wrapped in a length check, so a wrong-length value skips verification instead of failing.
Seen in 1 report
-
The finish-liquidation function transfers tokens without calling the internal accounting function to update the recorded reserve balance.
Seen in 1 report
-
The firmware did not parse or validate the unlock time field before signing.
Seen in 1 report
-
The firmware update process compares version strings with integer comparison operators, so the version checks always fail and any firmware version is accepted.
Seen in 1 report
-
The first deposit set total liquidity units directly with no minimum locked.
Seen in 1 report
-
The first mint does not lock a minimum amount of liquidity, so the share price can be manipulated.
-
The first-deposit logic assumes pool reserves are dust, but after a module change the new module holds the entire liquidity, so the dust-removal sends all funds to the manager.
-
The fix disabled liquidations only while repay was paused but added no grace period after repay resumed, so repayments could be frontrun.
Seen in 1 report
-
The fixed liquidator reward and liquidation discount are too small relative to gas cost when a slashing reduces the underlying value of stETH shares.
Seen in 1 report
-
The fixed rate is computed from current floating debt rather than an average, so it can be moved within one block.
Seen in 1 report
-
The flash fee function returns the change fee directly without scaling for token decimals.
Seen in 1 report
-
The Flash file allowed all domains and accepted a URL parameter that loaded and executed external SWF code.
Seen in 1 report
-
The flash loan function transfers only the pool fee and omits the protocol fee.
Seen in 1 report
-
The flash loan path updates the reserve supply but does not cache the reserve, so a later action reloads the stale value.
Seen in 1 report
-
The flash loan trusts the token's transfer return value instead of comparing pool balances before and after.
Seen in 1 report
-
The flash-loan path validates only per-reserve pause state and never checks the global pause flag.
Seen in 1 report
-
The flashAction callback omits the initiator address from its parameters.
Seen in 1 report
-
The flashloan fee was derived from a swap fee set by the first swap in each block.
Seen in 1 report
-
The flip detection multiplies the new vote by a zero tally, so the condition fails to detect a flip.
Seen in 1 report
-
The flow reserved the subdomain before verification and had no cleanup when registration failed.
-
The for and against vote indices are swapped in the success comparison.
Seen in 1 report