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.
-
A staging subdomain retained an open registration endpoint and the invitation flow used a hardcoded localhost redirect.
Seen in 1 report
-
A stale previous-block score was used when subtracting the governance delta after a user lost eligibility.
Seen in 1 report
-
A stale workaround in the permission message provider removed the New Tab Page override permission from both comparison sets, so adding that override was never treated as a privilege increase.
Seen in 1 report
-
A state-changing function lacks the checkpoint modifier, so balance changes never propagate to the votes contract.
Seen in 1 report
-
A stateful custom fee collector is paired with a generic weight benchmarked without it.
-
A static flag makes the captcha check run only once per request and later calls return true.
Seen in 1 report
-
A static share amount per user was combined with a rebasing total supply, so the ratio drifted as interest accrued.
Seen in 1 report
-
A staticcall is used to invoke a gauge function that writes to storage, so it always reverts and returns zero.
Seen in 1 report
-
A stopped state variable is set but never read, and the closed check is hardcoded to return false, so the pause logic is disabled.
-
A strict equality check between the live token balance and tracked collateral minus loss can be broken by unsolicited transfers.
-
A strict greater-than check against a minimum of zero rejects the boundary value.
Seen in 1 report
-
A strict greater-than comparison excludes the valid boundary value of the health factor.
Seen in 1 report
-
A strict greater-than comparison is used where greater-than-or-equal is needed, so equal shares and assets block the rollover.
Seen in 1 report
-
A strict greater-than-or-equal check skips clearing entirely instead of clearing the maximum possible amount.
Seen in 1 report
-
A strict less-than comparison was used instead of less-than-or-equal when checking whether the current time is still inside the reward epoch, mishandling the boundary.
Seen in 1 report
-
A strict less-than length check rejected the maximum value.
Seen in 1 report
-
A struct variable was assigned by reference rather than copied, so later modifications to the original also changed the supposed copy.
Seen in 1 report
-
A subaccount was only added to the vault's internal list when an order filled, so posted collateral was excluded from total assets.
-
A subtraction in settlement could underflow when the bonded amount exceeded the other operand, which happens with late bonding or small multiplier and decrement values.
-
A swallowed quote error left the funding value null, removing the estimate hedge and disabling the affordability guard.
-
A swap in the flash loan liquidation function had no minimum receive parameter unlike similar functions.
Seen in 1 report
-
A ternary picks the larger of the adjusted cap and the DAO target instead of the smaller, and the result is never enforced.
Seen in 1 report
-
A ternary uses reward minus balance instead of balance when the pool holds less than the reward.
Seen in 1 report
-
A testing value of 60 days was left as the stale price threshold instead of the intended 30 days.
Seen in 1 report
-
A tier's beneficiary was not stored when it matched the current default, relying on a fallback that later changed.
Seen in 1 report
-
A time duration was passed as the number of snapshots to the EMA function.
Seen in 1 report
-
A timestamp in seconds is subtracted from a week count and compared to 2, mixing units.
Seen in 1 report
-
A token amount was added directly to a USD value without conversion.
-
A token transfer was made without checking the amount was greater than zero, so tokens that revert on zero transfers blocked the claim.
Seen in 1 report
-
High
-
-
A total was cast from a wider to a narrower unsigned integer without checking the maximum value.
Seen in 1 report
-
A transcription error when copying the boost table into the contract leaves one entry different from the documented value.
Seen in 1 report
-
A transfer library that does not check the token address has code is used instead of one that does.
-
A try/catch swallows the callback revert when paused, so funds move without updating the accounting.
-
A typo where a subtraction expression was written instead of an assignment meant the computed adjusted long amount was discarded and the variable kept its default zero value.
Seen in 1 report
-
A typo where the assignment operator was replaced by the equality operator, so the status field is compared rather than updated.
Seen in 1 report
-
A typographical error used a non-existent proposal type instead of the grant type, changing quorum logic.
Seen in 1 report
-
A typographical error uses the wrong variable when fetching the exchange rate inside the quote loop.
-
A uint32 parameter was compared against a value scaled by 1e18, so ordinary values overflowed the type.
Seen in 1 report
-
A user-controlled value is used as a proxy for whether finalisation occurred instead of a dedicated state variable.
Seen in 1 report
-
A user-supplied mail_from value was passed to the mail library without checking it belonged to the user or the site.
Seen in 1 report
-
A user-supplied strategy identifier was trusted for the LTV check without confirming it matched the user's actual strategy.
Seen in 1 report
-
A variable mix-up passes the old borrowing key where the newly generated key was intended.
-
A variable was used in the fee calculation before assignment, defaulting to zero.
Seen in 1 report
-
A very short bidding window combined with cheap block space lets one bidder exclude all other bidders.
Seen in 1 report
-
A wad multiplication function was used on a value that was not in wad format, causing an unintended division.
-
A wall-clock timestamp is converted to a monotonic clock value using saturating subtraction, which floors to zero after a restart.
-
A wide gap between high and low price bounds in a lookup table entry makes the iterative reserve calculation overshoot and never converge.
-
A withdrawal calculation could go below zero and cast to an unsigned zero, avoiding streaming tokens while earning rewards.
Seen in 1 report
-
A zero previous survival is replaced with one at the weight limit, so later increments are no longer scaled down.
-
A zero withdrawable amount is treated as a special case returning the asset unit instead of zero.
Seen in 1 report