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 jackpot check uses strict less-than while other tiers use less-than-or-equal, so the boundary value falls through.
Seen in 1 report
-
The jackpot prize mapping was not checked for weeks beyond the initialised range, so missing entries defaulted to zero.
Seen in 1 report
-
The job record is deleted before the external bridge call, so a failed call leaves no way to retry.
Seen in 1 report
-
The join condition uses the minimum of two computed amounts, and one is always zero when only one token is borrowed.
Seen in 1 report
-
The join limit compared only active archivers against the maximum and ignored pending join requests.
Seen in 1 report
-
The join request uses the initial join type instead of the exact-tokens-in type.
Seen in 1 report
-
The joinTokenSingle function only refunds the leftover input token and does not refund leftover underlying basket tokens, and it allows arbitrary outputBasket and swap.exchange contracts.
Seen in 1 report
-
The junior branch of the assignment path lacks the deposit-capacity guard the senior branch has, so a wiped tranche is re-seeded at a near-zero price.
-
The junior branch of the unassigned-asset assignment increments junior principal without checking that senior has reached its high-water mark, unlike the ordinary deposit gate.
-
The Junior withdrawal covenant counts Senior principal held by an unredeemable seed floor.
-
The Junior withdrawal covenant counts the non-redeemable seed's fee-inflated Senior exposure as protected Senior exposure, so the required Junior buffer can never be released.
-
The justifier stored only the first vote per signer and never upgraded a zero-weight vote once stake weighting became active.
Seen in 1 report
-
The L1 batch execution clears the pending L2 upgrade hash and advances the protocol version without checking whether the L2 upgrade transaction succeeded.
Seen in 1 report
-
The L2 contract compares an L1 block timestamp against the L2 block timestamp as if they shared a common clock, but the two chains' timestamps are independent.
-
The lack of a minimum initial liquidity and locked tokens allows the first minter to set an extreme ratio and total supply.
-
The lack of a minimum LP token output check lets an attacker manipulate the pool ratio before an imbalanced deposit.
Seen in 1 report
-
The landlord can withdraw from an active deposit and reject the reservation, with the refund based on the reduced deposit.
Seen in 1 report
-
The last calculation time is only updated when total stake is above zero, so zero-staker periods are not accounted for.
-
The last debt update timestamp is written before the interest calculation, so elapsed time is always zero.
Seen in 1 report
-
The last distribution timestamp is set at deployment and not reset before the first distribution, so idle time is counted as decay.
Seen in 1 report
-
The last eligible status shortcut assumes all vault balances are current, but the manual stop zeroes them without that assumption being revisited.
-
The last funding time is only updated if the last market in the array returns a non-zero next funding time.
Seen in 1 report
-
The last mint date uses total circulating supply minus one, including mints from previous sales.
Seen in 1 report
-
The last payment cycle is detected by checking whether time left is less than one cycle, which fails for irregular durations.
Seen in 1 report
-
The last swap timestamp is updated even when the time since the last swap is below the filter period.
Seen in 1 report
-
The last update time is stored as the current timestamp instead of being truncated to the interest interval.
Seen in 1 report
-
The last-claim timestamp was not initialised for synths a user had not deposited.
Seen in 1 report
-
The last-collateral check relied on a cached collateral value being zero instead of the stored NFT count.
Seen in 1 report
-
The last-updated timestamp is advanced even when accrued interest rounds to zero.
Seen in 1 report
-
The leave function transferred from the collateral source instead of the supply source when refunding the genesis balance.
-
The leave-program feature granted a fast-tracked invitation when a user left a private program, and the security@ email forwarding feature automatically sent an invitation to any sender.
Seen in 1 report
-
The leftover collateral variable is calculated with the optimistic clean fee and not recalculated after the liquidator's collateral is recomputed with the dirty fee.
Seen in 1 report
-
The legacy withdrawal status check is only performed when the L2 batch number is less than the first post-upgrade batch, so withdrawals at or after that number bypass the check.
Seen in 1 report
-
The lend function did not validate that the principal value corresponded to Notional.
Seen in 1 report
-
The lend function does not handle the case where the premium swap flag is false, leaving funds in the contract.
Seen in 1 report
-
The lend function does not restrict the order's exit and vault fields before calling the external initiate function.
-
The lend path mints additional yield tokens to the user after an internal swap has already delivered yield tokens to the contract, so total supply is inflated.
Seen in 1 report
-
The length check counted UTF-16 code units instead of Unicode code points, so characters represented as surrogate pairs were rejected as if they were special keys.
Seen in 1 report
-
The length-based fee is multiplied by a dynamic multiplier that can be zero.
Seen in 1 report
-
The lens copies the planner's rebate-netted fee into a public field documented as the nominal fee on the close notional.
-
The leverage change path used a weaker margin check than the margin removal path.
Seen in 1 report
-
The leverage ratio uses total protections as the denominator without excluding protections whose capital is already locked, so locked capital reduces the numerator while the related protection still inflates the denominator.
Seen in 1 report
-
The leverage recalculation ignored unrealised profit and loss when computing the new margin balance.
-
The libssh backend never implements the host key fingerprint check, so the option is accepted but ignored.
Seen in 1 report
-
The licence check relied on a spoofable hardware identifier, stored the key unencrypted in memory and leaked the expected identifier in verbose errors.
-
The licence transfer process did not revoke the old licence key.
Seen in 1 report
-
The lien amount is set to the total owed including interest before the payment is subtracted.
Seen in 1 report
-
The lien amount is updated to include accrued interest before the slope is recalculated, but the last timestamp is not updated at the same time.
Seen in 1 report
-
The lien count for the new epoch is not incremented on buyout, so later decrements underflow.
Seen in 1 report
-
The lien type is not included in the signed merkle leaf, so approval does not bind the loan type to its validation logic.