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,651 to 3,700 of 5,700
  1. The loss check compares current debt value to the last recorded debt basis, which is updated during rebalancing.

    Seen in 1 report
  2. The loss check uses the reduced payout value instead of the original requested value, so the slippage limit passes.

    Seen in 1 report
  3. The loss fee is written to common storage but no function exists to withdraw or reimburse it to the keeper.

    Seen in 1 report
  4. The loss is already reflected in the asset difference but is subtracted again from the return on investment.

    Seen in 1 report
  5. The lot ID was still zero when the storage pointer was taken, so every auction wrote to slot zero before the real counter was assigned.

    Seen in 1 report
  6. The low-level call did not check that the target address contained code, so a call to a non-existent contract returned success.

    Seen in 1 report
  7. The lower bound only checks a fixed minimum and ignores the extra gas needed for transaction data size.

    Seen in 1 report
  8. The lower-minted function has the same permission level as mint, so a whitelisted minter can reduce their own counter.

    Seen in 1 report
  9. The LP net asset value calculation uses pool cash and terminal delta without adding the negative price impact rebate reserve, which is pool cash certain to return.

    Seen in 1 report
  10. The LP token minting calculation uses the contract's actual token balance instead of the internal reserve balance.

    Seen in 1 report
  11. The mail client's MIME parser did not strictly follow the MIME standard and determined the end of an attachment at the wrong point.

    Seen in 1 report
  12. The mail pipeline trusted a referenced Message-ID as proof the message belonged to an existing thread.

    Seen in 1 report
  13. The maintenance guard compares the finality event height against the recent best block height with a threshold smaller than the normal finality lag, so every finality event is skipped.

    Seen in 1 report
  14. The maker funding share uses absolute skew times the minor side funding instead of a proportional ratio.

    Seen in 1 report
  15. The maker's fee exposure adjustment was weighted by open position size rather than individual exposure.

    Seen in 1 report
  16. The managed code enabled flag and taskpane resource references were not validated properly, so security prompts could be bypassed.

    Seen in 1 report
  17. The manager read the current global ticket price instead of the price snapshotted for the active drawing.

    Seen in 1 report
  18. The mandatory CSP was only added by the scheme-specific URL loader, so service-worker-synthesised responses skipped it.

    Seen in 1 report
  19. The manifest parser used the original merchant-supplied URL as the base for relative entries instead of the URL the manifest was fetched from after redirects.

    Seen in 1 report
  20. The mapping layer billed gas by encoded byte size rather than storage transition type, so zero-size values and empty reads cost nothing.

    Seen in 1 report
  21. The mapping of reserved pool token suffixes is never cleared when an agent vault is destroyed.

    Seen in 1 report
  22. The margin calculation always returns a positive value regardless of whether the position size is increasing or decreasing.

    Seen in 1 report
  23. The margin-to-debt ratio is calculated as margin divided by debt alone instead of margin divided by debt plus margin.

    Seen in 1 report
  24. The mark update scales the whole mark by the funded fraction of principal without checking that other senior holders still own shares.

    Seen in 1 report
  25. The Markdown renderer converts and displays link text and destinations without applying punycode/IDN normalisation or a warning.

    Seen in 1 report
  26. The market creation function did not check that the opening time precedes the locking time.

    Seen in 1 report
  27. The market creation function does not verify that the initial depositor is the caller.

    Seen in 1 report
  28. The market overrides cancel but not offer, so offers created via the inherited function are never inserted into the sorted or unsorted data structures cancel relies on.

    Seen in 1 report
  29. The market-empty check does not include the connector's balance in the staking pool when deciding whether a position is empty.

    Seen in 1 report
  30. The marketplace trusted the custom contract to mint the exact requested count.

    Seen in 1 report
  31. The masking condition for irrelevant characters in the final loop iteration is wrong and the mask can overflow.

    Seen in 1 report
  32. The master contract used the caller's address as the user, so wrapper-held balances lost individual ownership.

    Seen in 1 report
  33. The matching function has no minimum lend amount and rounds down, allowing manipulation of the weighted average rate.

    Seen in 1 report
  34. The matching function uses the pay amount without adding the fee when calling buy, so the amount passed is less than needed.

    Seen in 1 report
  35. The matching logic reduced maker amounts without checking the remainder against the minimum limit.

    Seen in 1 report
  36. The matching policy returns a hardcoded amount of 1 instead of the order's amount.

    Seen in 1 report
  37. The maturity check is conditioned on the sender being the founder.

    Seen in 1 report
  38. The max functions did not account for the daily lend increase limit or available vault balance, returning values that exceed what the operations allow.

    Seen in 1 report
  39. The max scale can be raised by direct donations and never updates downwards.

    Seen in 1 report
  40. The max withdraw calculation did not account for the loan-to-value ratio of the withdrawn collateral's reserve.

    Seen in 1 report
  41. The max withdraw function delegates to the adapter without including the vault's withdrawal fee.

    Seen in 1 report
  42. The max-buy option reads the current epoch maximum at execution time rather than binding to the epoch seen at submission.

    Seen in 1 report
  43. The max-redeem view was implemented as a balance lookup instead of triggering the external redeem call.

    Seen in 1 report
  44. The max_deposit and max_withdraw functions omitted checks for certain global restrictions, such as the owner's share balance or a paused-withdrawals flag, leading to inaccurate return values.

    Seen in 1 report
  45. The maxDeposit function does not account for the yield buffer balance, so it can return an amount that leads to a lossy deposit and revert when the buffer is depleted.

    Seen in 1 report
  46. The maximum allocation function returns the default maximum when the user's tier allocation is zero instead of returning zero.

    Seen in 1 report
  47. The maximum and minimum trackers were initialised to zero instead of extreme values.

    Seen in 1 report
  48. The maximum borrow amount is calculated without a safety margin for interest accrual, leaving the position at the liquidation threshold.

    Seen in 1 report
  49. The maximum borrow rate constant was not adjusted for the average block time of the deployment chain.

    Seen in 1 report
  50. The maximum contribution check was per claim call and per address, not per resulting card.

    Seen in 1 report