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 201 to 250 of 427
  1. Checkpoint balances when vault ownership changes.

    Seen in 1 report
  2. Clamp the body write to the declared message size and discard bytes after the terminator.

    Seen in 1 report
  3. Clear approvals with the internal approval-clearing routine rather than the public approve function.

    Seen in 1 report
  4. Clear or validate the name's stored records before reattaching an existing stateful resolver.

    Seen in 1 report
  5. Clear the compromised flag when an address is restored.

    Seen in 1 report
  6. Clear the elected accounts array after processing to prevent repeated rewards.

    Seen in 1 report
  7. Collect LP fees from the separate rewards distributor rather than relying on burnAndCollect.

    Seen in 1 report
  8. Compare big integer values rather than pointers.

    Seen in 1 report
  9. Compare finality events against a threshold that accounts for the chain's normal finality lag.

    Seen in 1 report
  10. Compare the encryption bit between the Local File Header and the Central Directory in minizip.

    Seen in 1 report
  11. Compare the saved baseline and the form values in the same normalised form.

    Seen in 1 report
  12. Compare the submitted amount against the server-side cart total before processing payment.

    Seen in 1 report
  13. Compute capacity from live vault assets and revalidate stored commitments at settlement.

    Seen in 1 report
  14. Compute the protocol fee share as a percentage rather than dividing by the fee setting.

    Seen in 1 report
  15. Compute the redemption delta before the earmark call updates the reference balance.

    Seen in 1 report
  16. Consider sustained price drops when blocking liquidations based on spot price versus TWAP.

    Seen in 1 report
  17. Constrain the deposited token's mint address to equal the allowed token's mint address.

    Seen in 1 report
  18. Constrain the webhook lookup by user, channel type and status, and reject duplicate pending addresses.

    Seen in 1 report
  19. Control rounding in the utilisation percentage so values just under the cap do not display as 100 percent.

    Seen in 1 report
  20. Convert shares to assets before comparing against asset-denominated tier thresholds.

    Seen in 1 report
  21. Correct the formula for shares received in single-asset entry.

    Seen in 1 report
  22. Correct the hardcoded function selectors to match the real signatures.

    Seen in 1 report
  23. Correct the public liquidation pages to describe uncovered loss as a diagnostic write-off rather than protocol bad debt.

    Seen in 1 report
  24. Count Unicode code points rather than UTF-16 code units when deciding whether a character is a special key.

    Seen in 1 report
  25. Cross-check resolver events against the registry's resolver records before rendering them.

    Seen in 1 report
  26. Deduct the performance fee when calculating invested assets.

    Seen in 1 report
  27. Derive ownership from the registrant or wrapped owner rather than the v1 registry controller.

    Seen in 1 report
  28. Derive plan and price server-side from the user's selection rather than trusting client-supplied values.

    Seen in 1 report
  29. Derive the signed scope from the same row data shown to the operator and do not overload an empty fallback as root scope.

    Seen in 1 report
  30. Disable confirm when decoding fails, not only when fetching the call bytes fails.

    Seen in 1 report
  31. Do not accept the course price from the client; look it up server-side at checkout.

    Seen in 1 report
  32. Do not apply the exchange contribution when the token supply becomes zero.

    Seen in 1 report
  33. Do not calculate liquidity to burn from pool reserves for V3 pools that support single-sided liquidity.

    Seen in 1 report
  34. Do not reset the failed-attempt counter on a successful login from the same IP.

    Seen in 1 report
  35. Do not reuse the registration response token for email verification; issue a separate single-use verification token.

    Seen in 1 report
  36. Do not treat an inner dispatch error as terminal, or retry the hold release.

    Seen in 1 report
  37. Emit an event when a deferred refund is credited to the internal ledger and update the NatSpec to match the actual refund flow.

    Seen in 1 report
  38. Emit the computed credit rather than the function input.

    Seen in 1 report
  39. Enforce a limit on account creation requests per source in a time window.

    Seen in 1 report
  40. Enforce a minimum execution window tied to keeper latency and the settlement window.

    Seen in 1 report
  41. Enforce a minimum quantity of one on the server.

    Seen in 1 report
  42. Enforce that fixed-size bytes types are between 1 and 32 bytes.

    Seen in 1 report
  43. Enforce that the sale price stays at or above the peg throughout the trade.

    Seen in 1 report
  44. Enforce that withdrawal penalties are greater than zero.

    Seen in 1 report
  45. Enforce the email domain restriction on the server.

    Seen in 1 report
  46. Enforce the maximum meeting duration on the server.

    Seen in 1 report
  47. Enforce the maximum sample count inside the inner loop that appends scores.

    Seen in 1 report
  48. Enforce the password protection rule in the preferences save operation.

    Seen in 1 report