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.
-
Slashing subtracts the full base bond rather than a percentage and does not track the number of slashes.
Seen in 1 report
-
Slate validation does not check that proposal IDs are unique, so duplicates inflate the allocated budget.
-
The slippage parameter is only enforced inside the zapping proxy path, not when burning from the caller directly.
Seen in 1 report
-
Slippage protection aggregates liquidity across multiple fee tiers, so offsetting price manipulations cancel out in the check.
Seen in 1 report
-
Slippage tolerance was applied to an amount that already reflected the pool's current state, making the check useless when imbalanced.
Seen in 1 report
-
Medium
-
-
Smart lockout's differentiation between familiar and unfamiliar locations relies partly on source IP address, which can be rotated.
-
SolidlyV3 moved fee distribution to a separate rewards distributor, so burnAndCollect no longer collects LP fees.
Seen in 1 report
-
The solvency check uses gross max-profit liability for the dominant side without subtracting locked margin of the opposing position.
-
Solvency gates compute free assets as cash minus recorded claims and use entry-based maximum payouts, never reserving marked profit of open winners.
-
Solvency is re-checked against pool cash at execution time, and the order owner can move that cash after committing.
-
Sorting compared rounded quote-per-base values instead of cross-multiplying the raw amounts, so distinct bids compared as equal.
Seen in 1 report
-
Squaring each delegate's votes before dividing gives large delegates disproportionate rewards.
Seen in 1 report
-
Stake and draft rates reset independently, letting users move funds between buckets to dodge the reset.
Seen in 1 report
-
Stake and unstake reset the last reward index without settling pending rewards.
-
Staking admission does not verify that a contract staker can receive native tokens.
Seen in 1 report
-
Staking and draft eras advance independently, so drafts under an old draft era are not carried over.
Seen in 1 report
-
Medium
-
-
Staking did not reset the withdrawal request timestamp, so a pre-existing request stayed valid.
Seen in 1 report
-
Standard approve was used instead of a safe variant that handles non-returning tokens.
Seen in 1 report
-
Standard approve was used without handling tokens that require the allowance to be reset to zero first.
Seen in 1 report
-
Standard IERC20 transferFrom is used, assuming a boolean return that some tokens do not provide.
Seen in 1 report
-
Medium
-
-
Starting a new campaign updates the start date but does not reset the last jackpot claim week.
Seen in 1 report
-
State variables for the last event and last decay were not initialised in the constructor and are used without a non-zero check.
Seen in 1 report
-
Static per-currency prices are stored instead of converting from a single base price using a current exchange rate.
Seen in 1 report
-
Step ids carry no attempt identity and the shared transaction manager is not cleared at the start of a new attempt.
-
stop uses safeTransferFrom, so a reverting callback on the lender blocks the whole stop.
Seen in 1 report
-
Stored total assets is decremented before the reward sync is called, so the sync sees a higher balance.
-
Streak is computed from the oracle callback timestamp rather than the time the user submitted the spin.
Seen in 1 report
-
Strict inequality checks on block timestamp allowed actions at the exact boundary second.
Seen in 1 report
-
String slicing reads the same character on every loop iteration instead of advancing.
Seen in 1 report
-
Subscription status was enforced only client-side and the content endpoint did not check it.
Seen in 1 report
-
Subscription validity was checked against the device's local clock instead of a server-side timestamp.
Seen in 1 report
-
Subscriptions are not linked to user lifecycle events, so deleted users leave permanent follower records.
Seen in 1 report
-
Only proposal payouts are subtracted from the treasury, ignoring delegation rewards paid out.
Seen in 1 report
-
Subtracting the protocol balance from the cached total underlying underflowed when the balance was greater.
Seen in 1 report
-
The unutilised leverage percentage is subtracted from the liquidation threshold when computing the net repay limit.
-
Subtraction is performed before addition, and the subtracted value is rounded up while the added value is rounded down.
Seen in 1 report
-
Swap calls use the maximum timestamp in one place and no deadline at all in the other.
-
Swap functions accept no minimum-return parameter and never compare realised output to a limit.
-
Swap functions only checked that the external call succeeded, not that the expected tokens arrived, and allowed any function on a whitelisted router.
Seen in 1 report
-
Swap functions validate only token addresses in the path, not the liquidity pair contract.
Seen in 1 report
-
Switching from parallel to serial clears the received slices but does not reset the partial hash state.
Seen in 1 report
-
Symbol generation truncates the expiry year to two digits.
Seen in 1 report
-
Sync advances the last-updated timestamp before checking liquidity, consuming the reward window without accumulating it.
-
Sync calculates the collateral to remove from a stale raw locked value before updating it to the current yield token price.
-
Target contracts were refactored to use permit approvals but the router was not updated to grant them.
Seen in 1 report
-
Tax logic lives in a user-chosen delegatecall target rather than in a trusted contract.
Seen in 1 report
-
Team members are identified by email and the case where an admin changes email to match a pending invite is not handled.
Seen in 1 report
-
Terminal transaction actors are never evicted from the active map and all revocations share one fixed descriptor ID.
Seen in 1 report
-
The /confirm endpoint did not limit how many confirmation attempts a user could make, allowing brute force guessing of the code.
-
The _burn function inherited from VoteEscrowCore.sol was not overridden in VoteEscrowDelegation.sol to call removeDelegation, so the delegation reference was never cleaned up.
Seen in 1 report