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 1,001 to 1,050 of 5,700
  1. Email validation and normalisation were inconsistent across the registration and resend endpoints.

    Seen in 1 report
  2. Email validation is applied only on the initial registration form and not on the contact info update page.

    Seen in 1 report
  3. Email verification was checked only when a page loaded, not on each action, so an open session kept access after the email changed.

    Seen in 1 report
  4. Email-domain and region restrictions are enforced only by client-side JavaScript events with no matching server-side validation.

    Seen in 1 report
  5. Emergency mode is granted for all positions without checking that the party is not in emergency mode when opening new positions.

    Seen in 1 report
  6. Emergency withdraw functions did not update reward accounting variables to redistribute forfeited rewards.

    Seen in 1 report
  7. Emergency withdrawal omits the gauge checkpoint present in the normal deposit and withdraw functions.

    Seen in 1 report
  8. Empty error data from a deprecated oracle is misinterpreted as out-of-gas.

    Seen in 1 report
  9. Enabling a bitmap currency failed to clear the previous active currency entry, so the same asset was counted twice in free collateral.

    Seen in 1 report
  10. Enforcement trusted client-controlled MAC values from two unsynchronised sources and assumed they would match.

    Seen in 1 report
  11. Entitlement was decided from a user-controlled project relationship instead of an authoritative subscription record.

    Seen in 1 report
  12. Entitlement was enforced only by client-side routing while the backend onboarding procedure did not check it.

    Seen in 1 report
  13. Entrance fees go into a general pool split proportionally across all lenders instead of being credited to the originating lender.

    Seen in 1 report
  14. The entry snapshot omits the locked negative-VPI clawback reserve that is a funded receivable of the pool.

    Seen in 1 report
  15. Financial bounds and planner funding are evaluated at execution against live account state rather than being fixed at commit.

    Seen in 1 report
  16. Execution funds the new rebate reserve from the account's free settlement, which the owner still controls until execution, while commit admission only reserves margin and bounty.

    Seen in 1 report
  17. Execution-time skew and solvency checks use live pool depth with no reservation for committed but unexecuted orders, and the depth-dependent rejection codes are terminal with a full margin refund.

    Seen in 1 report
  18. Accrued fees are valued using an equivalent liquidity figure calculated from a manipulable spot price.

    Seen in 1 report
  19. ERC20 approve is called with a new amount instead of adding to the existing allowance.

    Seen in 1 report
  20. ERC20 transfer is called without checking its return value, so false-returning tokens cause silent failures.

    Seen in 1 report
  21. ERC20 transferFrom is used without checking its return value instead of a safe transfer variant.

    Seen in 1 report
  22. The return value of a low-level ERC20 transfer call is ignored.

    Seen in 1 report
  23. Escrow configuration parameters are accepted without validation, allowing a zero duration and a percentage that rounds to zero.

    Seen in 1 report
  24. The escrow record is not cleared when an order is cancelled or filled.

    Seen in 1 report
  25. LP shares are estimated from an average of token ratios that is sensitive to reserve fluctuations.

    Seen in 1 report
  26. ETH was treated as a zero address but an ERC20 balanceOf call was still made on that address.

    Seen in 1 report
  27. Fee collection assumes both currencies are ERC20 and calls balanceOf on the zero address.

    Seen in 1 report
  28. The event scan lacks a source-equals-destination guard on the hold release arm.

    Seen in 1 report
  29. Every hash was processed without stopping on errors and the last result overwrote earlier ones.

    Seen in 1 report
  30. Every locked name with the cannot-set-resolver fuse was classified as keep-v1 without checking whether the preserved resolver was a custom contract.

    Seen in 1 report
  31. EVM state changes were not committed before Cosmos SDK code ran, so the EVM state later overwrote the Cosmos state.

    Seen in 1 report
  32. Multiple state database instances are created during execution and the original is restored after a precompile call, losing intermediate storage changes.

    Seen in 1 report
  33. Excess funds were sent to the repayment recipient instead of the caller.

    Seen in 1 report
  34. The executor reward is computed as total payment minus a fee that depends on a live token price.

    Seen in 1 report
  35. Exempting whitelisted makers from liquidation combined with a margin check on close meant a trader could not exit a profitable position when the maker was underwater.

    Seen in 1 report
  36. Exercise required every listed token to have a positive amount and be a contract, but order creation did not enforce these conditions.

    Seen in 1 report
  37. Existing sessions are not invalidated or re-checked server-side on deactivation, relying on delayed session expiry.

    Seen in 1 report
  38. Exit returns LP tokens to the wrapper without restaking them, so later unstake calls revert.

    Seen in 1 report
  39. The exit routine resets the pending stake counter to zero before a queued delegation starts, so withdrawal underflows.

    Seen in 1 report
  40. Exit transfers all LP tokens back without separating donated tokens from user deposits.

    Seen in 1 report
  41. exitPosition subtracts the pool's current average magnitude rather than the exiting user's stored weight.

    Seen in 1 report
  42. Expired orders were not filtered out when determining best bid and ask.

    Seen in 1 report
  43. Expiry relies on block timestamp without accounting for sequencer downtime.

    Seen in 1 report
  44. Expiry was rounded down to the nearest day instead of up.

    Seen in 1 report
  45. External contract addresses passed to lend functions are not validated or whitelisted, so a malicious contract can return arbitrary values.

    Seen in 1 report
  46. Failed Kerberos authentication is treated as a reason to try the next method rather than a fatal error.

    Seen in 1 report
  47. Failed withdrawals are not stored for retry, so a failed transfer results in permanent loss.

    Seen in 1 report
  48. The failed-attempt counter is stored client-side in a cookie instead of server-side per account or IP.

    Seen in 1 report
  49. Fee accounting reduced the total collateral snapshot without updating the total stakes snapshot, so new CDPs got a higher stake than old ones.

    Seen in 1 report
  50. Fee amounts were not converted from wei to the base denomination before use in transaction validation and building.

    Seen in 1 report