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 design assumes liquidations are involuntary, so freeze-period liquidations skip the frozen-close spread and execution fee even though a trader can control when their own account becomes liquidatable.
-
The design only allows resolution by merkle root, with no invalidation or cancellation mechanism.
Seen in 1 report
-
The design tied the execution fee update to a timestamp change that invalidated the oracle price, preventing users from adjusting the fee independently.
Seen in 1 report
-
The design used a single precision parameter for both min and max prices, which fails when the min price is close to the maximum representable value for that precision.
Seen in 1 report
-
The destination address was encoded with padded encoding instead of packed encoding, so the receiver loaded the wrong twenty bytes.
-
The destination bridge did not verify that the execute calldata matched the original signed by the sequencer.
Seen in 1 report
-
The destination chain sends the seize message without first pulling or escrowing the liquidator's repayment tokens, so the two halves of the swap are not atomic.
Seen in 1 report
-
The destination deposit check uses amount plus reaping dust while the actual credit uses only the amount.
-
The destination gas limit is hardcoded instead of using the user-supplied value from the event.
-
The destination gateway's token balance is not checked before the source-chain burn, so a failed transfer leaves funds stranded.
Seen in 1 report
-
The destination handler decodes the ERC20 payload and processes it as a transfer without checking that the method ID equals transfer.
Seen in 1 report
-
The destination receiver reverts on exceeding a hardcoded eligibility limit without triggering a refund on the source chain.
Seen in 1 report
-
The destination send function passed the contract's entire balance as the message value, so the excess was refunded to a user-supplied address.
-
The destroy routine required the pool balance to be zero, so any third party could keep it non-zero with a minimal deposit and block destruction indefinitely.
-
The destruction path deletes vault storage that the fee-claiming function depends on, without collecting outstanding fees first.
Seen in 1 report
-
The developer used transferFrom instead of transfer when sending tokens out of the contract.
Seen in 1 report
-
The developers assumed the market skim function refunds unused tokens to the caller, but it forwards the surplus to the Pendle treasury.
Seen in 1 report
-
The deviation check and the price calculation use different definitions of pool reserves.
Seen in 1 report
-
The diff comparison logic did not account for Git replace refs.
Seen in 1 report
-
The diff logic classified a record as a gasless upload with a plain string prefix check and suppressed the change without binding the URL to the current name.
-
The different-yield-source check compared addresses only, not whether the deposit tokens matched.
Seen in 1 report
-
The direction mask parameter is not validated and is ORed with the legitimate pool address.
-
The directory callback does not set the awaiting-nested flag when a nested analysis starts, so the analyzer reports completion before remaining entries are inspected.
Seen in 1 report
-
The disaster check used a strict less-than comparison instead of less-than-or-equal, so equality triggered a depeg.
Seen in 1 report
-
The discount comes from trusted configuration but the product identifier comes from the request, and the two are never checked to belong together.
-
The discount fee was a percentage of the entire debt instead of the amount traded at a discount.
Seen in 1 report
-
The discount is paid in another token but the staking step still subtracts a fixed WETH amount from reserves.
Seen in 1 report
-
The dispatch function did not create a new gas meter for the dispatched message, reusing the parent call's gas meter.
-
The dispatchable authenticated only the nominating account and never obtained authorisation from the target guardian before consuming that guardian's bounded index capacity.
-
The dispute creation function does not check whether a dispute is already active, allowing the disputer to be overwritten.
Seen in 1 report
-
The dispute game records the claimant as the transaction origin rather than the actual sender passed from the factory.
Seen in 1 report
-
The disputed L2 block number is not capped at the claimed block number, so the VM can be given a block beyond the claim.
Seen in 1 report
-
The distribute function returns early instead of reverting when an asset has zero shares, after the caller has already moved funds.
Seen in 1 report
-
The distribute function updates gauges before the minter updates the epoch, so the claimable amount is computed with stale index data.
Seen in 1 report
-
The distribution counter is incremented before being passed to the average function, so the first call uses one instead of two.
Seen in 1 report
-
The distribution logic paid each provision a fixed minimum interest when total interest equalled the minimum, ignoring relative provision sizes.
Seen in 1 report
-
The distribution ratio is computed twice and can be changed between the two calculations.
Seen in 1 report
-
The distributor replacement function does not settle outstanding rewards before switching to a new contract.
-
The dividend calculation used an average fee based on only the last twenty trades, which could be reset to zero.
Seen in 1 report
-
The domain comparison does not normalise Unicode lookalike characters before matching the deny list.
-
The domain is reserved for the project before any ownership check is performed.
Seen in 1 report
-
The domain lacks SPF and DMARC DNS records, so receiving mail servers have no policy to reject spoofed emails.
Seen in 1 report
-
The donate function increases the token balance without minting shares, allowing exchange rate manipulation when few shares exist.
-
The donate-to-reserve function burned the receipt token without reducing the matching debt, leaving debt unbacked.
Seen in 1 report
-
The donation limit is enforced per transaction rather than per block.
Seen in 1 report
-
The downgrade process did not revoke paid features or associated credentials.
-
The download feature resolves a tag name matching a merge request reference to the merge request commit.
-
The drawTimeoutAt function uses _lastAwardedDrawId + drawTimeout instead of _lastAwardedDrawId + drawTimeout + 1, causing the shutdown to occur one draw period early.
Seen in 1 report
-
The drip accrual does not check whether total supply is zero, so rewards accumulate with no stakers.
Seen in 1 report
-
The driver reset catchup from a watched safe-head value that only increases rather than from the new safe head carried by the reorg event.
Seen in 1 report