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.
-
Minting did not update the foreign reserve balance when native tokens were deposited.
Seen in 1 report
-
Minting logic uses the native value instead of the amount parameter, which is zero for ERC20 transfers.
Seen in 1 report
-
Minting trusted a caller-supplied size parameter without validating it against the size encoded in the token ID.
-
mintSynth did not verify that the requested synth's underlying token matched the pool's own token.
Seen in 1 report
-
Missing state checks: the position is not verified as active before paying yield, and balance fields are not reset after withdrawal.
Seen in 1 report
-
There is missing validation that the recipient address is not the zero address in three functions.
Seen in 1 report
-
Medium
-
-
There is a missing verification check before allowing the Report Retest feature to be used on a program.
-
Treasury and non-treasury token slices are mixed in a threshold comparison without a common percentage basis.
Seen in 1 report
-
moveQuoteToken lacks the bankruptcy condition check that removeQuoteToken performs.
-
moveQuoteToken lacks the debt less than or equal to deposits check that removeQuoteToken has.
Seen in 1 report
-
MySQL truncated the string at the first character above the utf8 range, changing the stored address.
Seen in 1 report
-
Names were stored without normalising invisible whitespace while the frontend stripped it when rendering.
-
Negative collateral is left unsocialised so total user collateral exceeds actual funds.
-
Neither the wallet nor the card scheme validated the full relay-resistant protocol at their boundary.
Seen in 1 report
-
Net asset value depended on pool liquidity that any whitelisted borrower could reduce.
Seen in 1 report
-
netAssetDeposits was not adjusted for price changes between deposit and withdrawal.
Seen in 1 report
-
netAssetDeposits was not increased when quote tokens were deposited.
Seen in 1 report
-
New codes were stored without invalidating or expiring previously issued ones.
-
New order IDs used the current index length instead of tracking freed IDs, so IDs collided after cancellation.
Seen in 1 report
-
New unstake amounts are aggregated into an existing cooldown entry and the end time is reset for the entire amount.
Seen in 1 report
-
New validators start with a base score equal to the total number of proposals rather than zero.
-
There is no access control on the notify function to stop calls while a reward period is already running.
Seen in 1 report
-
No accounting or withdrawal logic exists for yield accrued by stored tokens.
-
No commission checkpoint is created when a validator is added, so reward logic falls back to the current rate for periods before the first checkpoint.
-
No commission checkpoint is created when a validator is added, so the fallback lookup returns the current commission for the initial interval.
Seen in 1 report
-
No deposit or withdrawal fee prevents holders from exiting and re-entering around a known loss event.
Seen in 1 report
-
No events are defined or emitted for rejected median updates or critical settings changes.
Seen in 1 report
-
No function removes pools or lowers allocation points, so total allocation only grows.
Seen in 1 report
-
There is no limit on how often the forgot-username request can be made from the same user or address.
Seen in 1 report
-
No lower bound is enforced on the price signature timestamp, so old signatures can be reused.
Seen in 1 report
-
No maximum quantity, stock, per-user limit or final price check was enforced before payment.
Seen in 1 report
-
No mechanism detects destination-chain call failures, so burned tokens are not refunded.
-
No minimum initial deposit or cap on the points multiplier allowed the points-per-unit value to be inflated until multiplications overflowed.
-
No minimum opened price is enforced for long limit orders, allowing a zero price that unlocks all locked values.
Seen in 1 report
-
There is no minimum vote threshold for a proposal to enter the final slate.
Seen in 1 report
-
No order is defined between escape and heal, and heal requires active agents above a threshold.
-
No password strength or complexity rules were enforced when changing a password.
Seen in 1 report
-
There is no per-account or per-IP throttling, so repeated POST requests each triggered a new email.
-
No per-user or per-IP limit was enforced on resending verification or password reset codes.
-
There is no rate limit or cooldown on the rebalance function, so the slippage tolerance can be exploited many times in a single transaction.
Seen in 1 report
-
There is no rate limit or restriction on changing the birthdate, allowing unlimited updates.
-
No rate-limiting mechanism was implemented on the account creation and forgot password endpoints.
Seen in 1 report
-
There is no server-side cap on coupons per order, no per-user redemption limit and no cross-session check of prior redemptions.
Seen in 1 report
-
There is no snapshot of voter balance at vote time, so clearing subtracts weight using the current balance.
Seen in 1 report
-
No withdrawal path exists for users, leaving the guardian as the only party able to free funds.
Seen in 1 report
-
Non-deterministic ranges such as map iteration were used in synthesis, so nodes computed different results.
Seen in 1 report
-
The non-final claim cap does not guarantee the vested unpaid amount is zero or above the minimum payout.
-
The code does not check that the destination bucket is bankrupt before updating its deposit time.
-
Nullification logic sets final TVL to zero without a path to return allocated emissions to the treasury.
Seen in 1 report
-
Observer code only compares the top-level transaction recipient to the TSS address and ignores internal transactions.