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 151 to 200 of 5,700
  1. Accrual eligibility is tied to the token id rather than the underlying locked balance, so merging resets it.

    Seen in 3 reports
  2. Addresses across different chains were compared by lowercasing the strings, which is invalid for case-sensitive Base58 encodings.

    Seen in 3 reports
  3. Balance or conversion-rate calculations include directly donated tokens, letting small transfers inflate share price or block repayments.

    Seen in 3 reports
  4. Capacity getters model only the cap and omit the rounding and zero-share checks that deposit and mint enforce.

    Seen in 3 reports
  5. Collateral is debited by the gross seized amount before the fee payout is checked against the remaining balance.

    Seen in 3 reports
  6. Debt is reduced by the full target credit before the actual repayment is clamped to available collateral.

    Seen in 3 reports
  7. Destroyed accounts are collapsed into a single delete branch, ignoring that a destroyed-then-modified account must be reinserted with its final balance and nonce.

    Seen in 3 reports
  8. Display and ownership layers use the raw name while the action layer derives the label from the normalised form.

    Seen in 3 reports
  9. Equity and leverage bounds are checked against live margin when the order executes, and margin can be added while an order is pending, so the trader can change the input after committing.

    Seen in 3 reports
  10. Functions return the wrong variable (shares instead of assets) contrary to their declared return type.

    Seen in 3 reports
  11. Inbound email tickets were accepted without authenticating the sender, so the From address could be forged.

    Seen in 3 reports
  12. Loops and counters check limits after processing or with the wrong comparison, letting work exceed the configured maximum.

    Seen in 3 reports
  13. merge checks only the source token's voted flag, not the destination's, so a reset token can be merged and reset again.

    Seen in 3 reports
  14. Minting functions never compare the current block timestamp against the stored collection expiry.

    Seen in 3 reports
  15. Nullification dropped the proof count below the threshold while the bond-recovery branch was gated on a sentinel value that was no longer set.

    Seen in 3 reports
  16. Offchain token data was forwarded without verifying it matched the payload hash committed in the message.

    Seen in 3 reports
  17. One boolean mapping is reused to mean both 'already claimed' and 'moved away by rescue', and nothing clears it.

    Seen in 3 reports
  18. Payout reduces assets without reducing supply, and share conversion has no zero-NAV guard.

    Seen in 3 reports
  19. Per-address stake timestamps and stake entries are not synchronised when the transferable share token changes hands.

    Seen in 3 reports
  20. poke lacks the once-per-epoch modifier and withdraw does not checkpoint the current epoch, inflating the checkpoint supply.

    Seen in 3 reports
  21. Pricing is derived from spot reserves or average swap output rather than a true time-weighted average, enabling front-running and size-dependent discounts.

    Seen in 3 reports
  22. Reconcile caps unassigned assets at the current marked distributable value and writes it to storage without recording the prior reserve basis, so a reversible mark move permanently lowers the owner-governed reserve.

    Seen in 3 reports
  23. Redeem request authorises only the share owner and never the controller, and claim functions trust the queue head without checking it can pay out.

    Seen in 3 reports
  24. Refundable fees received at open are booked as pool revenue with no matching liability for the amount later refunded on close.

    Seen in 3 reports
  25. Request creation authenticates the share owner but not the controller named in the request.

    Seen in 3 reports
  26. requestRedeem authorises only the share owner and accepts any caller-chosen controller without that controller's consent, while claims read only the controller's queue head.

    Seen in 3 reports
  27. Shares are calculated from the requested amount instead of the measured balance increase.

    Seen in 3 reports
  28. Signers trusted the coordinator-supplied fee and fee rate without comparing them against a reasonable network value.

    Seen in 3 reports
  29. The accrual function does not track whether tokens were already accrued for the current epoch.

    Seen in 3 reports
  30. The address names table renders the raw indexer name without the normalisation used for renewal calldata, and lacks the name-validity guard present on the profile page.

    Seen in 3 reports
  31. The allocate function returns early instead of reverting, so received assets are accepted but never accounted for.

    Seen in 3 reports
  32. The app uses the raw name for ownership checks and confirmation but re-normalises it before deriving the ERC-1155 token ID, so the authorised asset and the transferred asset diverge.

    Seen in 3 reports
  33. The backend trusted client-supplied price fields and did not recalculate totals.

    Seen in 3 reports
  34. The block-range guard treats a single-block range as invalid and returns zero while the caller still advances its last-processed block.

    Seen in 3 reports
  35. The cap factor is used as a divisor rather than a percentage multiplier and is a single global value applied to all epochs, so it can be changed retroactively.

    Seen in 3 reports
  36. The claim function returns early without advancing the last claimed period when the computed reward is zero, so the backlog grows past the maximum.

    Seen in 3 reports
  37. The commission claim path checks active status while the user claim path does not, locking earned commission.

    Seen in 3 reports
  38. The commission claim path only accepts currently active reward tokens, unlike the staker claim path which allows removed tokens with stored balances.

    Seen in 3 reports
  39. The contract credits the requested transfer amount instead of measuring the real balance difference, so fee-on-transfer tokens create a shortfall.

    Seen in 3 reports
  40. The current token balance is used as the amount received without subtracting previously accounted balances.

    Seen in 3 reports
  41. The enable function trusts the caller's admin role on an arbitrary user-supplied token, and any enabled token blocks the purchase token setter.

    Seen in 3 reports
  42. The execution config hash includes a treasury address that resolves from block.timestamp, so the hash changes with no transaction, event or version bump.

    Seen in 3 reports
  43. The execution-config digest binds the protocol treasury address, which has no effect on order execution, and the successor activates by bare timestamp comparison, so the pinned digest changes with no transaction or event.

    Seen in 3 reports
  44. The exit check used a strict greater-than comparison instead of greater-than-or-equal, so the equality case fell through to the active delegation branch.

    Seen in 3 reports
  45. The fee credit sites call a balance increase without the transfer recorder, so no leaf is inserted and the keyless recipient can never exit the funds.

    Seen in 3 reports
  46. The fee is capped only for the collateral deduction but the uncapped fee value is still returned and transferred to the liquidator.

    Seen in 3 reports
  47. The fee resolution returns the full computed fee without capping it to the collateral actually deducted, so the difference is drawn from the contract's pooled balance.

    Seen in 3 reports
  48. The frozen-oracle branch prices liquidations from the engine's already-capped mark and subtracts the confidence shift from it instead of shifting the uncapped basket and clamping once.

    Seen in 3 reports
  49. The high-water mark is reduced by the funded-asset fraction rather than the funded-share fraction, so funding all principal with a partial share burn zeroes the mark.

    Seen in 3 reports
  50. The Jovian consolidation comparison decodes extra_data but discards min_base_fee, comparing only elasticity and denominator.

    Seen in 3 reports