Two functions in the xProvider contract compared the destination chain ID from their parameters against the controller or game chain ID, rather than comparing the provider's own home chain. This caused calls to fail in certain chain configurations, preventing some vaults from progressing to the next stage.
The protocol calculates rewards per locked token at the time new allocations are received, before the funds are deposited into providers. This means rewards are based on allocations that have not yet earned anything, leading to incorrect reward distribution.
The vault's total underlying amount is pushed to the controller without first claiming earned reward tokens, so the reported balance and exchange rate omit those funds. This makes the amount sent to the controller inaccurate and the exchange rate too low.
The Vault.blacklistProtocol function attempts to withdraw all underlying balance from a protocol, which can revert if the protocol is hacked or paused, preventing the protocol from being blacklisted. This could leave the system unable to remove a compromised protocol, potentially causing operational issues.
The Derby protocol uses signed integers for allocation deltas but casts them to unsigned integers without checking for negative values, which can corrupt accounting or block rebalancing. An attacker could push negative allocations to cause this state.
A withdrawal request could be overridden during the initial period when the rebalancing period is zero, because the check for an existing request passes. An attacker could call the withdrawal request function multiple times, burning their shares and losing the previous withdrawal allowance.
Users cannot request withdrawal of their funds from inactive vaults because the withdrawalRequest function is blocked by a modifier that only allows calls when the vault is active. An attacker could not directly exploit this, but users' funds could be locked in an inactive vault for a prolonged period if the vault receives zero allocations from gamers.
The XProvider contract sends two separate cross-chain messages when transferring tokens and updating state, causing the caller to pay relayer fees twice. An attacker could not exploit this directly, but the guardian or rebalancing actor incurs unnecessary extra costs.
The XChainController contract never resets its totalWithdrawalRequests counter between rebalancing periods, so the value accumulates over time. Once it exceeds a vault's total underlying balance, the subtraction in pushVaultAmounts underflows and reverts, blocking rebalancing indefinitely and locking funds because withdrawals only execute after a successful rebalance.
The reward calculation for a protocol continues even after it is blacklisted, using an unpredictable exchange rate. This can cause users to receive extremely large positive or negative rewards.
The vault's withdrawFromProtocol function passes an amount denominated in the vault's currency directly to a provider's calcShares function, which expects the amount in the provider's underlying token. If the two currencies have different prices, the withdrawal will be for the wrong value, causing losses or misbalancing.
When a vault is switched off, its exchange rate is not updated; if later switched on, users deposit or withdraw using a stale, lower exchange rate, causing incorrect share calculations. Depositors may receive more shares and withdrawers may receive less than they should.
The IdleProvider contract's balanceUnderlying and calcShares functions incorrectly scale their return values by using the underlying token's decimals instead of the LP token's decimals. This causes the reported balance to be overstated and the required shares to be understated by a factor of up to 10^12 for tokens like USDC and USDT, potentially leading to protocol-wide losses during rebalancing.
The deposit functions in several provider contracts accept a user-supplied underlying token address and amount, then use the contract's own balance of that token to mint yield-bearing tokens, which are sent to the caller. An attacker can supply a fake token that reports a balance increase without actually transferring funds, causing the provider to use its own holdings of a real underlying token to mint tokens for the attacker.
The Vault contract's pullFunds() function reduces the savedTotalUnderlying variable by the requested withdrawal amount before the actual withdrawal occurs, and even when no withdrawal is made due to the minimumPull threshold. This causes savedTotalUnderlying to be understated, leading to incorrect allocation calculations and reduced investment efficiency.
The vault's rebalance function could be called before cross-chain funds arrive because the feedback message and the fund transfer are processed independently and may arrive out of order. An attacker could trigger rebalancing with incomplete funds, reducing rewards.
A user can use flashloans to temporarily inflate their derby token balance and manipulate protocol allocations within a vault. This could direct funds into poorly performing protocols, potentially causing losses or unexpected behaviour.
The function pushVaultAmounts calls getDecimals on a vault address that may be on a different chain, causing it to revert or return wrong decimals, which breaks rebalancing logic.
Blacklisting a protocol does not decrease the totalAllocatedTokens variable, which is used to calculate new allocations. This leads to lower token allocations to protocols and lower yield.
The contract calls ERC20 approve directly on tokens such as USDT that revert when the existing allowance is not zero, so the approval step can fail. An attacker cannot exploit this directly, but legitimate transfers through the bridge could be blocked.
The rebalanceXChain() function allows any user to set the slippage tolerance for cross-chain swaps, and an attacker can front-run the transaction to set it to 100%. This could cause the protocol or users to lose funds due to unfavourable swap rates.
The sendFundsToVault function retrieves the underlying token address for a specified chain, but when the chain is Optimism (L2), it calls balanceOf on that L2 token address while the contract is on Mainnet, which is invalid. This prevents the protocol from rebalancing the vault.
The Vault.rebalance function updates the total allocated tokens before calculating rewards, so rewards are computed using the new period's allocation instead of the previous period's. This causes rewards for all reward cycles to be incorrect.
The deposit function checks the sender's current balance against a maximum training deposit limit, but a user can transfer their balance to another account and then deposit from the emptied account, bypassing the limit. An attacker could deposit more than the allowed maximum during the training phase.
The YearnProvider contract's withdraw function transfers the full requested share amount from the caller but only receives a partial underlying amount from Yearn when liquidity is insufficient, leaving the unused shares stuck on the contract. An attacker or normal user could cause protocol funds to be permanently frozen, leading to losses for many users.
The MainVault.rebalanceXChain function does not verify that the vault retains enough funds to cover reservedFunds after sending funds cross-chain. If the vault's total underlying decreases between allocation and rebalance, the vault may send all its funds, leaving nothing to cover reserved withdrawals.