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 deposit check used the total share supply directly instead of converting it to assets.
Seen in 1 report
-
The deposit check uses only the amount while the payout check uses amount plus reward against the same maximum.
Seen in 1 report
-
The deposit contract does not overwrite existing withdrawal credentials for a validator, so whoever deposits first sets them.
Seen in 1 report
-
The deposit contract processes deposits in order and allows multiple deposits for the same validator key, so a front-run deposit can set the withdrawal credentials.
Seen in 1 report
-
The deposit credited the requested amount rather than measuring the actual balance change.
Seen in 1 report
-
The deposit date used for the lockup was a weighted average of past deposits, so transfers could shorten it.
Seen in 1 report
-
The deposit fee applied only to direct deposits, not to queued deposits that were then minted.
Seen in 1 report
-
The deposit flow moves the full amount into the contract and approves the aggregator but never refunds leftovers.
Seen in 1 report
-
The deposit flow sets a future share unlock time before the bridge transfer is attempted.
-
The deposit function checks shares against the minimum while the mint function checks assets, so the two checks are not equivalent when the share price differs from one.
-
The deposit function checks the asset amount against max deposit but not the shares against max mint.
Seen in 1 report
-
The deposit function did not transfer tokens to the master contract, so its balance check always returned zero.
Seen in 1 report
-
The deposit function does not check that the caller is the trove owner.
-
The deposit function does not let the caller specify a minimum output amount.
Seen in 1 report
-
The deposit function does not reject the native token address, and a transferFrom to that externally owned account succeeds without transferring funds.
Seen in 1 report
-
The deposit function does not reject zero liquidity while the withdrawal function uses zero liquidity as a marker for a non-existent position.
Seen in 1 report
-
The deposit function does not require the destination chain to differ from the source or the receiver to differ from the caller.
Seen in 1 report
-
The deposit function enforced a minimum amount but did not handle a remaining gap smaller than that minimum.
Seen in 1 report
-
The deposit function had no user-specified minimum LP token amount.
Seen in 1 report
-
The deposit function has no minimum-output parameter, exposing users to slippage.
Seen in 1 report
-
Medium
-
-
The deposit function incorrectly requires the swap input token to equal the target collateral token, though they should differ for a swap.
-
The deposit function lacks a check that the token is in a supported token list.
Seen in 1 report
-
The deposit function lacks a minimum gas limit check.
Seen in 1 report
-
The deposit function overwrote bond information without preserving the remaining vesting period.
Seen in 1 report
-
The deposit function relies only on a one percent slippage tolerance and does not enforce that returned shares exceed deposited assets.
Seen in 1 report
-
The deposit function scaled the amount for the token transfer but used the unscaled amount to update the internal balance, causing a mismatch when the scaled amount rounded to zero.
Seen in 1 report
-
The deposit function trusted a caller-supplied amount instead of reading the contract's current token balance at execution time.
Seen in 1 report
-
The deposit gate is evaluated on amount plus dust while the credit uses the debited value, and the credit result is discarded.
Seen in 1 report
-
The deposit handler ignores the result returned by the message handler, so events collected in the temporary event manager are never copied back.
Seen in 1 report
-
The deposit instruction lacked a constraint verifying that the deposited token's mint address equalled the allowed token's mint address.
Seen in 1 report
-
High
-
-
The deposit instruction minted shares using a stale vault balance because it did not update the balance before calculating shares.
-
The deposit limit check only updates the user's total deposited amount when a limit is active, so failed deposits made before the limit was set are not recorded.
Seen in 1 report
-
The deposit limit check subtracted the cash reserve a second time even though total deposits already excluded it.
-
The deposit limit check uses the share balance of the caller instead of the receiver.
Seen in 1 report
-
The deposit limit is keyed on the sender rather than on the actual depositor address passed through the bridge call.
-
The deposit logic always stakes on the external pool for that collateral type, with no fallback if the pool is shut down.
-
The deposit logic does not initialise the position's claimed amount to reflect the existing per-share claimable amount, so new shares are treated as having been present for past rewards.
Seen in 1 report
-
The deposit path calls the transfer restriction check with a zero sender, which the registry treats as untrusted.
Seen in 1 report
-
The deposit path uses convertToShares which returns assets when supply is zero, while the mint path returns a fixed share amount, so protection covers only mint.
Seen in 1 report
-
The deposit request function does not check that the named controller consented, and the standard claim functions only inspect the first request in the controller queue.
Seen in 1 report
-
The deposit returns excess ETH as native ETH but the wrapper only measures its wrapped token balance to detect the residual.
Seen in 1 report
-
The deposit updates total assets before computing shares, so the post-deposit ratio is used.
-
The deposit wraps ETH but then pulls the deposit amount from the user's token balance instead of using the wrapped ETH, leaving wrapped tokens in the contract.
Seen in 1 report
-
The deposit-for function unconditionally adds the value to the supply variable even when called for a merge where no new tokens are transferred.
Seen in 1 report
-
The depositCollateral function lacks a check that the pool status is active.
Seen in 1 report
-
The depositFor function let anyone modify any user's deposit record, including lockup end time and delegate, without access control.
Seen in 1 report
-
The depositReward function lacks access control, so anyone can call it with zero reward and extend the period.
Seen in 1 report
-
The deprecate function does not verify that at least one vault collateral token remains valid.
-
The derivative's mint rejected any mint after expiry, but the payout logic still tried to mint after expiry.
Seen in 1 report
-
The description-to-subject fallback copied unsanitised user input into the subject field, bypassing the sanitisation applied to the original subject.
Seen in 1 report