The getDefaultLiquidityManagement() function in BasePoolFactory.sol declares that it returns a LiquidityManagement struct but has an empty function body that relies on implicit zero initialization:
The issue here is that LiquidityManagement configurations are fundamental to pool behavior in Balancer V3's architecture. This struct controls key pool functionality like enabling donations and unbalanced liquidity settings. By implicitly defaulting to zero values through an empty implementation, pools deployed through this factory could have critical features unintentionally disabled or misconfigured. This becomes especially problematic in the context of QuantAMM weighted pools, which have sophisticated requirements around liquidity management for their weight adjustment mechanisms. When these pools are registered with the Vault via _registerPoolWithVault, the zero-initialized settings could prevent proper pool operation or cause unexpected behavior in the weight adjustment logic that depends on specific liquidity constraints.
The silent reliance on default zero initialization also introduces a maintenance hazard - as new fields are added to the LiquidityManagement struct to support evolving pool features, developers may not realize the need to explicitly initialize these fields with appropriate non-zero defaults.
Explicitly initialize all struct fields with their intended default values:
Consider making the defaults configurable by admin if appropriate:
Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelyhood and the detailed impact on the mainnet without any supposition (if, it could, etc) to prove your point.
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.