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.
-
Released rewards are calculated from the time since the last configuration rather than since the reward start.
-
The code relies on msg.value inside a new execution context where it is not preserved.
-
Removal and revocation functions did not subtract the removed nominee's slope from the aggregate slope.
Seen in 1 report
-
Removal logic treated a deactivated account as not removable while its messaging account was still active.
Seen in 1 report
-
Removal set the nominee's weight to zero for the next week, and the removal epoch's incentive calculation used that zero weight.
-
removeCollateral does not check that the position is settled or unexpired before allowing withdrawal.
-
Removed liquidity is increased with an unchecked addition that assumes the total can never exceed the maximum 128-bit value.
-
removeOriginalAllocation reset the allocation to zero without calling the reward update first.
-
removeStrategy is implemented without a corresponding timelocked submission function.
-
Removing a pool from the whitelist does not clear its stored arbitrage profit figure, so the data survives and is reused on re-whitelisting.
-
Removing a reward token deletes it from the list without resetting per-token and per-user reward accounting, so re-adding restores stale state.
-
Removing an address from the exclusion list does not adjust the total liquidity counters that were skipped for it.
Seen in 1 report
-
Removing an entry shifts later array elements down, so callers holding old indexes point at different requests.
Seen in 1 report
-
Removing extra reward entries without first withdrawing and claiming the staked amounts leaves tokens locked in the contract.
Seen in 1 report
-
Medium
-
-
The source position index is removed before the move and never re-added on a partial move.
-
Repay and forced repay reduce the earmark but omit updating the last transmuter token balance.
Seen in 1 report
-
Repay decrements the earmarked amount without adjusting the collateral position, so a later sync removes collateral on a stale position.
Seen in 1 report
-
Repay logic transfers only the base debt to the lending pool and never routes the fine portion to a recipient or admin withdrawal function.
Seen in 1 report
-
Repayment and bond withdrawal hard-code the caller as recipient with no alternative address parameter.
-
Repayment logic assumes the borrower's ERC20 approval stays in place, so a borrower can block the extra transfer by revoking it.
Seen in 1 report
-
Repayment normalises the underlying amount using only a fixed conversion factor and ignores the token's market price.
-
Repayment pushed the debt token directly to the lender, so a blocked lender made every repayment revert.
Seen in 1 report
-
Repayment transferred tokens to the contract without burning them, so supply grew without matching collateral.
Seen in 1 report
-
Reproving requires the same output index as the original proof, so a changed root at another index cannot be used.
Seen in 1 report
-
Reputation logic added bounty-based points on every award event instead of once per report.
Seen in 1 report
-
Reputation was awarded on every resolve transition without checking whether the ticket had already been resolved.
Seen in 1 report
-
Requiring the destination handler to be whitelisted forces the handler to whitelist itself, enabling same-chain messages that unlock without burns.
-
Reservation functions check only the minimum stay and omit a check that the period falls within the stored availability window.
Seen in 1 report
-
Reservations are created with a zero deposit and the period is marked unavailable before any payment or approval.
Seen in 1 report
-
Reserve functions rely on the false invariant that total borrow never exceeds total supply.
Seen in 1 report
-
Reserves and output amounts are calculated without verifying the actual token balance after a transfer, so sender-side fees make stored reserves exceed the real balance.
Seen in 1 report
-
Reset updates the last-voted timestamp without checking that the token has active votes.
Seen in 1 report
-
Residual pending recapitalisation is reserved against withdrawal free assets, so when the reserve exceeds twice the distributable equity the redemption budget is zero.
Seen in 1 report
-
Resolver events were selected by namehash alone without cross-checking the registry.
Seen in 1 report
-
Response validation skipped integrity checking for the initial unauthenticated request and accepted a success response without a valid integrity attribute.
Seen in 1 report
-
Restrictions were enforced only on the client side or state changes were not validated on the server.
Seen in 1 report
-
The return statement is placed before the success check on the value transfer.
-
Returning the service NFT and transferring rewards happened in one transaction, so a reward transfer failure reverted the unstake.
Seen in 1 report
-
Revalidation was limited to Isolated Web Apps and the silent manifest update exited early when the manifest was unchanged, comparing unvalidated scope_extensions instead of re-checking the stored validated ones.
Seen in 1 report
-
Revocation subtracts only the withdrawable amount from the voting checkpoint instead of the total revoked amount.
Seen in 1 report
-
Reward accrual multiplied balance by time without accounting for emission rate changes.
Seen in 1 report
-
Reward accumulation is skipped when total supply is zero and there is no way to redistribute or recover the unallocated rewards.
-
Reward amounts and token balances are cached and assumed constant, so balance changes break later operations.
Seen in 1 report
-
Reward amounts are stored by assignment instead of addition, so duplicate token entries overwrite each other.
Seen in 1 report
-
Reward calculation starts from the first deposit block and ignores the epoch start block.
Seen in 1 report
-
Reward calculation uses checkpoint timestamps and rates without checking whether the user had an active stake during the interval, and user validator entries are not cleared on unstake.
Seen in 1 report
-
Reward calculation uses the rate at the start of a segment without checking whether the validator was inactive during it.
-
Reward claim reads the current NFT owner after transfer instead of the owner recorded at subscription.
Seen in 1 report
-
Reward debt is updated with the untrimmed pending reward while only the trimmed amount is sent, and the greater-than-zero check uses the untrimmed amount.
Seen in 1 report
-
Reward debt was stored with 36 decimals but updated with an 18-decimal amount, understating it.