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.
-
Apply the same long-payment-ID check to the offline create button as the normal send button.
Seen in 1 report
-
Apply the same quota check to batch and single-send endpoints.
Seen in 1 report
-
Apply the unutilised leverage percentage correctly in the repay limit calculation to avoid underflow.
Seen in 1 report
-
Ask the TLS library whether decrypted data is pending before reusing a connection.
Seen in 1 report
-
Authorise the controller as well as the share owner when enqueuing a redeem request.
-
Bind each wallet request to a unique identifier and compare recipient and calldata before display.
Seen in 1 report
-
Bind signed allowance messages to the specific caller and transaction so a front-runner cannot consume them.
-
Bind the invitation token to the invited email address and refuse a different verified email.
Seen in 1 report
-
Bind the OTP challenge to the logged-in account's stored email rather than a client-supplied parameter.
Seen in 1 report
-
Block all FILE URL formats that resolve to SMB paths on Windows.
-
Block approval when the authoritative call bytes cannot be decoded.
Seen in 1 report
-
Build invitation links from a fixed trusted hostname.
-
Build the transaction plan from the same options the UI displays and do not update the address record before the ownership transfer succeeds.
-
Burn the scaled amount and add a slippage check so users can reject unfavourable ratios.
Seen in 1 report
-
Calculate byte slice length as end index minus start index plus one.
Seen in 1 report
-
Calculate price lock expiry from a server-side timestamp.
Seen in 1 report
-
Call the ERC721 _burn function when burning a collateral position.
Seen in 1 report
-
Call the reward update before resetting a user's original allocation.
-
Cap channels per user, chunk the delivery insert, and commit notification and delivery rows together so retries do not treat existing rows as delivered.
-
Cap the additional token amount using only the extra tokens bought back from the market.
Seen in 1 report
-
Charge the swap fee to the depositor rather than spreading it across all vault users.
-
Check a linked pending close's execution deadline and pinned configuration hash in the admission projection.
-
Check authorisation on the location identifier server-side.
Seen in 1 report
-
Check both the asset and debt reward indices when deciding whether pending rewards exist.
Seen in 1 report
-
Check each feed's stored timestamp against its own component timestamp in the cache reuse branch.
-
Check for existing subscribers and previously issued coupons, and add rate limiting and anti-automation controls.
Seen in 1 report
-
Check poll expiry against server time, not the client device clock.
Seen in 1 report
-
Check that maker and taker fees are zero in order validation.
-
Check that the amount to mint is greater than zero before accepting reserve funds.
-
Check that the caller may act for the named controller and inspect the whole queue rather than only its head.
-
Check that the contract's token balances match the pool's reserve ratio before adding liquidity.
Seen in 1 report
-
Check that the pool status is active before accepting collateral.
Seen in 1 report
-
Check that the resource is still active before applying an edit.
Seen in 1 report
-
Check that the token is whitelisted before using its index.
Seen in 1 report
-
Check the boolean return value of ERC20 transfer and transferFrom calls.
Seen in 1 report
-
Check the final trove's collateral ratio after the search loop exits.
Seen in 1 report
-
Check the invoice payment status before applying a plan change and opt in to the safer payment behaviour.
Seen in 1 report
-
Check the islisted flag before processing a purchase.
Seen in 1 report
-
Check the L2 sequencer uptime feed and enforce a grace period before accepting prices.
Seen in 1 report
-
Check the minimum-output limit against the final token balance on every pool branch.
Seen in 1 report
-
Check the organisation's ownership state when an invitation is redeemed.
Seen in 1 report
-
Check the page counter before processing and increment it before the next iteration.
-
Check the password server-side with a salted hash and rate limit attempts.
-
Check the semantic flag that marks the stream as a curl-owned ETag output file before truncating.
Seen in 1 report
-
Check the swap path length and tokens involved when calculating the buyback price.
Seen in 1 report
-
Medium
-
-
Check the total number of troves across all assets rather than per asset.
-
Check the user's subscription server-side before honouring a private visibility flag.
Seen in 1 report
-
Check whether a certification is already linked to another account before allowing a new link.
-
Check whether the pool is in a payout or cover-applied state before allowing credit withdrawal.
-
Checkpoint balances on token transfers.