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 retained-basket coverage check compares each stored feed time against the basket's newest component time and its revert is thrown during cache preparation outside the per-item catch boundary.
-
The retarget uses a single author-controlled timestamp delta with an asymmetric bound and stores the author's timestamp as the next baseline.
Seen in 1 report
-
The retry logic resets the request but fails to clear redirect-related state such as the redirect queue, last URL and attribution helper.
Seen in 1 report
-
The return statement combines the two refinance conditions with a logical AND instead of OR.
-
The return value of ERC20 approve is not checked during listing validation.
Seen in 1 report
-
The return value of the folder-parsing call in the encryption check is ignored, so a failed parse leaves the coder count at zero and the folder is reported as unencrypted.
Seen in 1 report
-
The return value of the refund transfer was ignored, so a failed refund left the overpaid amount in the contract.
Seen in 1 report
-
The return value of the swap giving the adopted asset was not used, and the local asset was passed to the loan repayment.
Seen in 1 report
-
The reuse comparison only looked at the primary TLS config and never compared the client key, key password, key type or certificate type.
Seen in 1 report
-
The reuse coverage check compares each stored feed against the basket's newest component time instead of that feed's own time.
-
The reuse coverage loop compares each feed against the basket's newest component time instead of the oldest, so a freshly parsed basket cannot satisfy its own check.
-
The revenue waterfall fills the Senior gap before the queued recapitalisation is applied, so the recapitalisation meets a closed gap and its remainder is parked as unassigned assets.
-
The revenue-tagging condition only queues revenue when both stored tranche principals are zero, so with senior principal still nonzero the revenue is not reserved.
-
The reverse simulation calculation for stable swaps omitted the extra fees from the fee deduction step.
Seen in 1 report
-
The review endpoints lacked authentication and the schema carried no purchase reference, so the verified label was never enforced server-side.
-
The review page reads the partner's current business email without checking verification status.
-
The revoke function subtracts the full original vesting amount from total supply instead of only the still-unwithdrawn amount.
Seen in 1 report
-
The reward accounting let both stakers and game players claim the same yield from a shared reward pool.
Seen in 1 report
-
The reward accounting updates the last update timestamp even when total supply is zero, so rewards accrue to nobody.
Seen in 1 report
-
The reward amount is computed once at creation and never recalculated as the voting balance decays.
Seen in 1 report
-
The reward calculation adds the open draw's reserve after the draw is already closed.
Seen in 1 report
-
The reward calculation did not check whether a deposit's lock had expired.
Seen in 1 report
-
The reward calculation divided by the whole pool's liquidity time weight instead of only the weight of eligible positions.
Seen in 1 report
-
The reward calculation has no time-weighted checks and no front-running protection on deposits.
Seen in 1 report
-
The reward calculation ignores the L1 data fee that depends on calldata size.
Seen in 1 report
-
The reward calculation iterates over multiple checkpoints created in the same epoch, double-counting the balance.
Seen in 1 report
-
The reward calculation queried the current locked balance per token ID at claim time instead of using a checkpoint of balances at the epoch start, so transferring tokens to a new token ID within the same block bypassed the check.
Seen in 1 report
-
The reward calculation reads the user's balance from the stake tracker, which is updated before the reward debt is reset.
Seen in 1 report
-
The reward calculation returns the stored reward per token unchanged when total supply is zero but still advances the last update block.
-
The reward calculation returns zero when the user has no effective stake, and the withdrawal function overwrites the accrued balance with that zero instead of preserving it.
Seen in 1 report
-
The reward calculation rounds the deposit time down to the start of the week, ignoring the actual duration funds were present.
-
The reward calculation used only the user's shares, not the amount being unminted, so partial unmints paid as if all shares were unminted.
Seen in 1 report
-
The reward calculation used the live token balance at update time, so deposits made after rewards arrived were treated as having earned them.
Seen in 1 report
-
The reward calculation uses a denominator of 1e18 while the accumulator values are in 9 decimals, causing the result to have only 9 decimals precision instead of the required 18 for the reward token.
-
The reward calculation uses a global available rewards figure that does not subtract rewards already accounted for by other pools.
-
The reward calculation uses a single rewards per second for the entire duration since the last update, ignoring when the new schedule should take effect.
Seen in 1 report
-
The reward calculation uses the current lock configuration for all past epochs.
Seen in 1 report
-
The reward calculation uses the timestamp when the randomness request was made instead of when the randomness result became available, including the fulfilment delay.
-
The reward calculation uses the voting checkpoint at the end of the previous epoch, which can be overwritten after total voting is reset.
Seen in 1 report
-
Critical
-
-
The reward debt is updated after transferring funds, so a reentrant mint increases total reward debt before the developer's debt is recorded.
Seen in 1 report
-
The reward debt is updated before the token transfer, and the transfer failure is caught without reverting.
-
The reward distribution logic did not handle the case where the NFT owner is the zero address after burning, and the ERC20 token rejected transfers to that address.
Seen in 1 report
-
The reward distribution returned early when coverage was zero without forwarding or refunding the interest already transferred to it.
-
The reward fractions for multiple start draws and the finish draw are calculated independently without ensuring their sum does not exceed 1.0.
-
The reward function derives the campaign week from the callback timestamp instead of the stored start-spin timestamp.
Seen in 1 report
-
The reward function used the creation timestamp of the caller-supplied last proposal without filtering out ineligible proposals.
-
The reward function was passed the lien's remaining amount instead of the payment amount.
Seen in 1 report
-
The reward index update returns early when total staked is zero, leaving the last minted timestamp unset.
-
The reward logic assumes sufficient balance and mishandles decimal scaling.
Seen in 1 report
-
The reward logic checks the contract's own token balance rather than the actual deposit amount.
Seen in 1 report