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 force deploy function did not revert the whole transaction on failure and did not return unused ETH.
Seen in 1 report
-
The force exercise entry point settled the computed fee without accepting a caller-supplied maximum.
Seen in 1 report
-
The forced-repayment path transferred fees and repaid tokens out without decrementing the deposited-shares figure, overstating total underlying value.
Seen in 1 report
-
The foreclosure time added a duration measured from the current time to the last rent timestamp, double counting rent.
Seen in 1 report
-
The forging count is incremented after the limit check, allowing one extra forging.
Seen in 1 report
-
The forging function does not track which parent pairs have already been used.
Seen in 1 report
-
The form accepted unlimited submissions without a captcha or any rate limit, and the name field was not validated.
Seen in 1 report
-
The form normalised every social record before diffing against the raw on-chain snapshot, so non-canonical values looked modified.
-
The form trusts client-supplied channel identifiers, does not check ownership, and duplicates the same field in two parts of the request used for different checks.
-
The formula for shares received uses an incorrect expression for the ratio of shares to total shares.
-
The four-day comparison failed to account for the 8-hour offset, so early Monday timestamps did not add a week.
Seen in 1 report
-
The fractionalisation proposal does not distribute newly created vault tokens to members, leaving a window for a follow-up proposal.
-
The framework allowed the primary key to be mass-assigned through update calls.
-
The framework's failed-login counting or lockout check could be avoided, so the attempt limit was never enforced.
Seen in 1 report
-
The freshly rotated aggregate key is passed into signing for a UTXO locked to the previous key.
-
The freshness condition used less-than instead of greater-than-or-equal, so it always evaluated true for recent prices.
-
The freshness helper calls an oracle getter that reverts when the accepted basket is older than the engine mark, so the book's own valid-state check is unreachable.
-
The frontend trusts only the status code and JSON body with no server-issued proof that the password check succeeded.
-
The frozen coin age penalty depends on the time since the staker's last reward withdrawal, which the staker can reset.
-
The frozen exit fee is retained in the senior tranche and accrues to non-redeemable seed shares while the junior covenant still counts that seed exposure as protected senior capital.
-
The frozen status was checked in one function but omitted in the withdrawal and recovery functions.
Seen in 1 report
-
The frozen-mode staleness limit is not checked against the length of the frozen run a calendar override creates.
-
The fulfilment fee is only collected when the user claims, so users can avoid paying by never claiming.
Seen in 1 report
-
The full amount is withdrawn to native token before the rounded deposit amount is calculated, so dust stays in the contract.
Seen in 1 report
-
The full amount paid including fees is added to market funds after the fees have already been transferred out.
Seen in 1 report
-
The full asset balance was passed as liquidity instead of the balance minus reserves.
-
The full bad debt is deducted from the accumulator but only the principal reduces the backup borrowed value, leaving unassigned earnings untracked.
Seen in 1 report
-
The full exit condition only checked primary debt and vault shares, not secondary debt.
Seen in 1 report
-
The full recapitalisation amount is queued as pending intent and not reduced when part of that cash pays trader claims, so later revenue is absorbed by the leftover intent.
-
The full transmuted synthetic amount is burned even when distributable yield is less than owed, and the shortfall is not returned as synthetic tokens.
-
The full-close exemption is decided from a projected position that subtracts earlier pending closes, and the minimum is never rechecked at execution when those closes fail.
-
The full-closure check did not verify the position amount was zero after a partially filled order.
Seen in 1 report
-
The full-repayment path set the amount to the whole debt without verifying the received amount after transfer fees cleared it.
Seen in 1 report
-
The fully vested check did not subtract the initial unlock offset from the start time, so the partial vesting formula could exceed the total.
Seen in 1 report
-
The function burns all collateral and refunds the underlying tokens instead of keeping them in the position.
-
The function burns the original amount rather than the scaled amount and has no slippage check.
Seen in 1 report
-
The function calculates a reduced total burned amount after refunds but does not write it back to storage, so subsequent calls use the original higher value.
Seen in 1 report
-
The function checked only token amount limits and gave the user no way to restrict the bin cursor, so a reset bin changed the composition behind the same share count.
-
The function did not allow a minimum output amount and transferred the full input before placing an order that may partially fill.
Seen in 1 report
-
The function did not check that the value sent covered the total swap inputs and used the contract's whole token balance as available funds.
Seen in 1 report
-
The function did not check whether redemption was restricted for the adapter before redeeming mature PTs.
Seen in 1 report
-
The function did not compare the trade timestamp with the current block timestamp, allowing any positive value to pass validation.
Seen in 1 report
-
The function did not validate that from and to addresses were distinct, so writing both balances to the same storage slot created money.
Seen in 1 report
-
The function does not transfer the difference between the maximum input and the actual swapped amount back to the caller.
Seen in 1 report
-
The function getTotalBorrowingFees called getCumulativeBorrowingFactor instead of getNextCumulativeBorrowingFactor, so it used a stale factor.
Seen in 1 report
-
The function ignored the error from the clear method and always returned nil.
Seen in 1 report
-
The function initialised next open interest values to zero and only updated the side of the action, failing to carry over the unchanged side's current open interest.
Seen in 1 report
-
The function iterates over the bribe array without requiring the two arrays to be the same length.
Seen in 1 report
-
The function modifies a memory copy of the struct instead of storage.
Seen in 1 report
-
The function never checks that the supplied pod address is a legitimate registered pod, so a malicious contract can return duplicated token entries.
Seen in 1 report