Skip to content

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.

Back to the lesson 1,451 to 1,500 of 5,700
  1. Released rewards are calculated from the time since the last configuration rather than since the reward start.

    Seen in 1 report
  2. The code relies on msg.value inside a new execution context where it is not preserved.

    Seen in 1 report
  3. Removal and revocation functions did not subtract the removed nominee's slope from the aggregate slope.

    Seen in 1 report
  4. Removal logic treated a deactivated account as not removable while its messaging account was still active.

    Seen in 1 report
  5. Removal set the nominee's weight to zero for the next week, and the removal epoch's incentive calculation used that zero weight.

    Seen in 1 report
  6. removeCollateral does not check that the position is settled or unexpired before allowing withdrawal.

    Seen in 1 report
  7. Removed liquidity is increased with an unchecked addition that assumes the total can never exceed the maximum 128-bit value.

    Seen in 1 report
  8. removeOriginalAllocation reset the allocation to zero without calling the reward update first.

    Seen in 1 report
  9. removeStrategy is implemented without a corresponding timelocked submission function.

    Seen in 1 report
  10. Removing a pool from the whitelist does not clear its stored arbitrage profit figure, so the data survives and is reused on re-whitelisting.

    Seen in 1 report
  11. Removing a reward token deletes it from the list without resetting per-token and per-user reward accounting, so re-adding restores stale state.

    Seen in 1 report
  12. Removing an address from the exclusion list does not adjust the total liquidity counters that were skipped for it.

    Seen in 1 report
  13. Removing an entry shifts later array elements down, so callers holding old indexes point at different requests.

    Seen in 1 report
  14. Removing extra reward entries without first withdrawing and claiming the staked amounts leaves tokens locked in the contract.

    Seen in 1 report
  15. The source position index is removed before the move and never re-added on a partial move.

    Seen in 1 report
  16. Repay and forced repay reduce the earmark but omit updating the last transmuter token balance.

    Seen in 1 report
  17. Repay decrements the earmarked amount without adjusting the collateral position, so a later sync removes collateral on a stale position.

    Seen in 1 report
  18. 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
  19. Repayment and bond withdrawal hard-code the caller as recipient with no alternative address parameter.

    Seen in 1 report
  20. 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
  21. Repayment normalises the underlying amount using only a fixed conversion factor and ignores the token's market price.

    Seen in 1 report
  22. Repayment pushed the debt token directly to the lender, so a blocked lender made every repayment revert.

    Seen in 1 report
  23. Repayment transferred tokens to the contract without burning them, so supply grew without matching collateral.

    Seen in 1 report
  24. Reproving requires the same output index as the original proof, so a changed root at another index cannot be used.

    Seen in 1 report
  25. Reputation logic added bounty-based points on every award event instead of once per report.

    Seen in 1 report
  26. Reputation was awarded on every resolve transition without checking whether the ticket had already been resolved.

    Seen in 1 report
  27. Requiring the destination handler to be whitelisted forces the handler to whitelist itself, enabling same-chain messages that unlock without burns.

    Seen in 1 report
  28. Reservation functions check only the minimum stay and omit a check that the period falls within the stored availability window.

    Seen in 1 report
  29. Reservations are created with a zero deposit and the period is marked unavailable before any payment or approval.

    Seen in 1 report
  30. Reserve functions rely on the false invariant that total borrow never exceeds total supply.

    Seen in 1 report
  31. 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
  32. Reset updates the last-voted timestamp without checking that the token has active votes.

    Seen in 1 report
  33. 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
  34. Resolver events were selected by namehash alone without cross-checking the registry.

    Seen in 1 report
  35. Response validation skipped integrity checking for the initial unauthenticated request and accepted a success response without a valid integrity attribute.

    Seen in 1 report
  36. Restrictions were enforced only on the client side or state changes were not validated on the server.

    Seen in 1 report
  37. The return statement is placed before the success check on the value transfer.

    Seen in 1 report
  38. Returning the service NFT and transferring rewards happened in one transaction, so a reward transfer failure reverted the unstake.

    Seen in 1 report
  39. 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
  40. Revocation subtracts only the withdrawable amount from the voting checkpoint instead of the total revoked amount.

    Seen in 1 report
  41. Reward accrual multiplied balance by time without accounting for emission rate changes.

    Seen in 1 report
  42. Reward accumulation is skipped when total supply is zero and there is no way to redistribute or recover the unallocated rewards.

    Seen in 1 report
  43. Reward amounts and token balances are cached and assumed constant, so balance changes break later operations.

    Seen in 1 report
  44. Reward amounts are stored by assignment instead of addition, so duplicate token entries overwrite each other.

    Seen in 1 report
  45. Reward calculation starts from the first deposit block and ignores the epoch start block.

    Seen in 1 report
  46. 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
  47. Reward calculation uses the rate at the start of a segment without checking whether the validator was inactive during it.

    Seen in 1 report
  48. Reward claim reads the current NFT owner after transfer instead of the owner recorded at subscription.

    Seen in 1 report
  49. 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
  50. Reward debt was stored with 36 decimals but updated with an 18-decimal amount, understating it.

    Seen in 1 report