Skip to content

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.

Back to the lesson 5,251 to 5,300 of 5,700
  1. 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
  2. The transfer return value was not checked, so a failed transfer still minted shares.

    Seen in 1 report
  3. The transferFees call was made before the fee amounts were calculated, so it used zero values.

    Seen in 1 report
  4. The transferFrom function assigned the debited state to the caller instead of the from address.

    Seen in 1 report
  5. 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
  6. 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
  7. 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
  8. The treasury rate was a single global variable read at claim time, so changes applied to all loans.

    Seen in 1 report
  9. 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.

    Seen in 1 report
  10. The trial flow marked the account verified without requiring email confirmation.

    Seen in 1 report
  11. 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.

    Seen in 1 report
  12. The trigger branch paid the bounty through the general credit path, which checkpointed the beneficiary's carry before the queued close was evaluated.

    Seen in 1 report
  13. The trust level of all participants was not re-checked when a new person was added to a conversation.

    Seen in 1 report
  14. The tryCatch function forwarded all available gas without checking afterwards whether the call failed from running out of gas.

    Seen in 1 report
  15. 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
  16. 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
  17. 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
  18. The TVL loop iterated over all operators without checking whether each was active in the beacon chain strategy and had a cap.

    Seen in 1 report
  19. The two amount checks were combined with a logical OR instead of AND, so one non-zero amount satisfied validation.

    Seen in 1 report
  20. The two apps derived L2 coin types from different chain ids, so they never agreed on which slot holds an address.

    Seen in 1 report
  21. 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
  22. The two ratings were passed to the Elo helper in the wrong order.

    Seen in 1 report
  23. The two-factor login flow bypassed the normal post-login hooks that terminate other sessions.

    Seen in 1 report
  24. The type constructor lacked a check that fixed-size bytes types were between 1 and 32 bytes.

    Seen in 1 report
  25. The UI used raw resolver-detach options while the transaction plan used effective options, so an address update ran before a recipient-controlled transfer.

    Seen in 1 report
  26. 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.

    Seen in 1 report
  27. The unbonding function transferred the full bonded amount without applying the documented fee.

    Seen in 1 report
  28. The unbonding validator choice was seeded only by the public block height, making it predictable.

    Seen in 1 report
  29. The uncollateralized check ran too late in the receive amount calculation, so the percentage reduction hit both private and normal collateral.

    Seen in 1 report
  30. The undelegate function checked that the delegatee's lock had not expired even when the caller was undelegating to themselves.

    Seen in 1 report
  31. The undeploy function returned its input amount rather than the actual amount returned by the internal undeploy.

    Seen in 1 report
  32. The undeploy function transferred assets out but did not subtract the withdrawn amount from the tracked deployed amount.

    Seen in 1 report
  33. The under-spend handling passed the full input minus fees rather than the actual amount spent plus fees.

    Seen in 1 report
  34. The undercollateralisation penalty was applied on every update call rather than once per interval, allowing compounding within a single interval.

    Seen in 1 report
  35. The underlying asset amount was passed to Yearn's withdraw, which expects a share amount.

    Seen in 1 report
  36. The underlying token address was used where the aToken address was required.

    Seen in 1 report
  37. The uniqueness check and storage did not trim or normalise leading whitespace.

    Seen in 1 report
  38. The uniqueness check did not trim or normalise whitespace before comparing names.

    Seen in 1 report
  39. The uniqueness check only considered activated accounts, so unactivated registrations with the same email were allowed.

    Seen in 1 report
  40. The unlist function subtracted the full listed amount from the sold value without accounting for steps claimed since listing.

    Seen in 1 report
  41. 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
  42. The unlock timestamp was estimated from resolved_at rather than read from DelayedWETH, and the withdrawal error handler did not reset the phase.

    Seen in 1 report
  43. The unregister function deleted the pool registration without verifying that no user positions remained locked in it.

    Seen in 1 report
  44. The unregister function did not check for pending slashing requests.

    Seen in 1 report
  45. The unstake check read only the stored per-user cooldown end time and ignored that the global duration was now zero.

    Seen in 1 report
  46. The unstake check relied only on the current active state rather than tracking recent activity.

    Seen in 1 report
  47. The unstake function did not check that the remaining stake was either zero or at least the minimum stake amount.

    Seen in 1 report
  48. The unstake function did not clear the user's staking data or check that the stake was still active.

    Seen in 1 report
  49. The unstake function hardcoded the hub-chain recipient to the caller's address instead of letting the caller choose a destination.

    Seen in 1 report
  50. The unstake used safeTransferFrom instead of transferFrom, enforcing receiver support that may not exist.

    Seen in 1 report