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,701 to 2,750 of 5,700
  1. The credit function updates storage but not the in-memory shares, and the final save overwrites storage with the stale value.

    Seen in 1 report
  2. The credit paths called increase_balance without the accompanying record_transfer call that creates the zk-tree leaf needed to exit funds.

    Seen in 1 report
  3. The credits variable was assigned rather than accumulated inside the loop over legs.

    Seen in 1 report
  4. The cross-chain call is made without attaching a relayer fee.

    Seen in 1 report
  5. The cross-chain deposit path called the vault deposit function from the composer without verifying the original depositor's restricted role.

    Seen in 1 report
  6. The cross-chain transaction sender is set to the transaction signer rather than the address that emitted the event.

    Seen in 1 report
  7. The cross-chain TVL update stores the raw amount from the source chain without converting to the base chain token's decimals.

    Seen in 1 report
  8. The CSP was deployed in report-only mode instead of enforcement mode, so violations were not blocked.

    Seen in 1 report
  9. The cumulative accumulator added the previous average price rather than the last observed spot price, and elapsed time was recovered by dividing cumulative price by average price.

    Seen in 1 report
  10. The cumulative index field is never written back during reward accrual.

    Seen in 1 report
  11. The cumulative rate function does not write back the updated last event time.

    Seen in 1 report
  12. The curator implements a submit function for adding an adapter but omits the matching one for removal.

    Seen in 1 report
  13. The current lender manager address is used as a marker in the bid's lender field, so changing it breaks the link to the NFT owner.

    Seen in 1 report
  14. The current manager fee rate is applied to pending fees without first checkpointing or collecting those fees at the old rate.

    Seen in 1 report
  15. The current price function includes the moving average as a component when storing a new moving average.

    Seen in 1 report
  16. The current week is cast to an 8-bit integer before indexing the jackpot prize array, so it wraps after 255.

    Seen in 1 report
  17. The current-password check on the delete-account endpoint had no rate limit or lockout.

    Seen in 1 report
  18. The cursor bounds checked only the bin and position, not the bin's token composition, which could be manipulated independently.

    Seen in 1 report
  19. The curve setters did not check that each point was greater than or equal to the previous one.

    Seen in 1 report
  20. The custom CAPTCHA was enforced only for well-known public email providers, so any other domain skipped it.

    Seen in 1 report
  21. The DA layer trusted the outer sequence number supplied by the submitting node instead of checking it against the signed inner transaction.

    Seen in 1 report
  22. The DA layer trusted the transaction ID supplied by the submitting node instead of recomputing it from the signed transaction data.

    Seen in 1 report
  23. The daemon did not limit the number of ephemeral associations that could be created under one trusted key.

    Seen in 1 report
  24. The daily allowance check is applied only in the mint function and not in transfers.

    Seen in 1 report
  25. The daily limit and email verification were enforced only in the page interface, not on the backend endpoint that processes the download.

    Seen in 1 report
  26. The daily limit reset ran after the limit had been increased in withdraw or repay, overwriting the increased value.

    Seen in 1 report
  27. The daily withdrawal limit was tracked globally for the vault rather than per user.

    Seen in 1 report
  28. The dataCopy precompile returned the input slice directly instead of making a deep copy.

    Seen in 1 report
  29. The date calculation reuses the original day of month without checking it exists in the target month.

    Seen in 1 report
  30. The deallocate and transfer allocation functions lack a check that the counterparty is not in liquidation.

    Seen in 1 report
  31. The deallocate function calls the vault withdraw without a minimum-shares-out or slippage check.

    Seen in 1 report
  32. The deallocate function did not account for the lending pool's token rounding and requested more than the strategy's balance.

    Seen in 1 report
  33. The deallocate function redeems only the nominal underlying amount, leaving appreciated shares behind.

    Seen in 1 report
  34. The deallocate function returns the requested amount rather than the actual redeemed amount when dust logic redeems all shares.

    Seen in 1 report
  35. The deallocation approves and returns only the exact requested amount, ignoring yield accrued in the adapter.

    Seen in 1 report
  36. The deallocation wraps only the redeemed ETH rather than the requested amount, so the wrapped balance falls short of the required amount.

    Seen in 1 report
  37. The debond fee is already subtracted inside the weighted index conversion and is then subtracted again by the unwrap fee adjustment.

    Seen in 1 report
  38. The debt asset is transferred before the interest rate update, so the added liquidity is counted twice.

    Seen in 1 report
  39. The debt calculation omitted owed realised PnL.

    Seen in 1 report
  40. The debt increase function lacked the isAllowed check present in the collateral addition function.

    Seen in 1 report
  41. The debt reporting function accepts a user-supplied list of vaults, allowing selective reporting that omits loss-making vaults.

    Seen in 1 report
  42. The debt subtraction caps the amount freed but does not re-evaluate rawLocked, so a later sync uses stale values.

    Seen in 1 report
  43. The debt subtraction computes the amount to free with the new higher ratio and leaves a positive residual lock.

    Seen in 1 report
  44. The debug flag is checked before the internal flag, so a transaction with both takes the debug path.

    Seen in 1 report
  45. The decay calculation set the amount in flight to zero when it was less than the decay instead of keeping the original amount.

    Seen in 1 report
  46. The decimal scaling factor in the sqrt price formula was wrong in both branches.

    Seen in 1 report
  47. The decoder did not verify that the entire input was consumed, so trailing bytes were accepted.

    Seen in 1 report
  48. The decrease leverage override passes the contract's own address to the vault withdraw call instead of the position address from the parameters.

    Seen in 1 report
  49. The decrease path cancels stop orders by removing them from storage without calling the refund logic used in normal cancellations.

    Seen in 1 report
  50. The decrement loop skips zero-lifetime slots and exits early without handling the case where total lifetime across slots is less than the value to decrement.

    Seen in 1 report