Skip to content

In-depth lesson · Business logic

Typical fixes

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 301 to 350 of 427
  1. Normalise the name once and use the same node for owner and records queries.

    Seen in 1 report
  2. Observe PaymentRequestSpec updates so the signed amount matches the amount shown in the trusted dialog.

    Seen in 1 report
  3. Override claimRewards to call the reward controller for the relevant assets.

    Seen in 1 report
  4. Override maxWithdraw and maxRedeem to account for the minimum stake period.

    Seen in 1 report
  5. Override the throttle identity so it does not trust the client-supplied forwarding header.

    Seen in 1 report
  6. Paginate on a unique tiebreaker and treat a truncated page as an error rather than a cursor.

    Seen in 1 report
  7. Pass a minimum-shares-out or slippage bound when withdrawing from the external vault.

    Seen in 1 report
  8. Pass a non-zero minimum shares out and verify shares received.

    Seen in 1 report
  9. Pass the calculated revenue into the drip function instead of re-reading the stored value.

    Seen in 1 report
  10. Pass the caller into the sender field of the event.

    Seen in 1 report
  11. Pass zero as the additional revenue when activating a topic after a stake.

    Seen in 1 report
  12. Perform an ownership check such as a DNS record or file before reserving a custom domain.

    Seen in 1 report
  13. Perform the password reuse comparison on the server instead of trusting a client-supplied flag.

    Seen in 1 report
  14. Preserve or return the shortfall instead of burning the position for the capped amount.

    Seen in 1 report
  15. Prevent an account from changing its email to one already used by another account.

    Seen in 1 report
  16. Prevent harvest from resetting the finish time after distribution has been marked finished.

    Seen in 1 report
  17. Propagate the API error to the caller instead of only logging it.

    Seen in 1 report
  18. Properly adjust the counter and active samples when increasing sample memory.

    Seen in 1 report
  19. Pull funds back from the strategy before transferring them out.

    Seen in 1 report
  20. Quantum-align minted amounts and leaves, or enforce a minimum, so remainders are claimable.

    Seen in 1 report
  21. Range-check latitude and longitude before saving.

    Seen in 1 report
  22. Rate limit confirmation code attempts and shorten the code validity window.

    Seen in 1 report
  23. Re-check the company-email restriction on the second step and bind the email to the first step's session.

    Seen in 1 report
  24. Re-check the trust level of all participants when someone is added to a conversation.

    Seen in 1 report
  25. Re-check the username policy and whether changes are allowed on the profile update endpoint.

    Seen in 1 report
  26. Re-evaluate the voting threshold after updating vote counts on a transfer.

    Seen in 1 report
  27. Re-read the live registry owner, resolver and records before submitting a migration.

    Seen in 1 report
  28. Re-validate existing links against the current share settings on every download.

    Seen in 1 report
  29. Re-validate group ownership immediately before allowing deletion.

    Seen in 1 report
  30. Re-validate subscription status during cross-device session handoff.

    Seen in 1 report
  31. Re-validate the verification status on the backend before serving restricted routes.

    Seen in 1 report
  32. Read the token's actual decimals instead of dividing by a hardcoded factor.

    Seen in 1 report
  33. Recalculate the discount server-side from the promo code instead of trusting the request amount.

    Seen in 1 report
  34. Recalculate the order price server-side from stored product data.

    Seen in 1 report
  35. Recalculate the total from the authoritative product price and current cart state at checkout.

    Seen in 1 report
  36. Recompute the multisig address from signers, threshold and nonce and compare it with the indexer record.

    Seen in 1 report
  37. Recompute the unassigned cash cap upward when the terminal delta recovers.

    Seen in 1 report
  38. Record a checkpoint at a specific block number when calculating voting power.

    Seen in 1 report
  39. Record carry and settlement fields in the commitment effects on the open and increase branch.

    Seen in 1 report
  40. Refund the actual unspent amount rather than absorbing it into the fee.

    Seen in 1 report
  41. Register the user's principal before paying the execution fee, or make the recovery mechanism cover fee shortfalls.

    Seen in 1 report
  42. Reject auth dates in the future as well as dates older than the maximum age.

    Seen in 1 report
  43. Reject duplicate shareholders in the shareholder-setting function.

    Seen in 1 report
  44. Reject expiration dates that are not in the future.

    Seen in 1 report
  45. Reject requests with an empty or invalid organisation identifier instead of skipping the quota deduction.

    Seen in 1 report
  46. Remember the permission request the bubble was created for and act on that request.

    Seen in 1 report
  47. Require a CAPTCHA token on every registration and treat tokens as single-use.

    Seen in 1 report
  48. Require a minimum initial liquidity and lock the first LP tokens.

    Seen in 1 report
  49. Require authentication and authorisation and do not trust client-supplied recipient or content fields.

    Seen in 1 report