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 101 to 150 of 427
  1. Claim the receiver's pending rewards before increasing their average start time, and ignore dust deposits when resetting it.

    Seen in 2 reports
  2. Configure the billing public key and verify purchase receipt signatures in the native plugin.

    Seen in 2 reports
  3. Decrement the global cumulative earmarked counter in the force-repay path.

    Seen in 2 reports
  4. Derive the minimum output from a manipulation-resistant source rather than the current pool state.

    Seen in 2 reports
  5. Enforce the same maximum line length in the cookie jar writer as the reader, counting domain and path.

    Seen in 2 reports
  6. Keep the protocol treasury address out of the execution-config digest, or version the config separately, so a treasury rotation does not invalidate pending orders.

    Seen in 2 reports
  7. Pass true for the extra-incentive claim flag in the routine claim path and override the internal claim hook in each strategy.

    Seen in 2 reports
  8. Pay the liquidator base fee unconditionally from the gross seizure.

    Seen in 2 reports
  9. Put a lower bound on pool depth and cap the price-impact charge relative to the notional being closed.

    Seen in 2 reports
  10. Rate limit on the real connection address rather than client-supplied forwarding headers.

    Seen in 2 reports
  11. Recompute the transaction ID from the signed transaction data on the DA layer instead of trusting the submitted field.

    Seen in 2 reports
  12. Reduce the global cumulative earmarked counter in the forced repayment routine as the normal repay path does.

    Seen in 2 reports
  13. Reject a minimum collateralisation below the existing lower bound.

    Seen in 2 reports
  14. Remove array elements properly and rebuild the cache before dependent functions run.

    Seen in 2 reports
  15. Store the rate that applied when each deposit arrived instead of reading the live rate at release.

    Seen in 2 reports
  16. Track the exact shares a rescue moved rather than a single boolean, and check the flag in the request path.

    Seen in 2 reports
  17. Verify the webhook signature against the payload and record processed event IDs to reject replays.

    Seen in 2 reports
  18. Accept and enforce a user-specified minimum output on claim and withdraw.

    Seen in 1 report
  19. Accept both SPL Token and Token 2022 program IDs instead of hardcoding one.

    Seen in 1 report
  20. Account for fresh post-reset exit balances when handling vested pending unstakes.

    Seen in 1 report
  21. Account for losses in the underlying strategy when calculating deposit shares.

    Seen in 1 report
  22. Account for past changes to the epoch length when calculating the next epoch's start time.

    Seen in 1 report
  23. Add a source-equals-destination guard on the hold release arm of the event scan.

    Seen in 1 report
  24. Add a timelocked submission function for strategy removal.

    Seen in 1 report
  25. Add an owner sweep for tokens sent directly to the tranche vault above recorded escrow obligations.

    Seen in 1 report
  26. Add rate limiting and extra verification so unauthenticated requests cannot lock an account by identifier alone.

    Seen in 1 report
  27. Add rate limiting, CAPTCHA or account lockout to the login endpoint.

    Seen in 1 report
  28. Add timelocks and quorum requirements so borrowed voting power cannot pass a proposal in one transaction.

    Seen in 1 report
  29. Add unassigned earnings to the accumulator before comparing it with the bad debt.

    Seen in 1 report
  30. Add upper and lower bounds to the emission rate parameter.

    Seen in 1 report
  31. Agree on one handler address encoding and check it before marking the message consumed.

    Seen in 1 report
  32. Apply full normalisation before availability checks and registration.

    Seen in 1 report
  33. Apply rewards for the elapsed interval before assigning the new rate.

    Seen in 1 report
  34. Apply the amplification factor only where it is valid, rather than compounding it on an already-grown exchange price.

    Seen in 1 report
  35. Apply the first-party trust check before honouring a caller-supplied transition type.

    Seen in 1 report