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.
XChainController.pushVaultAmounts() is to push exchangeRate to the vaults.
XChainController.getVaultAddress() returns the vault address of vaultNumber with the given chainID
Vulnerability Detail
pushVaultAmounts() invoke xProvider.getDecimals() internally to calculate newExchangeRate
The xProvider.getDecimals() is always call the address(vault) from the MainNet. but address(vault) could be in any chain
XChainController.pushVaultAmounts() could keep reverting with all the chainID (only the MainNet will be correct )
or it will return the wrong decimals values. (if the address(vault) is for other chain/L but it exist in the MainNet with a decimals())
this will lead to a wrong newExchangeRate
XChainController.getVaultAddress() return the vault address of vaultNumber with the given chainID.
So getVaultAddress() is not guarantee that the returned address is on the mainnet
After that XChainController.pushVaultAmounts() invoke xProvider.getDecimals() internally
Solidity
/// @notice returns number of decimals for the vault
function getDecimals(address _vault) external view returns (uint256) {
return IVault(_vault).decimals();
}
As we can see xProvider.getDecimals() only interact with the mainnet in this case.
This will lead XChainController.pushVaultAmounts() to revert and break all rebalancing logic.
I believe this issue should be valid.
sherlock-admin
Escalate for 10 USDC
we know that the XChainController is on the mainnet and it can only call xProvider on the same chain (mainnet).
XChainController.getVaultAddress() return the vault address of vaultNumber with the given chainID.
So getVaultAddress() is not guarantee that the returned address is on the mainnet
After that XChainController.pushVaultAmounts() invoke xProvider.getDecimals() internally
Solidity
/// @notice returns number of decimals for the vault
function getDecimals(address _vault) external view returns (uint256) {
return IVault(_vault).decimals();
}
As we can see xProvider.getDecimals() only interact with the mainnet in this case.
This will lead XChainController.pushVaultAmounts() to revert and break all rebalancing logic.
I believe this issue should be valid.
You've created a valid escalation for 10 USDC!
To remove the escalation from consideration: Delete your comment.
You may delete or edit your escalation comment anytime before the 48-hour escalation window closes. After that, the escalation becomes final.
Theezr
This is a valid medium issue.
hrishibhat
Escalation accepted
Considering this issue a valid medium
sherlock-admin
Escalation accepted
Considering this issue a valid medium
This issue's escalations have been accepted!
Contestants' payouts and scores will be updated according to the changes made on this issue.
The original report as published on Sherlock, by Ch_301. Images and videos are our own copies; raw HTML is shown as text. View it on Sherlock.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
Generating the AI write-up for this report.
This usually takes about a minute. You can read the original meanwhile; this page updates itself.
Writing the technical write-up
Writing the version for beginners
Checking every passage against the original
How it worked
What the attacker needed
None
The fix
The function should call getVaultAddress with the mainnet chain ID, because all vaults have the same decimals.
How it was found
Call pushVaultAmounts with a vault number and a chain ID that is not the mainnet.
The function internally calls getVaultAddress to get the vault address for that chain.
It then calls xProvider.getDecimals on that address, which only works on the mainnet.
The call reverts or returns wrong decimals, causing the exchange rate calculation to fail or be incorrect.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
Generating the AI write-up for this report.
This usually takes about a minute. You can read the original meanwhile; this page updates itself.
Writing the technical write-up
Writing the version for beginners
Checking every passage against the original
A smart contract on one blockchain tries to read data from another blockchain, but it can only read from its own chain. So when it tries to get the number of decimals for a vault on another chain, it fails or gets the wrong number, which stops the system from updating balances correctly.
What is DoS?
A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.