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 2,001 to 2,050 of 5,700
  1. The bootstrap branch fires whenever both principals are zero even when a nonzero senior high-water mark survives, crediting the full recap to senior.

    Seen in 1 report
  2. The borrow function allows the caller to specify the interest to pay without proper validation.

    Seen in 1 report
  3. The borrow function checked that a collateral deposit existed but not that it belonged to the same position being borrowed against.

    Seen in 1 report
  4. The borrow function did not validate that the position account in the repay instruction matched the position being closed.

    Seen in 1 report
  5. The borrow function does not reject a zero-asset borrow, so the allowance check passes and the borrower is entered into the market.

    Seen in 1 report
  6. The borrow function omits the health-factor check that the repay function performs after interacting with the lending protocol.

    Seen in 1 report
  7. The borrow function trusts a user-supplied increase value and adds it to the pool's state without ensuring it is consistent with the collateral transferred in.

    Seen in 1 report
  8. The borrow index is not updated before reading the previous debt balance.

    Seen in 1 report
  9. The borrow loop does not supply the final swapped asset as collateral after the loop ends.

    Seen in 1 report
  10. The borrow path never enforces the same-asset prohibition that the liquidation paths assume.

    Seen in 1 report
  11. The borrow-limit check inspects only the balance of the single token being borrowed against, not overall liquidity across markets.

    Seen in 1 report
  12. The borrowing calculation adds the maximum borrowable amount from existing collateral to the new position's borrow amount, double-counting previous collateral.

    Seen in 1 report
  13. The borrowing fee calculation looked only at open notional and did not account for whether the taker was reducing their position, so utilisation could be inflated artificially.

    Seen in 1 report
  14. The borrowing formula does not scale linearly with leverage, so position sizes are not monotonic across leverage values.

    Seen in 1 report
  15. The borrowing modifier checked only the first credit position's principal, but repayment could reorder the queue.

    Seen in 1 report
  16. The bounty struct was loaded into memory rather than storage, so setting active to false never persisted.

    Seen in 1 report
  17. The bounty-eligibility flag on each scope was not reset when the programme type changed.

    Seen in 1 report
  18. The branch condition compared the pool long and short token amounts with the wrong inequality, so the unsigned subtraction underflowed and reverted.

    Seen in 1 report
  19. The branch handling a cancelled close request skips the minimum-value check that other branches enforce.

    Seen in 1 report
  20. The bribe claim function checks only the checkpoint balance and not whether the token voted in the epoch being claimed.

    Seen in 1 report
  21. The bribe claim function lacks a check that the lock end time is in the future.

    Seen in 1 report
  22. The bribe delivery call sits inside a conditional that checks the base token reward amount, so it is skipped when that amount is too small.

    Seen in 1 report
  23. The bribe reward balance is not reset to zero after claiming.

    Seen in 1 report
  24. The bribe withdraw function failed to reduce a user's balance when the withdrawal amount exceeded their current balance.

    Seen in 1 report
  25. The bridge approved only the transfer amount while the fee adapter attempted to pull the amount plus the fee.

    Seen in 1 report
  26. The bridge cached the inflation multiplier in storage and only refreshed it via a separate rebase call.

    Seen in 1 report
  27. The bridge did not verify that the execute calldata's destination domain matched the current chain.

    Seen in 1 report
  28. The bridge paid the execution fee before registering the user's principal assets, so a fee shortfall aborted execution before the principal was recorded and the recovery mechanism did not cover it.

    Seen in 1 report
  29. The bridge trusted that a non-zero message value meant funds were sent, but delegatecall preserves the caller's value without transferring funds.

    Seen in 1 report
  30. The bridge uses the source-chain sender address as the destination recipient without letting the user specify a different address.

    Seen in 1 report
  31. The bridge validated only that the requested destination appeared somewhere in the array instead of requiring exactly one match.

    Seen in 1 report
  32. The browser trusted renderer MIME type validation that accepts any top-level type beginning with x- and copied strings verbatim into the desktop file.

    Seen in 1 report
  33. The bubble re-reads the active permission request on click instead of remembering the request it was created for.

    Seen in 1 report
  34. The buffer is updated using the old cap before the new cap is stored, so the new cap is not enforced.

    Seen in 1 report
  35. The buffer sums two flow rates as one flow, ignoring that the minimum deposit applies per flow.

    Seen in 1 report
  36. The buffered entry solvency check subtracts recorded trader claims from pool cash but does not reserve the positive marked profit that open winners can realise immediately.

    Seen in 1 report
  37. The burn clears approvals by calling approve with the caller as sender, which fails for a caller approved only for that token identifier.

    Seen in 1 report
  38. The burn condition only checks whether the short amount is zero and ignores whether collateral is also zero.

    Seen in 1 report
  39. The burn function allows burning for the zero address multiple times and the initial contribution is assigned to the zero address.

    Seen in 1 report
  40. The burn function calls the same transfer logic that applies the burn fee, so the fee is applied recursively to itself.

    Seen in 1 report
  41. The burn function deducts from the initial owner's airdrop without checking whether the caller is the initial or current owner.

    Seen in 1 report
  42. The burn function deletes token and rental data without checking for active rentals.

    Seen in 1 report
  43. The burn function let anyone burn freely minted tokens and receive Ether in return without proper checks.

    Seen in 1 report
  44. The burn function omits the call to the ERC721 _burn function.

    Seen in 1 report
  45. The burn function passes the market address as the receiver of principal tokens instead of the connector's own address.

    Seen in 1 report
  46. The burn function unconditionally clears the token URI for a token id shared by multiple holders.

    Seen in 1 report
  47. The burn function updated the caller's power but left total voting power unchanged.

    Seen in 1 report
  48. The burn loop used a logical AND with a blacklist flag instead of an OR, so skipped assets were only excluded when blacklisted assets were also present.

    Seen in 1 report
  49. The burn path does not decrement the total supply counter, so recorded supply drifts from circulating tokens.

    Seen in 1 report
  50. The burn subtracts the redemption amount from a counter that excludes rewards, so it can underflow.

    Seen in 1 report