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 351 to 400 of 427
  1. Require the etag and reject approve requests that omit it.

    Seen in 1 report
  2. Require the native value to be zero when the input token is not ETH.

    Seen in 1 report
  3. Require verification before an address can be used as the notification email.

    Seen in 1 report
  4. Reserve the marked profit of open winners in the solvency gates and the LP withdrawal firewall.

    Seen in 1 report
  5. Reset the fee to zero when the decay period has fully elapsed.

    Seen in 1 report
  6. Reset the partial hash state when a download switches from parallel to serial.

    Seen in 1 report
  7. Resolve release downloads to the exact commit rather than the tag name, and clean up releases when a tag is deleted.

    Seen in 1 report
  8. Restrict when setToProcessGroups can be called so rewards are not locked in at the start of an epoch.

    Seen in 1 report
  9. Retain or transfer outstanding cancellation charges when an account is deleted.

    Seen in 1 report
  10. Return a deep copy from the dataCopy precompile instead of the input slice.

    Seen in 1 report
  11. Return and transfer the actual redeemed amount rather than the requested amount.

    Seen in 1 report
  12. Return provenance with resolved addresses and refuse owner-fallback on transfer and grant paths.

    Seen in 1 report
  13. Return the correct decimals in all branches of the price function.

    Seen in 1 report
  14. Revalidate stored scope_extensions on later launches and silent manifest updates, not only for Isolated Web Apps.

    Seen in 1 report
  15. Revert when the share removal helper cannot remove all requested shares.

    Seen in 1 report
  16. Round consistently in the flow-unit delta calculation so repeated small swaps cannot bypass the limit.

    Seen in 1 report
  17. Sanitise the description before using it as a fallback subject.

    Seen in 1 report
  18. Save the validated slot's start and end values rather than the raw request parameters, and repeat the check at confirmation.

    Seen in 1 report
  19. Seed the candidate oracle's accepted prices, basket and accepted-basket flag during rotation so ordering guards apply from the first update.

    Seen in 1 report
  20. Send claimed rewards to the strategy itself rather than the vault.

    Seen in 1 report
  21. Set the period start to the end of the current period rather than the start of the next.

    Seen in 1 report
  22. Settle pending rewards before resetting the last reward index.

    Seen in 1 report
  23. Show only verified business emails on the collaborator request review page.

    Seen in 1 report
  24. Stop erasing the New Tab Page override permission from the comparison sets so adding it counts as a privilege increase.

    Seen in 1 report
  25. Store a per-stake unlock time fixed at deposit instead of reading the current global period.

    Seen in 1 report
  26. Store a snapshot of the voter's balance at vote time and subtract that snapshot when clearing.

    Seen in 1 report
  27. Strip whitespace before applying the length-based premium check.

    Seen in 1 report
  28. Subtract redeemed unstake units from the epoch exit balance in the reset path.

    Seen in 1 report
  29. Surface the budget quote failure and keep the affordability check active instead of sizing the permit from a null value.

    Seen in 1 report
  30. Tie the quota to the conversation or a strong token and force shared links into read-only mode for unauthenticated users.

    Seen in 1 report
  31. Track cumulative withdrawals over time to enforce the intended cap.

    Seen in 1 report
  32. Track deposits internally instead of using the strategy's raw token balance to determine if it holds no funds.

    Seen in 1 report
  33. Track how much native value has been accounted for within a transaction.

    Seen in 1 report
  34. Transfer LP tokens instead of attempting to pay out unavailable WAVAX.

    Seen in 1 report
  35. Transfer the borrowed ETH to the lender during liquidation.

    Seen in 1 report
  36. Treat payment as final only after execution or finality, and clear the paid state when the watched transaction is replaced, dropped or fails.

    Seen in 1 report
  37. Trim and normalise the avatar name before validating it.

    Seen in 1 report
  38. Update reward debt with the trimmed amount actually sent and use the trimmed amount in the greater-than-zero check.

    Seen in 1 report
  39. Update stake bookkeeping on share transfers or make shares non-transferable.

    Seen in 1 report
  40. Update the last minted timestamp even when total staked is zero.

    Seen in 1 report
  41. Use a manipulation-resistant oracle such as a TWAP for trade size calculation.

    Seen in 1 report
  42. Use a strict less-than in the single-block boundary check.

    Seen in 1 report
  43. Use an assignment instead of a comparison to set the status to false.

    Seen in 1 report
  44. Use one JSON parser across the gateway and backend, reject duplicate keys, and verify the signature on every event type.

    Seen in 1 report
  45. Use strict comparison and cast identifiers to integers before comparing.

    Seen in 1 report
  46. Use the campaign start time as a lower bound when calculating elapsed reward time.

    Seen in 1 report
  47. Use the fixed 18-decimal scale in the allocation formula.

    Seen in 1 report
  48. Use the internal reserve balance instead of the contract's actual token balance when minting LP tokens.

    Seen in 1 report
  49. Use the original expiration period when checking whether a scheduled operation is ready.

    Seen in 1 report
  50. Use the protocol's L2-aware block number helper for terminal receipts on Arbitrum.

    Seen in 1 report