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,501 to 1,550 of 5,700
  1. Reward distribution did not account for how long a position had been staked.

    Seen in 1 report
  2. Reward distribution is not time-weighted, so a momentary holder receives a full share.

    Seen in 1 report
  3. Reward distribution updated the exchange rate instantly without lock-up or time-weighting, so deposits just before a reward captured a share.

    Seen in 1 report
  4. Reward distribution uses the current total stake without accounting for how long each stake has existed.

    Seen in 1 report
  5. Reward maths uses the contract's total token balance change rather than per-pool tracking.

    Seen in 1 report
  6. Reward rate is recalculated over the full duration even when the new reward is zero.

    Seen in 1 report
  7. Reward rate used a fixed duration constant instead of the real time until the next period finish.

    Seen in 1 report
  8. Reward redemption burned shares while unstaking did not, so the two paths had different cooldown treatment.

    Seen in 1 report
  9. Reward removal and deactivation paths fail to clear or checkpoint the index, and reactivation reuses the stale timestamp.

    Seen in 1 report
  10. Reward settlement uses the post-mutation balance via a minimum of snapshot and current balance instead of the prior snapshot, and claim paths do not advance indices first.

    Seen in 1 report
  11. Reward shares are computed from a per-validator aggregate effective stake rather than per-user participation for each period.

    Seen in 1 report
  12. Reward tokens are only added to the asset list when the owner calls the function, but the function is publicly callable.

    Seen in 1 report
  13. Reward tokens are transferred before the reward rate is updated, so the old rate applies to the new funds.

    Seen in 1 report
  14. Reward transfer does not check the contract's balance before sending.

    Seen in 1 report
  15. Reward update logic was placed only in the wrapper function, not in the function that actually changes the balance.

    Seen in 1 report
  16. Rewards are calculated from the account's token balance instead of the recorded staked amount.

    Seen in 1 report
  17. Rewards are calculated from the asset balance rather than the supply shares.

    Seen in 1 report
  18. Rewards are calculated with the current emission rate rather than the rate when rewards were claimed.

    Seen in 1 report
  19. Rewards are credited per token rather than per pool without verifying the pool is listed.

    Seen in 1 report
  20. Rewards are distributed using the current tick without tracking which positions were active during accrual.

    Seen in 1 report
  21. Rewards are minted at raw precision but leaves commit only the floored amount.

    Seen in 1 report
  22. Rewards are only checkpointed on deposit or withdrawal, so a shelter drain bypasses the checkpoint.

    Seen in 1 report
  23. Rewards are staked into an external contract when the lock duration is non-zero, but the strategy has no function to unstake or claim them.

    Seen in 1 report
  24. Rewards are transferred during liquidation without handling the token transfer hook, so a borrower can revert the reward transfer and the liquidation.

    Seen in 1 report
  25. The rewards duration setter has no lower or upper bounds.

    Seen in 1 report
  26. Rewards increase the value of all shares instantly without weighting by stake duration.

    Seen in 1 report
  27. Rewards used the current pool total points instead of tracking total points over time.

    Seen in 1 report
  28. Rewards were claimed before new fee shares were added to total supply.

    Seen in 1 report
  29. Rewards were computed from current balance times the change in a global reward index with no time weighting, so a stake added just before distribution counted as if present all period.

    Seen in 1 report
  30. Rewards were distributed before interest accrual and total supply updates, so shares used stale totals.

    Seen in 1 report
  31. Rewards were distributed by current share balance without considering holding time, and the reinvest function was permissionless.

    Seen in 1 report
  32. Rewards were distributed in a single lump sum rather than gradually, letting a large depositor capture most of them.

    Seen in 1 report
  33. Rewards were granted at registration without verifying email ownership or preventing self-referral.

    Seen in 1 report
  34. Role assignments were grouped by account only, losing which name each role belonged to, and the revoke builder used a single name from the merged row.

    Seen in 1 report
  35. Rotation copies only policy fields and does not migrate the accepted per-feed timestamp floor.

    Seen in 1 report
  36. Rounding in debt share calculation when total free debt is zero let the ratio be inflated past the debasement threshold.

    Seen in 1 report
  37. Router approvals were based on the deposited amount without accounting for rebasing balances.

    Seen in 1 report
  38. Router functions call the low-level swap without enforcing a transaction deadline.

    Seen in 1 report
  39. safeApprove only permits setting an allowance from zero, so it cannot increase an existing allowance.

    Seen in 1 report
  40. safeTransferFrom is implemented to always revert, violating the ERC1155 standard.

    Seen in 1 report
  41. Scaling calculations assume base decimals always sit between six and the collateral decimals.

    Seen in 1 report
  42. Security decisions were enforced on the client side and OTP verification responses were not bound to a specific session or time.

    Seen in 1 report
  43. Sensitive setter functions had no delay between being called and taking effect.

    Seen in 1 report
  44. Separate balance checks for deposit and reward tokens did not account for both being the same token.

    Seen in 1 report
  45. The server only checks that CAPTCHA parameters are present, not that their values are valid or complete.

    Seen in 1 report
  46. The server trusts a client-supplied price instead of looking it up server side.

    Seen in 1 report
  47. The server trusts a client-supplied subscription identifier and activates without verifying payment.

    Seen in 1 report
  48. The server trusts client-supplied quantity and price without validating against the catalogue.

    Seen in 1 report
  49. The server trusts the client-supplied credit amount and does not re-check it against allowed packages or the minimum.

    Seen in 1 report
  50. Server-side email validation was too weak or missing, so malformed values were stored.

    Seen in 1 report