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 4,851 to 4,900 of 5,700
  1. The server trusts the client-supplied retailer list state instead of enforcing the limit and entitlement server-side.

    Seen in 1 report
  2. The server trusts the email value passed in the URL on the second signup step instead of re-checking the restriction or binding it to the first step.

    Seen in 1 report
  3. The server trusts the quantity value sent by the browser without checking it is positive.

    Seen in 1 report
  4. The server used a client-provided price parameter to calculate the total instead of looking up the price.

    Seen in 1 report
  5. The server used a request identifier header as a simple anti-automation check instead of a proper rate limit.

    Seen in 1 report
  6. The server used the product identifier from the request without checking it against what the user was shown or allowed to buy.

    Seen in 1 report
  7. The server uses the session cookie to choose the account to delete while only validating credentials from the request body, without binding the two.

    Seen in 1 report
  8. The server validated only the number of digits in the price field rather than the actual monetary value.

    Seen in 1 report
  9. The server validated the captcha answer without invalidating or expiring the captcha ID after first use.

    Seen in 1 report
  10. The server verified a CAPTCHA token when present but never required one, and never tracked tokens as single-use.

    Seen in 1 report
  11. The server-side mutation did not validate that exactly one player carries the captain flag, relying on the client.

    Seen in 1 report
  12. The service failed to validate the token's signing time and the signed transaction amount.

    Seen in 1 report
  13. The session deadline was derived from the current block number rather than the target block's estimated timestamp.

    Seen in 1 report
  14. The session is not invalidated on logout and pages are cached so the browser can show them again.

    Seen in 1 report
  15. The set reserve factor function did not update global interest before changing the factor, applying the new factor retroactively.

    Seen in 1 report
  16. The set token is not locked during rebalancing, allowing anyone to mint and redeem it and sandwich bids.

    Seen in 1 report
  17. The set-converter function does not set up token approvals, and the approval function can only be called during market creation.

    Seen in 1 report
  18. The set-principal function omits the extra allowance parameters that market creation uses.

    Seen in 1 report
  19. The set-principal function passes the zero address as the underlying token to the lender's approve function.

    Seen in 1 report
  20. The set_account_referral function wrote the referral record without asserting that the account and referrer addresses differ.

    Seen in 1 report
  21. The setDustThreshold function only enforced a minimum value and did not enforce a maximum, allowing management to set an arbitrarily high threshold that disabled auctions.

    Seen in 1 report
  22. The setEpochDuration function updates the epoch duration without first calling transitionEpoch, so the current epoch state is not finalised before the duration changes.

    Seen in 1 report
  23. The setLockDuration function updates the lock duration without calling forceHarvest first, so the new duration is applied retroactively to rewards accrued since the last harvest.

    Seen in 1 report
  24. The setPendingRedemptionBalance function lacks a check on the previous balance, allowing it to overwrite concurrent user updates.

    Seen in 1 report
  25. The setSampleMemory function fails to properly adjust the counter and activeSamples when increasing sample memory.

    Seen in 1 report
  26. The setSellable function treats a maximum sell percentage of zero as uninitialised and overwrites it with a default.

    Seen in 1 report
  27. The setter assigns to a memory variable instead of a storage reference, so the change is lost.

    Seen in 1 report
  28. The setter changes the degradation rate without checkpointing locked profit and last report time first.

    Seen in 1 report
  29. The setter checks a fixed scalar lower bound but not that the value stays at or below the global minimum.

    Seen in 1 report
  30. The setter checks only that the new ratio is at least 100 percent and never checks that it is not higher than the current value.

    Seen in 1 report
  31. The setter does not check that the new timekeeper reports the same epoch and does not reset per-epoch reward state.

    Seen in 1 report
  32. The setter function for the emission rate lacks validation to ensure the value falls within a safe range.

    Seen in 1 report
  33. The setter only required the factor to be greater than zero, allowing a near-zero value.

    Seen in 1 report
  34. The setter parameter type is an 8-bit array while the storage variable is a 256-bit array.

    Seen in 1 report
  35. The setter updated the wrapper address but not the canonical-to-adopted mapping.

    Seen in 1 report
  36. The setter uses a hardcoded limit far below the intended fee, confusing percentages with absolute values.

    Seen in 1 report
  37. The setters for voting period and full weight duration lack a check that no proposal is active.

    Seen in 1 report
  38. The setTierWinner function only updates the winner address and does not reset the invoiceComplete and supportingDocumentsComplete mappings for that tier.

    Seen in 1 report
  39. The settings endpoint saved the email address without requiring ownership verification.

    Seen in 1 report
  40. The settings update endpoint did not verify that the subscription plan allowed enabling the premium feature.

    Seen in 1 report
  41. The settle fee is applied twice, once through the token liability helpers and again inside the positive PnL handling.

    Seen in 1 report
  42. The settle function only rebalances tokens when debt is fully cleared, not when some collateral has been settled.

    Seen in 1 report
  43. The settle function returned the paid amount before burning commission shares, understating the net paid used for the bonus.

    Seen in 1 report
  44. The settle function's timestamp check only verifies that the current time is after the epoch end, but does not ensure the auction has actually started.

    Seen in 1 report
  45. The settle_trade_v2 function validated only the top-level trade.size and omitted any check on the nested maker_order.size and taker_order.size fields.

    Seen in 1 report
  46. The settlement calculation had no lower bound on the new ratio.

    Seen in 1 report
  47. The settlement floor is only checked once a position is closed, so free settlement can be removed while a committed close is pending.

    Seen in 1 report
  48. The settlement function transfers out excess cash and then checks the collateral ratio, which can fail and revert, while liquidation requires the account to be settled first.

    Seen in 1 report
  49. The settlement mint does not enforce that raw supply plus the marginal mint plus pending fee shares leaves room for the virtual shares used in every later pricing read.

    Seen in 1 report
  50. The settlement sidecar infers the collected spread only from the assessed-charge field, which is zero whenever the planner nets the spread into a rebate.

    Seen in 1 report