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 record counter was decremented even when a price lookup returned nothing.
Seen in 1 report
-
The recorded reward amount was increased on funding but never decreased on claims.
Seen in 1 report
-
The recover funds weight is derived only from the transfer count while the dominant cost scales with agenda occupancy, which the benchmark never varies.
-
The recover_backups function returns the backups list instead of the recover queue, so marked backups are invisible to the lookup.
Seen in 1 report
-
The recovery function requires a boolean return value instead of using a safe transfer helper.
Seen in 1 report
-
The recovery function subtracted the protocol fee without checking whether it had already been paid out.
Seen in 1 report
-
The recovery link was treated as a full login token and a session was established before the reset was completed.
Seen in 1 report
-
The recovery mint prices new shares against the surviving supply without normalising, burning or rebasing the old shares.
Seen in 1 report
-
The recovery threshold is based on system-wide LTV, which a single large loan can manipulate.
Seen in 1 report
-
The recreate function did not ensure the node operator's deposit was still held.
-
The redeem fee is stored in a local variable instead of the cache field read by the transfer logic.
Seen in 1 report
-
The redeem function caps the payout to the earmarked balance without preserving the shortfall, and the position is burned regardless.
-
The redeem function checks maturity and cashes out before considering the transfer-fCash option.
Seen in 1 report
-
The redeem function checks the share input is non-zero but not that the derived asset amount is non-zero.
-
The redeem function does not restrict which ERC20 token the user can receive.
Seen in 1 report
-
The redeem function lacks a check that the holdings mapping is non-empty before burning tokens.
Seen in 1 report
-
The redeem function passes the marketplace address as recipient instead of the contract itself.
Seen in 1 report
-
The redeem function uses a balance difference to determine assets returned, but the burn transfers control to the receiver.
Seen in 1 report
-
The redeem function was not given the same fee checkpoint modifier as withdraw.
Seen in 1 report
-
The redeem limit counter is incremented on request creation but never decremented when a request is withdrawn or rejected.
Seen in 1 report
-
The redeem parameters function was left empty instead of returning the input reclaim amount, so Solidity default zero values override the bonding-curve calculation.
-
The redeem path lacks the zero-output guard that deposit has, so floor rounding to zero assets is accepted.
-
The redeem request function authorises only the share owner and never checks that the named controller agreed.
-
The redeem request function authorises only the share owner and not the controller, so a request can be enqueued on another user's queue head.
-
The redeem request function does not verify the caller is the controller or an approved operator, so requests can be appended to any queue.
-
The redeem request records the full burn amount as the withdrawal claim without checking whether collateral covers it.
Seen in 1 report
-
The redeemer lacks an approval for the converter to spend Sense principal tokens, and the approval function is restricted to the marketplace.
Seen in 1 report
-
The redeemer uses the lender's total principal token balance, which unsolicited transfers can inflate, to decide how many future yield tokens to transfer.
Seen in 1 report
-
The redemption amount was locked at fulfilment without repricing or expiry.
-
The redemption calculation uses only the stored holdings balance and does not ensure all external principal tokens have been converted.
Seen in 1 report
-
The redemption fee is subtracted from the global deposited-shares counter while per-account collateral is reduced separately through a weight-based sync, mixing user-level and system-level accounting.
Seen in 1 report
-
The redemption form did not link the submitted email to an eligible account and placed no limit on redemptions.
Seen in 1 report
-
The redemption function lacks a minimum output parameter and a deadline.
-
The redemption logic assumes no losses and reverts if the underlying received is less than the principal token amount.
Seen in 1 report
-
The redemption path lacked the zero-value guard that deposit and mint had, so a floored-to-zero asset amount was accepted and shares were burned anyway.
-
The redirects array was not validated against cycles or self-redirects.
Seen in 1 report
-
The redraw cooldown is shorter than the maximum time the oracle can take to fulfil a request, allowing the host to invalidate an unfavourable response.
Seen in 1 report
-
The reduce function updates the position's margin amount but omits updating the user's margin mapping.
Seen in 1 report
-
The reduce-account-debt function only initialises one of the two prime rates, so the other secondary debt is converted to zero and maturity is cleared.
Seen in 1 report
-
The reentrancy guard was a per-instance flag rather than a global or thread-local flag, and the drag loop allowed new messages to be processed.
Seen in 1 report
-
The reference unit is ETH but the exchange rate returns the rate to staked ETH2.
Seen in 1 report
-
The referral bonus was credited on payment but never reversed when the payment was refunded and the subscription cancelled.
Seen in 1 report
-
The referral fee subtracts a percentage-scaled term from the total buyer fee instead of multiplying the total by the referral percentage.
Seen in 1 report
-
The referral percentage setter only checks array length, not that each value or the sum is at most the scaling factor.
Seen in 1 report
-
The referrer is stored in a mapping keyed only by the edition address, not by the individual work.
Seen in 1 report
-
The referrer was stored per order version and carried over to new versions, making a liquidation-set referrer permanent.
Seen in 1 report
-
The refinance logic does not validate or preserve the liquidationInitialAsk parameter, so a permissionless refinancer can lower it arbitrarily.
Seen in 1 report
-
The refund address is set to the bridge adapter rather than the user-specified address.
-
The refund address was set to the caller inside a helper contract, which was the calling contract rather than the original user.
Seen in 1 report
-
The refund branch is guarded by a negated feature-flag check, so enabling the governed gas pool skips the refund minting.