In-depth lesson · Business logic
Root causes
Every point the Business logic reports back under this heading, best-backed first, each with the reports it is seen in.
-
The processing fee is calculated on the full customer amount rather than the gross subsidy amount.
-
The processing fee is computed and subtracted but never transferred to the treasury, leaving it in escrow.
-
The processing fee rate is applied to the customer's full payment rather than the platform subsidy amount.
Seen in 1 report
-
The produce function only checks that name and symbol are non-empty and never validates characters against the standard.
Seen in 1 report
-
The production frontend called a development store and shipped its token, and production checkout trusted carts created there.
Seen in 1 report
-
The profile picture update was applied even though the app reported an error, so the restriction was not enforced.
Seen in 1 report
-
The profile update endpoint accepted a username field without re-checking the username policy or whether changes were allowed.
Seen in 1 report
-
The profit-clearing step runs even when the conversion step failed, so stored profits are wiped without distribution.
Seen in 1 report
-
The program validated the mint account from the transaction context but not the token account's actual mint.
Seen in 1 report
-
The programmatic user creation endpoint did not validate that the email belonged to the restricted programmatic domain.
Seen in 1 report
-
The progress bar code did not guard against a terminal width small enough to make a divisor zero.
Seen in 1 report
-
The project limit counted all projects ever created rather than current ones.
Seen in 1 report
-
The projected-position helper subtracts pending close sizes without checking whether those orders have passed their execution deadline.
Seen in 1 report
-
The promo code redemption endpoint had no rate limiting and returned verbose responses containing inviter metadata.
Seen in 1 report
-
The promotion endpoint lacked rate limiting and CAPTCHA and returned distinguishable responses for each code state.
Seen in 1 report
-
The proof did not include the epoch, so verification always used the current validator set rather than the signing one.
Seen in 1 report
-
The proof recorder infers value moved from a proxy event or dispatch result and never checks that source and destination differ.
Seen in 1 report
-
The proposal is re-verified against the current guardian set at execution time, so a guardian set change invalidates a queued proposal.
Seen in 1 report
-
The proposal threshold is computed from current total supply while the proposer's votes are read from the previous block, so a third party can move them out of step.
Seen in 1 report
-
The proposal threshold is derived from the current total supply, which is zero before any locks exist.
Seen in 1 report
-
The proposal timestamp is only set when the submitter passes a finalize flag, so the challenge-period check passes when the flag is never set.
Seen in 1 report
-
The protection book reads the price through an order-enforcing oracle view that rejects an accepted basket older than the engine mark, so its own tolerance check is never reached.
-
The protocol checked each protection individually against the remaining principal but did not track the total protection already purchased for a given loan.
Seen in 1 report
-
The protocol credits itself a share of seized collateral in storage but implements no withdrawal function.
Seen in 1 report
-
The protocol does not stop both the cross-chain borrow and cross-chain collateral mappings being populated for the same user and asset on the same chain, breaking an invariant the borrow-with-interest function relies on.
-
The protocol fee is transferred out without calling the interest rate update first.
-
The protocol fee share was computed as paid divided by the fee setting rather than multiplied by the percentage.
Seen in 1 report
-
The protocol fee variable already included the amount multiplier, but it was subtracted again after multiplying the total by amount, causing the fee to be counted amount times too many.
-
The protocol handler allowed arbitrary settings changes via URL parameters without validation or user confirmation.
Seen in 1 report
-
The protocol liquidity withdrawal omitted the safe-withdrawal price barrier used by normal liquidity removal.
-
The protocol mints L2 and L1 tokens at different times using the current valuation at each moment, without tracking the exact amount minted on L2 to mint an equivalent amount on L1.
Seen in 1 report
-
The protocol priced unfinalised withdrawal requests using the yield token oracle instead of the fixed underlying amount escrowed at cooldown.
Seen in 1 report
-
The protocol reads price and reserve averages without forcing an update in the same transaction.
Seen in 1 report
-
The protocol relies on a fallback oracle without ensuring frequent updates or waiting for a dispute period.
Seen in 1 report
-
The protocol transfers the NFT to itself and back, which clears approvals under standard ERC721 behaviour.
Seen in 1 report
-
The protocol treats a managed NFT as stable collateral without preventing withdrawal of the underlying tokens.
Seen in 1 report
-
The protocol validated available liquidity without reserving or transferring the underlying tokens at loan creation.
-
The provide and withdraw liquidity messages calculated outcomes from live reserves without letting users set a minimum acceptable amount.
Seen in 1 report
-
The provide function does not reset the withdrawal request timestamp.
-
The provider used Idle's fee-excluding token price instead of the fee-aware price.
Seen in 1 report
-
The proxy called the teller's deposit without forwarding the original user, so the share lock applied to the proxy.
-
The proxy did not verify that the order price matched the token amount actually sent, so a zero price was accepted.
Seen in 1 report
-
The public suffix check only runs when the setting-host argument is non-null, and the jar load path passes null.
Seen in 1 report
-
The public suffix comparison is case-sensitive, so a mixed-case suffix does not match the lowercase list entry.
Seen in 1 report
-
$2,540 Medium
-
-
The publish function updates the APR without first settling interest accrued under the old rate.
Seen in 1 report
-
The purchase contract is added to the holders set when it receives tokens for sale, so it is treated as a normal holder.
-
The purchase function does not verify that the real commitment amount is greater than zero.
Seen in 1 report
-
The purchase receipt and order ID were not validated against the app store's API before creating a subscription.
Seen in 1 report
-
The push function did not check whether the vault was switched off.
Seen in 1 report
-
The push function lacked a check preventing multiple calls for the same chain.
Seen in 1 report