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.
-
Reward distribution did not account for how long a position had been staked.
-
Reward distribution is not time-weighted, so a momentary holder receives a full share.
Seen in 1 report
-
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
-
Reward distribution uses the current total stake without accounting for how long each stake has existed.
-
Reward maths uses the contract's total token balance change rather than per-pool tracking.
-
Reward rate is recalculated over the full duration even when the new reward is zero.
Seen in 1 report
-
Reward rate used a fixed duration constant instead of the real time until the next period finish.
-
Reward redemption burned shares while unstaking did not, so the two paths had different cooldown treatment.
-
Reward removal and deactivation paths fail to clear or checkpoint the index, and reactivation reuses the stale timestamp.
Seen in 1 report
-
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
-
Reward shares are computed from a per-validator aggregate effective stake rather than per-user participation for each period.
-
Reward tokens are only added to the asset list when the owner calls the function, but the function is publicly callable.
-
Reward tokens are transferred before the reward rate is updated, so the old rate applies to the new funds.
-
Reward transfer does not check the contract's balance before sending.
-
Reward update logic was placed only in the wrapper function, not in the function that actually changes the balance.
Seen in 1 report
-
Rewards are calculated from the account's token balance instead of the recorded staked amount.
Seen in 1 report
-
Rewards are calculated from the asset balance rather than the supply shares.
Seen in 1 report
-
Rewards are calculated with the current emission rate rather than the rate when rewards were claimed.
-
Rewards are credited per token rather than per pool without verifying the pool is listed.
-
Rewards are distributed using the current tick without tracking which positions were active during accrual.
Seen in 1 report
-
Rewards are minted at raw precision but leaves commit only the floored amount.
-
Rewards are only checkpointed on deposit or withdrawal, so a shelter drain bypasses the checkpoint.
Seen in 1 report
-
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.
-
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
-
The rewards duration setter has no lower or upper bounds.
-
Rewards increase the value of all shares instantly without weighting by stake duration.
Seen in 1 report
-
Rewards used the current pool total points instead of tracking total points over time.
-
Rewards were claimed before new fee shares were added to total supply.
Seen in 1 report
-
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.
-
Rewards were distributed before interest accrual and total supply updates, so shares used stale totals.
Seen in 1 report
-
Rewards were distributed by current share balance without considering holding time, and the reinvest function was permissionless.
Seen in 1 report
-
Rewards were distributed in a single lump sum rather than gradually, letting a large depositor capture most of them.
Seen in 1 report
-
Rewards were granted at registration without verifying email ownership or preventing self-referral.
Seen in 1 report
-
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.
-
Rotation copies only policy fields and does not migrate the accepted per-feed timestamp floor.
Seen in 1 report
-
Rounding in debt share calculation when total free debt is zero let the ratio be inflated past the debasement threshold.
Seen in 1 report
-
Router approvals were based on the deposited amount without accounting for rebasing balances.
Seen in 1 report
-
Router functions call the low-level swap without enforcing a transaction deadline.
Seen in 1 report
-
safeApprove only permits setting an allowance from zero, so it cannot increase an existing allowance.
Seen in 1 report
-
safeTransferFrom is implemented to always revert, violating the ERC1155 standard.
Seen in 1 report
-
Scaling calculations assume base decimals always sit between six and the collateral decimals.
Seen in 1 report
-
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
-
Sensitive setter functions had no delay between being called and taking effect.
Seen in 1 report
-
Separate balance checks for deposit and reward tokens did not account for both being the same token.
Seen in 1 report
-
The server only checks that CAPTCHA parameters are present, not that their values are valid or complete.
Seen in 1 report
-
The server trusts a client-supplied price instead of looking it up server side.
Seen in 1 report
-
The server trusts a client-supplied subscription identifier and activates without verifying payment.
Seen in 1 report
-
The server trusts client-supplied quantity and price without validating against the catalogue.
Seen in 1 report
-
The server trusts the client-supplied credit amount and does not re-check it against allowed packages or the minimum.
Seen in 1 report
-
Server-side email validation was too weak or missing, so malformed values were stored.
Seen in 1 report