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 backend relies on the UI to restrict email changes and does not enforce or verify them server-side.
-
The base fee payout is conditional on post-debit leftover collateral instead of being paid from the gross seizure.
-
The batch price path reads the cached price before loading the asset configuration, and admin functions that change oracle settings never invalidate the cache.
Seen in 2 reports
-
The burn function subtracted only the fee amounts from reserves instead of the full burned amounts.
Seen in 2 reports
-
The burn function used the contract's live pool token balance, which direct transfers can inflate, instead of a cached internal value.
Seen in 2 reports
-
The calendar configuration and the staleness limit are validated separately, so nothing checks that the longest continuous frozen stretch stays within the maximum age the contract enforces.
Seen in 2 reports
-
High -
High
-
-
The canCall functions assumed tokens were always sent to the caller, but router functions allow a different receiver.
-
The cancel function does not restore the buffer or remove the pending operation, and redelegation happens without moving funds first.
-
The capacity formula mixed a live first-loss buffer with a period-start vault snapshot, and the payout checkpoint was keyed after the period start so the reduction was invisible.
Seen in 2 reports
-
High
-
High
-
-
The captcha answer was rendered into the page HTML rather than kept server-side or shown only as an image.
Seen in 2 reports
-
The checked-in base and payment weights were generated against a generic upstream runtime and never regenerated for the custom signature scheme and fee collector storage.
-
The checkout display and the registration machine compute the funding amount from separate sources with no binding between them.
Seen in 2 reports
-
The checkpoint variable was declared as a memory pointer rather than a storage pointer, so assignments to it did not persist.
-
The child strategy does not override the empty internal claim function, so the public claim is a no-op.
-
The circuit enforces a fee inequality per leaf while the runtime takes one ceiling over the summed bundle output.
-
The claim check required the prize to be fully drawn (inactive) instead of checking that the caller is a recorded winner for a drawn slot.
-
The claim path reused a strict active-token check instead of checking the caller's accrued balance for that token.
-
The claimable-period bounds check let the window extend past the delegation's end period and the reward calculation never verified the token was staked in that period.
-
The claimable-period check only caps the first claim at the exit period, and later claims are treated as valid once the last claimed period moves past it.
-
The close fee is waived only at exactly zero depth rather than treating small or non-positive depths as protected, leaving the inverse-depth term unbounded.
-
The close path nets the VPI rebate against the execution fee and then budgets the pool top-up from that already-reduced fee, so the treasury top-up is always zero.
-
The close planner nets the rebate against the execution fee before fee eligibility, so the treasury is credited only the reduced remainder.
Seen in 2 reports
-
Medium -
Medium
-
-
The close price impact formula divides by pool depth with no floor or cap, and the exemption checks only for exact zero depth rather than a small threshold.
Seen in 2 reports
-
High -
High
-
-
The close pricing kernel divides skew cost by execution-time net pool depth and only clamps the rebate side of lifetime VPI at zero, leaving the charge side unbounded.
Seen in 2 reports
-
The close rebate branch nets the execution fee into the action amount but leaves the fee-eligible counters at zero, so no protocol fee top-up is requested.
-
The close VPI charge is uncapped and inversely proportional to net depth, and the zero-depth exemption only applies at exactly zero depth.
-
The close-side charge divides by pool depth with no cap relative to the closed notional or the closer's account, and collection draws from all free settlement and margin.
Seen in 2 reports
-
The code assumes delegation always starts in the period after the last completed one, which is wrong for pending or queued validators.
-
The code called the vault or swapper without first approving the token spend.
-
The code calls balanceOf and transfer on the reward contract address instead of the actual reward token address returned by the reward token accessor.
Seen in 2 reports
-
The code did not check the boolean return value of the ERC20 transfer call.
-
The code passed the current block timestamp as the deadline, so the deadline check compared the current time against itself.
Seen in 2 reports
-
The code uses safeTransfer and safeTransferFrom without checking the actual balance change, assuming the recipient receives the full amount.
Seen in 2 reports
-
The collateralisation ratio is checked before the repayment fee is deducted and never re-checked afterwards.
-
The commission lookup fell back to the current commission when no checkpoint existed, and the validator add path omitted the initial commission checkpoint.
-
The commit-time predictable-open check builds its snapshot from the live position instead of the queued-position projection.
Seen in 2 reports
-
Low -
Low
-
-
The constructor's require statement checked the uninitialised state variable rather than the input parameter.
Seen in 2 reports
-
The contract assumed block.number advances at a constant rate, which is false on some chains.
Seen in 2 reports
-
The contract credited the requested amount instead of measuring the balance increase after transfer.
-
The contract omitted initialising the liquidation threshold, leaving it at its default zero.
Seen in 2 reports
-
The contract used the requested transfer amount instead of the actual received amount.
-
The contract used the transfer amount instead of checking the actual balance change to determine how many tokens arrived.
Seen in 2 reports
-
The conversion and repayment logic only handles a plain lending pair as the paired LP token and does not account for a podded fTKN variant.
-
The dialog read a live refetchable value instead of binding an immutable pending action when it opened.
-
The dialog used the raw indexer name for display and the forward write but normalised the same value for the reverse-registrar call.
Seen in 2 reports
-
Critical -
Critical
-
-
The digest hashes the time-resolved treasury address rather than the committed treasury schedule, so a scheduled activation moves the digest without any transaction.
Seen in 2 reports
-
Low -
Low
-
-
The dispatcher caps the redeemable share amount by the yield token balance instead of the principal token balance, even after maturity.
-
The displayed expiry was computed from a normalised name while the submitted label came from a parser that only trimmed and lowercased.
-
The distributeEx function does not verify that the provided token is not the main reward token and never decrements the per-gauge claimable amount.
Seen in 2 reports
-
The dust redistribution logic assumed the last holder was eligible, and integer division remainders were never reconciled at the end of the final batch.