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.
-
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.
-
The accept endpoint does not check whether the offer has already been redeemed.
Seen in 1 report
-
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
-
The account contract does not prevent an account from being transferred to itself, allowing self-ownership to bypass transfer restrictions.
-
The account removal endpoint has no server-side limit on how often a user or IP can submit the request.
Seen in 1 report
-
The account was identified from a client-supplied cookie rather than the authenticated session.
Seen in 1 report
-
The account's local storage was loaded before settlement and saved back afterwards, overwriting fee credits made during settlement.
-
The accounted balance does not include reserve injections.
Seen in 1 report
-
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
-
The accrual function updated totals only by the interest of the account being updated.
Seen in 1 report
-
The accrual step omitted scaling by elapsed time relative to the funding interval.
Seen in 1 report
-
The accumulated price is multiplied by 1e18 when computing the average even though it is already in 18 decimals.
Seen in 1 report
-
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
-
$350 Medium
-
-
The activation helper is called with the added stake amount as the additional revenue parameter when it should receive zero.
-
The activation token was not bound to a single pending registration or consumed on first use.
-
The active modifier only checks the active flag and ignores the end timestamp.
-
The active stake counter is increased only by the deposit on mint but decreased by deposit plus rewards on burn.
-
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
-
The adapter approves only the originally calculated amount instead of the actual received amount.
Seen in 1 report
-
The adapter called the depositor with the old one-argument signature after the depositor was upgraded to require two arguments.
-
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
-
The adapter calls the underlying vault's withdraw without a max loss argument, so the default tolerance applies.
-
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
-
The adapter converts WETH to native currency but leaves the credit token as WETH, so the type check fails.
Seen in 1 report
-
The adapter hard-coded the slippage parameter to zero when calling the deposit function.
-
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
-
The adapter returns the amount deallocated rather than the remaining allocation, so interest gains become unclaimable.
-
The adapter returns the requested amount instead of the actual redeemed amount.
Seen in 1 report
-
The adapter tracks allocations in underlying terms and ignores growth from rebasing.
Seen in 1 report
-
The adapter uses the vault's live token balance instead of its internal tracked idle value.
Seen in 1 report
-
The adaptor relies on the external queue holding enough ETH, which the admin can remove.
Seen in 1 report
-
The add function changed total points without updating existing pools first.
Seen in 1 report
-
The add function does not reject an LP token already used by another pool.
Seen in 1 report
-
The add function lacks a uniqueness check on the contract address before storing it.
Seen in 1 report
-
The add function pushes the trader ID unconditionally, and the toggle does not handle duplicates.
-
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
-
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
-
The add-gauge function does not initialise the time weight, so the catch-up loop never reaches the current time.
-
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
-
The add-pool function does not check for duplicate LP token addresses.
Seen in 1 report
-
The add-principal and burn-shares functions lack slippage protection.
-
The add-reward-token function created checkpoints for all validators, including inactive ones, without adjusting for inactive status.
Seen in 1 report
-
The add-rewards function did not validate that the quote asset was a legitimate token.
-
The add-to-position path lacks the profit cap check that the close path performs.
Seen in 1 report
-
The AddAuthorization and RemoveAuthorization message types were missing from both RegisterInterfaces and RegisterCodec in codec.go.
Seen in 1 report
-
The addCollateral function requires the total collateral value to meet the borrow margin, which is unnecessary.
Seen in 1 report
-
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
-
The addHolding function did not set the holdsToken map, so duplicate tokens were pushed to the array.
Seen in 1 report
-
The addLiquidity function accepted a deposit without a minimum-liquidity parameter.
Seen in 1 report
-
The addLiquidity function is callable by anyone and the UniswapHandler is whitelisted.
Seen in 1 report