Closed xenide closed 2 weeks ago
paging @nventuro, could I trouble you take a quick look at this?
Hm I don't recall exactly, but I don't think it was. None of the audits mention it, and I think it was developed and then removed in the time between deployment of v2 (April 2021) and deployment of the first set of stable pools (around Aug/Sept 2021).
From what I remember, we dropped it because we were unsure the oracles provided sufficient value to warrant the gas cost increases during normal operations, not due to correctness or security concerns.
hey @nventuro thanks for responding. In that case, then we're looking at cases of having deployed code without having gone through an audit (as seen in those two pools above).
Do you think this is what happened?
Looking at the deployments, it seems like the only instance of a pool factory with a price oracle was the one you identified: https://github.com/balancer/balancer-deployments/tree/master/tasks/deprecated/20210727-meta-stable-pool
Looking at the deployments, it seems like the only instance of a pool factory with a price oracle was the one you identified: https://github.com/balancer/balancer-deployments/tree/master/tasks/deprecated/20210727-meta-stable-pool
Well, we also had the oracle weighted pool: https://github.com/balancer/balancer-deployments/tree/master/tasks/deprecated/20210418-weighted-pool (WeightedPool2Tokens).
My recollection is we were refactoring the pool code mid '22 (e.g., BPT protocol fees, composable pools), and deciding whether we wanted to retain the oracle functionality, which would likely have required maintaining multiple pool versions going forward. We wanted a single stable pool, and dropped the oracle functionality to keep it simple. The oracles just weren't used enough to be worth maintaining. And there was significant gas overhead if the oracle was turned on, as updating the oracle added storage writes to every operation.
I don't think the code was formally audited, but I seem to remember Certora at least looking at it. We certainly reviewed it extensively internally, and they were used in production without any issues (e.g., all the core, seeded weighted pools had oracles).
okay understood thanks for the insights @EndymionJkb @nventuro.
closing for now
We're thinking of using the oracle code from here , but it seems like all oracle code infra was deleted in this commit.
I looked through all audit reports and none of them mention those oracle code. Can I confirm that:
QueryProcessor.sol
and associated files (such asSamples.sol
andBuffer.sol
) have never been audited?MetaStablePool
on mainnet that had the oracle code deployed and another one