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 1,651 to 1,700 of 5,700
  1. The _lock function does not differentiate between a normal lock and a migration lock, so it resets the remainder to zero when called from MigrationManager.

    Seen in 1 report
  2. The accept endpoint does not check whether the offer has already been redeemed.

    Seen in 1 report
  3. The access check relied on a token balance anyone can acquire and dispose of freely, so it did not prove a lasting stake.

    Seen in 1 report
  4. The account contract does not prevent an account from being transferred to itself, allowing self-ownership to bypass transfer restrictions.

    Seen in 1 report
  5. The account removal endpoint has no server-side limit on how often a user or IP can submit the request.

    Seen in 1 report
  6. The account was identified from a client-supplied cookie rather than the authenticated session.

    Seen in 1 report
  7. The account's local storage was loaded before settlement and saved back afterwards, overwriting fee credits made during settlement.

    Seen in 1 report
  8. The accounted balance does not include reserve injections.

    Seen in 1 report
  9. The accounting token list was maintained separately from the hard-coded transfer list, and user state was reset before transfers were confirmed.

    Seen in 1 report
  10. The accrual function updated totals only by the interest of the account being updated.

    Seen in 1 report
  11. The accrual step omitted scaling by elapsed time relative to the funding interval.

    Seen in 1 report
  12. The accumulated price is multiplied by 1e18 when computing the average even though it is already in 18 decimals.

    Seen in 1 report
  13. The activation endpoint relies on the client-side payment form loading instead of checking server-side for a valid payment method.

    Seen in 1 report
  14. The activation helper is called with the added stake amount as the additional revenue parameter when it should receive zero.

    Seen in 1 report
  15. The activation token was not bound to a single pending registration or consumed on first use.

    Seen in 1 report
  16. The active modifier only checks the active flag and ignores the end timestamp.

    Seen in 1 report
  17. The active stake counter is increased only by the deposit on mint but decreased by deposit plus rewards on burn.

    Seen in 1 report
  18. The ad-purchasing feature did not check the user's relationship with the company and granted ownership as a side effect of purchase.

    Seen in 1 report
  19. The adapter approves only the originally calculated amount instead of the actual received amount.

    Seen in 1 report
  20. The adapter called the depositor with the old one-argument signature after the depositor was upgraded to require two arguments.

    Seen in 1 report
  21. The adapter called the registry's pool-finding function without specifying an index, so it always received the first pool in the list.

    Seen in 1 report
  22. The adapter calls the underlying vault's withdraw without a max loss argument, so the default tolerance applies.

    Seen in 1 report
  23. The adapter charges the maker price while the exchange transfers the taker price, and the two are not validated to match.

    Seen in 1 report
  24. The adapter converts WETH to native currency but leaves the credit token as WETH, so the type check fails.

    Seen in 1 report
  25. The adapter hard-coded the slippage parameter to zero when calling the deposit function.

    Seen in 1 report
  26. The adapter only encoded token-to-token router selectors and left spender and target unset, so native ETH was never wrapped.

    Seen in 1 report
  27. The adapter returns the amount deallocated rather than the remaining allocation, so interest gains become unclaimable.

    Seen in 1 report
  28. The adapter returns the requested amount instead of the actual redeemed amount.

    Seen in 1 report
  29. The adapter tracks allocations in underlying terms and ignores growth from rebasing.

    Seen in 1 report
  30. The adapter uses the vault's live token balance instead of its internal tracked idle value.

    Seen in 1 report
  31. The adaptor relies on the external queue holding enough ETH, which the admin can remove.

    Seen in 1 report
  32. The add function changed total points without updating existing pools first.

    Seen in 1 report
  33. The add function does not reject an LP token already used by another pool.

    Seen in 1 report
  34. The add function lacks a uniqueness check on the contract address before storing it.

    Seen in 1 report
  35. The add function pushes the trader ID unconditionally, and the toggle does not handle duplicates.

    Seen in 1 report
  36. The add function wrote the new NFT ID into storage without checking whether a value already existed for that key or primary slot.

    Seen in 1 report
  37. The add payout method code path was implemented separately from the normal payment method change flow and does not call the same notification and re-authentication logic.

    Seen in 1 report
  38. The add-gauge function does not initialise the time weight, so the catch-up loop never reaches the current time.

    Seen in 1 report
  39. The add-level function never set a boost price for new levels, so they fell back to the storage default of zero.

    Seen in 1 report
  40. The add-pool function does not check for duplicate LP token addresses.

    Seen in 1 report
  41. The add-principal and burn-shares functions lack slippage protection.

    Seen in 1 report
  42. The add-reward-token function created checkpoints for all validators, including inactive ones, without adjusting for inactive status.

    Seen in 1 report
  43. The add-rewards function did not validate that the quote asset was a legitimate token.

    Seen in 1 report
  44. The add-to-position path lacks the profit cap check that the close path performs.

    Seen in 1 report
  45. The AddAuthorization and RemoveAuthorization message types were missing from both RegisterInterfaces and RegisterCodec in codec.go.

    Seen in 1 report
  46. The addCollateral function requires the total collateral value to meet the borrow margin, which is unnecessary.

    Seen in 1 report
  47. The addCollateralBeforeSettle and repay functions lacked checks for settlement expiry and settled status, allowing collateral to be increased without transferring tokens and then repaid to withdraw excess.

    Seen in 1 report
  48. The addHolding function did not set the holdsToken map, so duplicate tokens were pushed to the array.

    Seen in 1 report
  49. The addLiquidity function accepted a deposit without a minimum-liquidity parameter.

    Seen in 1 report
  50. The addLiquidity function is callable by anyone and the UniswapHandler is whitelisted.

    Seen in 1 report