Skip to content

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.

Back to the lesson 3,501 to 3,550 of 5,700
  1. 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
  2. The jackpot prize mapping was not checked for weeks beyond the initialised range, so missing entries defaulted to zero.

    Seen in 1 report
  3. The job record is deleted before the external bridge call, so a failed call leaves no way to retry.

    Seen in 1 report
  4. 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
  5. The join limit compared only active archivers against the maximum and ignored pending join requests.

    Seen in 1 report
  6. The join request uses the initial join type instead of the exact-tokens-in type.

    Seen in 1 report
  7. 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
  8. 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.

    Seen in 1 report
  9. 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.

    Seen in 1 report
  10. The Junior withdrawal covenant counts Senior principal held by an unredeemable seed floor.

    Seen in 1 report
  11. 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.

    Seen in 1 report
  12. 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
  13. 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
  14. 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.

    Seen in 1 report
  15. The lack of a minimum initial liquidity and locked tokens allows the first minter to set an extreme ratio and total supply.

    Seen in 1 report
  16. The lack of a minimum LP token output check lets an attacker manipulate the pool ratio before an imbalanced deposit.

    Seen in 1 report
  17. The landlord can withdraw from an active deposit and reject the reservation, with the refund based on the reduced deposit.

    Seen in 1 report
  18. The last calculation time is only updated when total stake is above zero, so zero-staker periods are not accounted for.

    Seen in 1 report
  19. The last debt update timestamp is written before the interest calculation, so elapsed time is always zero.

    Seen in 1 report
  20. 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
  21. The last eligible status shortcut assumes all vault balances are current, but the manual stop zeroes them without that assumption being revisited.

    Seen in 1 report
  22. 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
  23. The last mint date uses total circulating supply minus one, including mints from previous sales.

    Seen in 1 report
  24. 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
  25. The last swap timestamp is updated even when the time since the last swap is below the filter period.

    Seen in 1 report
  26. The last update time is stored as the current timestamp instead of being truncated to the interest interval.

    Seen in 1 report
  27. The last-claim timestamp was not initialised for synths a user had not deposited.

    Seen in 1 report
  28. The last-collateral check relied on a cached collateral value being zero instead of the stored NFT count.

    Seen in 1 report
  29. The last-updated timestamp is advanced even when accrued interest rounds to zero.

    Seen in 1 report
  30. The leave function transferred from the collateral source instead of the supply source when refunding the genesis balance.

    Seen in 1 report
  31. 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
  32. 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
  33. 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
  34. The lend function did not validate that the principal value corresponded to Notional.

    Seen in 1 report
  35. The lend function does not handle the case where the premium swap flag is false, leaving funds in the contract.

    Seen in 1 report
  36. The lend function does not restrict the order's exit and vault fields before calling the external initiate function.

    Seen in 1 report
  37. 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
  38. 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
  39. The length-based fee is multiplied by a dynamic multiplier that can be zero.

    Seen in 1 report
  40. The lens copies the planner's rebate-netted fee into a public field documented as the nominal fee on the close notional.

    Seen in 1 report
  41. The leverage change path used a weaker margin check than the margin removal path.

    Seen in 1 report
  42. 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
  43. The leverage recalculation ignored unrealised profit and loss when computing the new margin balance.

    Seen in 1 report
  44. The libssh backend never implements the host key fingerprint check, so the option is accepted but ignored.

    Seen in 1 report
  45. The licence check relied on a spoofable hardware identifier, stored the key unencrypted in memory and leaked the expected identifier in verbose errors.

    Seen in 1 report
  46. The licence transfer process did not revoke the old licence key.

    Seen in 1 report
  47. The lien amount is set to the total owed including interest before the payment is subtracted.

    Seen in 1 report
  48. 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
  49. The lien count for the new epoch is not incremented on buyout, so later decrements underflow.

    Seen in 1 report
  50. The lien type is not included in the signed merkle leaf, so approval does not bind the loan type to its validation logic.

    Seen in 1 report