Skip to content

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.

Back to the lesson 4,151 to 4,200 of 5,700
  1. The processing fee is calculated on the full customer amount rather than the gross subsidy amount.

    Seen in 1 report
  2. The processing fee is computed and subtracted but never transferred to the treasury, leaving it in escrow.

    Seen in 1 report
  3. The processing fee rate is applied to the customer's full payment rather than the platform subsidy amount.

    Seen in 1 report
  4. The produce function only checks that name and symbol are non-empty and never validates characters against the standard.

    Seen in 1 report
  5. The production frontend called a development store and shipped its token, and production checkout trusted carts created there.

    Seen in 1 report
  6. The profile picture update was applied even though the app reported an error, so the restriction was not enforced.

    Seen in 1 report
  7. The profile update endpoint accepted a username field without re-checking the username policy or whether changes were allowed.

    Seen in 1 report
  8. The profit-clearing step runs even when the conversion step failed, so stored profits are wiped without distribution.

    Seen in 1 report
  9. The program validated the mint account from the transaction context but not the token account's actual mint.

    Seen in 1 report
  10. The programmatic user creation endpoint did not validate that the email belonged to the restricted programmatic domain.

    Seen in 1 report
  11. The progress bar code did not guard against a terminal width small enough to make a divisor zero.

    Seen in 1 report
  12. The project limit counted all projects ever created rather than current ones.

    Seen in 1 report
  13. The projected-position helper subtracts pending close sizes without checking whether those orders have passed their execution deadline.

    Seen in 1 report
  14. The promo code redemption endpoint had no rate limiting and returned verbose responses containing inviter metadata.

    Seen in 1 report
  15. The promotion endpoint lacked rate limiting and CAPTCHA and returned distinguishable responses for each code state.

    Seen in 1 report
  16. The proof did not include the epoch, so verification always used the current validator set rather than the signing one.

    Seen in 1 report
  17. 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
  18. 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
  19. 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
  20. The proposal threshold is derived from the current total supply, which is zero before any locks exist.

    Seen in 1 report
  21. 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
  22. 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.

    Seen in 1 report
  23. 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
  24. The protocol credits itself a share of seized collateral in storage but implements no withdrawal function.

    Seen in 1 report
  25. 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.

    Seen in 1 report
  26. The protocol fee is transferred out without calling the interest rate update first.

    Seen in 1 report
  27. The protocol fee share was computed as paid divided by the fee setting rather than multiplied by the percentage.

    Seen in 1 report
  28. 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.

    Seen in 1 report
  29. The protocol handler allowed arbitrary settings changes via URL parameters without validation or user confirmation.

    Seen in 1 report
  30. The protocol liquidity withdrawal omitted the safe-withdrawal price barrier used by normal liquidity removal.

    Seen in 1 report
  31. 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
  32. The protocol priced unfinalised withdrawal requests using the yield token oracle instead of the fixed underlying amount escrowed at cooldown.

    Seen in 1 report
  33. The protocol reads price and reserve averages without forcing an update in the same transaction.

    Seen in 1 report
  34. The protocol relies on a fallback oracle without ensuring frequent updates or waiting for a dispute period.

    Seen in 1 report
  35. The protocol transfers the NFT to itself and back, which clears approvals under standard ERC721 behaviour.

    Seen in 1 report
  36. The protocol treats a managed NFT as stable collateral without preventing withdrawal of the underlying tokens.

    Seen in 1 report
  37. The protocol validated available liquidity without reserving or transferring the underlying tokens at loan creation.

    Seen in 1 report
  38. The provide and withdraw liquidity messages calculated outcomes from live reserves without letting users set a minimum acceptable amount.

    Seen in 1 report
  39. The provide function does not reset the withdrawal request timestamp.

    Seen in 1 report
  40. The provider used Idle's fee-excluding token price instead of the fee-aware price.

    Seen in 1 report
  41. The proxy called the teller's deposit without forwarding the original user, so the share lock applied to the proxy.

    Seen in 1 report
  42. 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
  43. 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
  44. The public suffix comparison is case-sensitive, so a mixed-case suffix does not match the lowercase list entry.

    Seen in 1 report
  45. The publish function updates the APR without first settling interest accrued under the old rate.

    Seen in 1 report
  46. The purchase contract is added to the holders set when it receives tokens for sale, so it is treated as a normal holder.

    Seen in 1 report
  47. The purchase function does not verify that the real commitment amount is greater than zero.

    Seen in 1 report
  48. The purchase receipt and order ID were not validated against the app store's API before creating a subscription.

    Seen in 1 report
  49. The push function did not check whether the vault was switched off.

    Seen in 1 report
  50. The push function lacked a check preventing multiple calls for the same chain.

    Seen in 1 report