The QuantAMMWeightedPoolFactory contract contains a version tracking inconsistency where pool creation functions use a hardcoded version string instead of the stored pool version.
Here's the current implementation:
https://github.com/Cyfrin/2024-12-quantamm/blob/a775db4273eb36e7b4536c5b60207c9f17541b92/pkg/pool-quantamm/contracts/QuantAMMWeightedPoolFactory.sol#L60
https://github.com/Cyfrin/2024-12-quantamm/blob/a775db4273eb36e7b4536c5b60207c9f17541b92/pkg/pool-quantamm/contracts/QuantAMMWeightedPoolFactory.sol#L100
The _poolVersion is set in the constructor:
https://github.com/Cyfrin/2024-12-quantamm/blob/a775db4273eb36e7b4536c5b60207c9f17541b92/pkg/pool-quantamm/contracts/QuantAMMWeightedPoolFactory.sol#L76
However, as it is, getPoolVersion() will return different version than what pools are created with. And tjos creates discrepancy between queried and actual versions.
The pool creation functions ignore the _poolVersion state variable and use a hardcoded "version" string instead.
Pools are created with incorrect version information and getPoolVersion() will return different version than what pools are created with.
Manual review
Replace hardcoded version with _poolVersion. Also add version validation in pool creation functions.
Version is immutable as specified in Version.sol and can be what the developer wants. It is hardcoded and will be changed by the admin for every deployment. No real impact here.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.