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.
-
Enforce the retailer limit and entitlement server-side rather than trusting client state.
-
Enforce the sample-order limit server-side and do not expose original premium image URLs in resizing responses.
Seen in 1 report
-
Enforce the subscription check on every request, not only the first attempt.
Seen in 1 report
-
Enforce the subscription plan on the backend when serving transcription and caption resources.
-
Enforce the subscription tier in the GraphQL mutation, not only in the interface.
-
Enforce the verified state server-side rather than trusting boolean flags returned to the client.
Seen in 1 report
-
Enforce upload size and count limits independently on the backend rather than trusting client-supplied configuration.
-
Ensure the non-final claim cap leaves the vested unpaid amount zero or at least the minimum payout.
-
Ensure the user-supplied increase value is consistent with the collateral transferred in.
-
Escape or sanitise user-supplied name fields before inserting them into email templates.
-
Exempt withdrawals signed by the vault fee wallet and program fee wallet from withdrawal fees.
-
Expire preview tokens and invalidate them on uninstall, and reject invisible characters in names.
-
Fail resolution when a name has no address record instead of falling back to the registry owner.
-
Fix the duplicate check so it works for the first collateral token.
Seen in 1 report
-
Force an update of price and reserve averages in the same transaction.
Seen in 1 report
-
Generate nonces from a cryptographic source and delete them only after successful validation.
-
Guard state transitions so the epoch process cannot restart after moving to group processing.
-
Handle the case where the DEX handler returns LP tokens instead of underlying assets.
Seen in 1 report
-
Handle the case where the pool already exists.
Seen in 1 report
-
Medium
-
-
Handle the native currency zero address separately from ERC20 balance checks.
-
Handle the not-yet-wrapped case when calculating the first sample index.
Seen in 1 report
-
Hash the ENSIP-15-normalised UTF-8 name rather than the punycode form when displaying the namehash.
-
Identify pending edits by the numeric coin type rather than the display symbol.
-
Include a rules version or hash in the signed customer payload.
Seen in 1 report
-
Include pending orders with fixed fill prices in the settlement NAV, or make settlement and execution ordering irrelevant.
-
Include the funded negative-VPI clawback reserve as a receivable when pricing LP entry.
-
Include the incident timestamp in the Merkle proof verification.
Seen in 1 report
-
Medium
-
-
Include the live V1 resolver and owner state in the migration plan cache key and re-read it before submitting.
-
Include the ordered execution option in cross-chain withdrawal messages.
Seen in 1 report
-
Include the pending open's committed margin in the liquidation health test.
-
Include the size constraint in the signed URL explicitly rather than relying on the SDK presigner.
Seen in 1 report
-
Include the tip field in the high-security policy check.
Seen in 1 report
-
Initialize the last reward timestamp before calculating rewards.
Seen in 1 report
-
Invalidate existing sessions when the password changes.
Seen in 1 report
-
Invalidate invitation links after use and after an admin revokes the user.
Seen in 1 report
-
Invalidate the session server-side on logout and send no-cache headers for authenticated pages.
Seen in 1 report
-
$150 Medium
-
-
Key completion evidence by the specific account, registry, role change, wallet and chain rather than a constant operation ID.
-
Key the rate limit on the requesting account as well as the address.
-
Key the registration state machine to the selected name and cancel it when the selection changes.
-
Let the caller specify a minimum output amount on deposit.
Seen in 1 report
-
Lock and validate the pairing of payment reference and invoice number across concurrent transactions.
-
Make treasury activation an explicit transaction with an event rather than a timestamp comparison in a view.
-
Mark a verification code as consumed after a successful password change.
Seen in 1 report
-
Mark the execute function payable and forward ETH from the Timelock.
Seen in 1 report
-
Match the contract's interface definitions to the actual DEX gauge and router interfaces.
Seen in 1 report
-
Migrate the accepted per-feed timestamp floor when rotating the oracle.
Seen in 1 report
-
Multiply by the index's share instead of dividing when calculating the deduction.
-
Net off the marked receivable when recording seized cash as claimant revenue.
Seen in 1 report
-
Net trader payouts against the pending revenue bucket before reserving it at reconciliation.
-
Normalise coupon codes consistently before both validation and duplicate detection.
Seen in 1 report