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.
-
The requested transfer amount is recorded as the escrow balance without checking the actual balance change.
Seen in 1 report
-
The require statement checked the first reserve twice instead of checking both reserves against the dust threshold.
Seen in 1 report
-
The require statement compared the contract's token balance to the initial supply variable, which was always zero.
Seen in 1 report
-
The require statement uses a logical OR instead of AND, so the check passes if either condition is true.
-
The require used the wrong comparison operator, checking the count against the proposal ID in the wrong direction.
Seen in 1 report
-
The required amount was computed from mutable pool state at execution time, so another user's exit could change it between approval and execution.
Seen in 1 report
-
The required product ID was validated only in the browser, so valid IDs could be generated and registered.
-
The required USD value multiplies a raw debt amount by a ratio before converting the debt to USD, mixing units and understating the requirement.
-
The required-underlying check added the full mint value and pool fee without scaling by minUnderlyingBackingBIPS, so it demanded more backing than the protocol actually required.
Seen in 1 report
-
The reroll uses the caller-supplied type for limit checks and generation without verifying it matches the token.
-
The rescue function does not check total reclaimed and does not restrict withdrawals when total stakers is zero.
Seen in 1 report
-
The rescue function reverts when the token address matches the stream token, so excess stream tokens cannot be recovered.
Seen in 1 report
-
The rescue function set the per-account claimed flag without checking whether the period was still open, and the flag was treated as final even though the share slot could be refilled.
-
The rescue function wrote a permanent claimed flag for a future period without checking whether the period had started, and the withdrawal request path never checked that flag.
Seen in 1 report
-
The rescue path records a permanent boolean per account and period instead of tracking the exact shares it moved.
-
The rescue path wrote a terminal never-cleared claimed flag to a bucket still open for new entries, whereas the normal claim path was bounded to closed buckets.
-
The rescue request timestamp was not deleted after a rescue, leaving stale state that bypassed the cooldown for re-added assets.
Seen in 1 report
-
The resend endpoint lacked rate limiting or anti-automation controls.
Seen in 1 report
-
$20 Low
-
-
The reservation fee calculation used only the user's minting amount instead of the total collateral reserved including the pool fee.
Seen in 1 report
-
The reservation fee was waived for always-allowed minters, making repeated blocking free.
Seen in 1 report
-
The reserve active flag is consumed inconsistently: account data and borrow validation never check it, while withdraw and liquidation reject inactive reserves.
-
The reserve function does not delete the existing listing mapping for the token.
-
The reserve function does not reset the liquidation flag for the token.
-
The reserve hard-coded a single authorised router instead of allowing several.
-
The reserve price is not enforced beyond allowing the borrower to cancel, so there is no competitive pressure to reach it.
Seen in 1 report
-
The reserve ratio calculation included portfolio funds unavailable for redemptions.
Seen in 1 report
-
The reserve-factor setter only overwrites configuration and never checkpoints the elapsed interval or recomputes the current rates.
Seen in 1 report
-
The reserved-username blacklist was applied only in the email registration flow, and the username was used directly as a site path.
Seen in 1 report
-
The reset endpoint counts requests per connection or per payload slot rather than per email address.
Seen in 1 report
-
The reset endpoint has no per-account or per-IP throttling.
Seen in 1 report
-
The reset endpoint lacked both existence checks and rate limiting on the email parameter.
-
The reset endpoint lacked rate limiting and generated a new password on every request instead of using a single-use token.
Seen in 1 report
-
The reset endpoint performed the reset directly from the request without a confirmation step and without rate limiting.
Seen in 1 report
-
The reset function cleared other per-period fields but omitted the total withdrawal requests counter.
-
The reset function does not skip tokens that are paused according to the rewards whitelister.
Seen in 1 report
-
The reset function fails to zero the current withdrawal group's total base token amount, so later calculations double-count it.
Seen in 1 report
-
The reset handler assumed a vested pending unstake epoch was already processed or purged and did not account for fresh post-reset exit balances.
-
The reset handler never compared the new password with the stored current password or a password history.
Seen in 1 report
-
The reset password page used a different, older validation rule than the other password pages.
Seen in 1 report
-
The reset path did not subtract redeemed unstake units from the epoch exit balance, unlike the normal release path, so rounding errors accumulated.
-
The reset zeroes the claimed amount without accounting for a withdrawal ordered just before it.
Seen in 1 report
-
The resolve function validates only the price signature and does not compare the asset parameter to the queued trade's asset.
Seen in 1 report
-
The restore process did not check whether the resulting repository name was retired.
Seen in 1 report
-
The restriction check requires both from and to to be whitelisted without an exception for the zero address.
Seen in 1 report
-
The restriction compares input against a blacklist of exact strings without normalising or checking for Unicode homoglyphs.
-
The restriction function omits a comparison between sender and recipient addresses.
Seen in 1 report
-
The resume helper never marked the reader as having used the callback, so the redirect logic applied the resume offset twice.
-
The resume option takes precedence over file-safety options without checking for the conflicting combination.
Seen in 1 report
-
Medium
-
-
The resumption code clamped the offset to zero without clearing the carried-over hash state, and the failsafe only triggered when the offset was greater than zero.
Seen in 1 report
-
The retain function omitted the nominee checkpoint before using the staking weight.