Upgraded Q -> 2 from #537 [1727786902479] #557
Labels
downgraded by judge
Judge downgraded the risk level of this issue
duplicate-226
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
satisfactory
satisfies C4 submission criteria; eligible for awards
withdrawn by judge
Special case: this finding was auto-generated by a judge and is now withdrawn; it can be ignored
Judge has assessed an item in Issue #537 as 2 risk. The relevant finding follows:
Links to affected code *
https://github.com/code-423n4/2024-07-loopfi/blob/57871f64bdea450c1f04c9a53dc1a78223719164/src/oracle/BalancerOracle.sol#L82
Impact
Balancer disclosed a read-only reentrancy vulnerability in the Balancer Vault. The effect of this reentrancy is that Balancer pools are susceptible to manipulation of their external queries. What this means is that integrations with balancer vaults must carefully assess the data returned from the vaults. Some protocols, were unaware of this got hacked as a result. One of the functions affected is the getPoolTokens function which is queried when BalancerOracle.sol is deployed. Via reentrancy, an attacker can force token balances and BPT supply to be out of sync, creating very inaccurate BPT prices.
//...
(address[] memory tokens, , ) = balancerVault.getPoolTokens(poolId);
//...
Also, price updates are made quering various price calculations using pool totalSupply, normalized weights, so it is clearly vulnerable to synchronization issues between the data points.
Recommended Mitigation Steps
Recommend using the provided balancer library to protect from these manipulations.
The text was updated successfully, but these errors were encountered: