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 51 to 100 of 427
  1. Key the limiter on the real connection address and normalise identifiers before counting.

    Seen in 4 reports
  2. Override the transfer hooks to keep the per-user stake ledger in sync with share movements.

    Seen in 4 reports
  3. Persist the full recapitalization target and bootstrap the Senior high-water mark from it rather than from the live decremented pending bucket.

    Seen in 4 reports
  4. Re-evaluate the latch automatically and net the offsetting open leg before latching.

    Seen in 4 reports
  5. Record carry collected at commit in the commitment and count it against both charge bounds.

    Seen in 4 reports
  6. Reduce the pending recapitalisation when cash is paid out and do not re-reserve value already credited to Senior.

    Seen in 4 reports
  7. Require the owner, or add a delay or owner priority, before the retry can move the protection out of Latched.

    Seen in 4 reports
  8. Reserve the free settlement an order needs at commit time and validate that the order's own margin can meet its bounds.

    Seen in 4 reports
  9. Update the vault balance before minting shares and use time-weighting or lock-ups for rewards.

    Seen in 4 reports
  10. Validate the CAPTCHA token server-side on every request and reject when it is missing or falsy.

    Seen in 4 reports
  11. Allow debtors to clear their full debt regardless of donation-inflated conversion rates, and exclude donated balances from total assets.

    Seen in 3 reports
  12. Apply the adverse confidence shift before capping the basket, consistently on order execution and liquidation.

    Seen in 3 reports
  13. Bind a nonce, expiry, amount and caller address into the signed payload.

    Seen in 3 reports
  14. Bind the latched state to the owner's amendment so a permissionless retry cannot consume it first.

    Seen in 3 reports
  15. Burn the matching shares on payout and guard the zero-NAV state.

    Seen in 3 reports
  16. Call the transfer recorder on every fee credit so a zk-tree leaf is inserted for the miner and aggregator balances.

    Seen in 3 reports
  17. Check the return codes from Compound-style mint and redeem calls.

    Seen in 3 reports
  18. Condition the fee transfer on the seized amount rather than the remaining collateral, and use greater-than-or-equal comparisons.

    Seen in 3 reports
  19. Convert the remaining asset headroom with the same rounding that deposit and mint use.

    Seen in 3 reports
  20. Decode with the correct ABI type and compute selectors from the current settler ABI.

    Seen in 3 reports
  21. Enforce a real minimum LP amount and price the exercise from a time-weighted average.

    Seen in 3 reports
  22. Handle a single-block earmark range explicitly and do not advance the last-processed block when the query returns zero.

    Seen in 3 reports
  23. Implement the reward claim function and add a rescue path for stranded tokens.

    Seen in 3 reports
  24. Re-check the collateralisation ratio after deducting the repayment fee and guard against zero-amount fee withdrawals.

    Seen in 3 reports
  25. Reduce the high-water mark by the fraction of shares burned, not the fraction of principal paid out.

    Seen in 3 reports
  26. Require the caller to be the controller or an approved operator, and check the queue head can pay out before trusting it.

    Seen in 3 reports
  27. Require the controller's consent when creating a request on its behalf.

    Seen in 3 reports
  28. Return the computed assets variable from mint and repay functions.

    Seen in 3 reports
  29. Revert in allocate when the kill switch is on, or have the vault verify the adapter actually took the assets.

    Seen in 3 reports
  30. Scale the total locked collateral by the same debt-proportion factor and advance the transmuter balance pointer only by the cover actually applied.

    Seen in 3 reports
  31. Set a non-zero minimum-shares-out and enforce the computed cap before forwarding the allocation.

    Seen in 3 reports
  32. Set the senior high-water mark to the maximum of the existing mark and the new principal in the zero-principal branch.

    Seen in 3 reports
  33. Store the cap factor per epoch so historical entitlements are not changed by later owner updates.

    Seen in 3 reports
  34. Use one canonicalisation regime for display, ownership checks and transaction arguments.

    Seen in 3 reports
  35. Add per-account and per-IP throttling and a captcha to the reset endpoint.

    Seen in 2 reports
  36. Apply the projected-wipe guard to every deposit-pricing view, not just the forward estimate.

    Seen in 2 reports
  37. Apply the standard normalisation before resolving any pasted name and do not fall back to the node owner when no address record exists.

    Seen in 2 reports
  38. Apply the wiped-tranche check to every quote function and to the unassigned-assets assignment path, not just the deposit estimate.

    Seen in 2 reports
  39. Apply the zero-assets-with-surviving-shares guard to the bootstrap deposit quote as well as ordinary deposits.

    Seen in 2 reports
  40. Bind the pending action, including name, resolver, access result and transaction branch, when the confirmation is shown.

    Seen in 2 reports
  41. Bound the supply-to-principal ratio and defer activation at near-zero principal, not only at exactly zero.

    Seen in 2 reports
  42. Canonicalise email addresses before comparing them for duplicate or self-invitation checks.

    Seen in 2 reports
  43. Cap the fresh close VPI relative to notional or margin and treat near-zero depth as exempt, not only exactly zero.

    Seen in 2 reports
  44. Check that the computed collateral factor is not zero before allowing collateral withdrawal.

    Seen in 2 reports