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.
-
Accrual eligibility is tied to the token id rather than the underlying locked balance, so merging resets it.
Seen in 3 reports
-
Addresses across different chains were compared by lowercasing the strings, which is invalid for case-sensitive Base58 encodings.
Seen in 3 reports
-
Balance or conversion-rate calculations include directly donated tokens, letting small transfers inflate share price or block repayments.
Seen in 3 reports
-
Capacity getters model only the cap and omit the rounding and zero-share checks that deposit and mint enforce.
Seen in 3 reports
-
Collateral is debited by the gross seized amount before the fee payout is checked against the remaining balance.
Seen in 3 reports
-
Debt is reduced by the full target credit before the actual repayment is clamped to available collateral.
Seen in 3 reports
-
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
-
Display and ownership layers use the raw name while the action layer derives the label from the normalised form.
Seen in 3 reports
-
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
-
Functions return the wrong variable (shares instead of assets) contrary to their declared return type.
Seen in 3 reports
-
Inbound email tickets were accepted without authenticating the sender, so the From address could be forged.
Seen in 3 reports
-
Loops and counters check limits after processing or with the wrong comparison, letting work exceed the configured maximum.
Seen in 3 reports
-
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
-
Minting functions never compare the current block timestamp against the stored collection expiry.
Seen in 3 reports
-
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
-
Offchain token data was forwarded without verifying it matched the payload hash committed in the message.
Seen in 3 reports
-
One boolean mapping is reused to mean both 'already claimed' and 'moved away by rescue', and nothing clears it.
Seen in 3 reports
-
Payout reduces assets without reducing supply, and share conversion has no zero-NAV guard.
Seen in 3 reports
-
Per-address stake timestamps and stake entries are not synchronised when the transferable share token changes hands.
Seen in 3 reports
-
poke lacks the once-per-epoch modifier and withdraw does not checkpoint the current epoch, inflating the checkpoint supply.
Seen in 3 reports
-
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
-
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
-
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
-
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
-
Request creation authenticates the share owner but not the controller named in the request.
Seen in 3 reports
-
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
-
Shares are calculated from the requested amount instead of the measured balance increase.
Seen in 3 reports
-
Signers trusted the coordinator-supplied fee and fee rate without comparing them against a reasonable network value.
Seen in 3 reports
-
The accrual function does not track whether tokens were already accrued for the current epoch.
Seen in 3 reports
-
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
-
The allocate function returns early instead of reverting, so received assets are accepted but never accounted for.
Seen in 3 reports
-
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
-
The backend trusted client-supplied price fields and did not recalculate totals.
Seen in 3 reports
-
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
-
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
-
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
-
The commission claim path checks active status while the user claim path does not, locking earned commission.
Seen in 3 reports
-
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
-
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
-
The current token balance is used as the amount received without subtracting previously accounted balances.
Seen in 3 reports
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
The Jovian consolidation comparison decodes extra_data but discards min_base_fee, comparing only elasticity and denominator.
Seen in 3 reports