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 transfer required the asset's reward epoch to equal the current day, but the epoch only updated when rewards were distributed.
Seen in 1 report
-
The transfer return value was not checked, so a failed transfer still minted shares.
Seen in 1 report
-
The transferFees call was made before the fee amounts were calculated, so it used zero values.
-
The transferFrom function assigned the debited state to the caller instead of the from address.
-
The transferFrom function read the allowance from sender to recipient but wrote the updated allowance from sender to the caller, so allowances could be reassigned.
Seen in 1 report
-
The transferFrom implementation read the allowance from sender to recipient and wrote it to sender to operator instead of reading and writing the operator allowance.
Seen in 1 report
-
The transition-type extraction returned typed unconditionally before the first-party trust check, so any external app could claim the user typed the URL.
Seen in 1 report
-
The treasury rate was a single global variable read at claim time, so changes applied to all loans.
Seen in 1 report
-
The treasury top-up was capped by available pool cash and the shortfall was dropped without being recorded, while the receipt still treated the full fee as delivered.
-
The trial flow marked the account verified without requiring email confirmation.
Seen in 1 report
-
The trigger branch always collected the recipient's pending carry through the reward credit instead of releasing a reward that returns to its own source.
-
The trigger branch paid the bounty through the general credit path, which checkpointed the beneficiary's carry before the queued close was evaluated.
-
The trust level of all participants was not re-checked when a new person was added to a conversation.
Seen in 1 report
-
The tryCatch function forwarded all available gas without checking afterwards whether the call failed from running out of gas.
Seen in 1 report
-
The TVL calculation multiplied balances by rates denominated in the underlying asset while the code treated the result as an SY-denominated amount.
Seen in 1 report
-
The TVL formula added deposited and assigned collateral even though deposited already contained assigned, and never subtracted the minted stablecoin debt.
Seen in 1 report
-
The TVL logic failed to account for token decimals, treated borrows as additions rather than liabilities, and omitted updating the token registry for the loan token on withdrawal.
Seen in 1 report
-
The TVL loop iterated over all operators without checking whether each was active in the beacon chain strategy and had a cap.
-
The two amount checks were combined with a logical OR instead of AND, so one non-zero amount satisfied validation.
Seen in 1 report
-
The two apps derived L2 coin types from different chain ids, so they never agreed on which slot holds an address.
-
The two code paths that invoked a target contract on ZEVM did not process the resulting ZEVM logs, so gateway withdrawals that burned tokens never produced an outbound cross-chain transaction.
Seen in 1 report
-
The two ratings were passed to the Elo helper in the wrong order.
Seen in 1 report
-
Medium
-
-
The two-factor login flow bypassed the normal post-login hooks that terminate other sessions.
Seen in 1 report
-
The type constructor lacked a check that fixed-size bytes types were between 1 and 32 bytes.
Seen in 1 report
-
The UI used raw resolver-detach options while the transaction plan used effective options, so an address update ran before a recipient-controlled transfer.
-
The unassigned assets bucket was capped at remaining distributable equity during a loss but the drawn-down amount was never tracked or restored on recovery.
-
The unbonding function transferred the full bonded amount without applying the documented fee.
-
The unbonding validator choice was seeded only by the public block height, making it predictable.
Seen in 1 report
-
The uncollateralized check ran too late in the receive amount calculation, so the percentage reduction hit both private and normal collateral.
-
The undelegate function checked that the delegatee's lock had not expired even when the caller was undelegating to themselves.
Seen in 1 report
-
The undeploy function returned its input amount rather than the actual amount returned by the internal undeploy.
-
The undeploy function transferred assets out but did not subtract the withdrawn amount from the tracked deployed amount.
-
The under-spend handling passed the full input minus fees rather than the actual amount spent plus fees.
Seen in 1 report
-
The undercollateralisation penalty was applied on every update call rather than once per interval, allowing compounding within a single interval.
-
The underlying asset amount was passed to Yearn's withdraw, which expects a share amount.
-
The underlying token address was used where the aToken address was required.
Seen in 1 report
-
The uniqueness check and storage did not trim or normalise leading whitespace.
Seen in 1 report
-
The uniqueness check did not trim or normalise whitespace before comparing names.
Seen in 1 report
-
The uniqueness check only considered activated accounts, so unactivated registrations with the same email were allowed.
Seen in 1 report
-
The unlist function subtracted the full listed amount from the sold value without accounting for steps claimed since listing.
-
The unlock function did not reset the remainder stored in the lockedToken struct, so it persisted and was added to future lock quantities.
Seen in 1 report
-
The unlock timestamp was estimated from resolved_at rather than read from DelayedWETH, and the withdrawal error handler did not reset the phase.
-
The unregister function deleted the pool registration without verifying that no user positions remained locked in it.
-
The unregister function did not check for pending slashing requests.
Seen in 1 report
-
The unstake check read only the stored per-user cooldown end time and ignored that the global duration was now zero.
-
The unstake check relied only on the current active state rather than tracking recent activity.
-
The unstake function did not check that the remaining stake was either zero or at least the minimum stake amount.
-
The unstake function did not clear the user's staking data or check that the stake was still active.
Seen in 1 report
-
The unstake function hardcoded the hub-chain recipient to the caller's address instead of letting the caller choose a destination.
-
The unstake used safeTransferFrom instead of transferFrom, enforcing receiver support that may not exist.
Seen in 1 report