ConfidencePoolFactory lets the factory owner replace the pool implementation used by future clones. The setter rejects only the zero address, then createPool() clones the configured address and calls initialize() on the clone before recording and emitting the pool deployment.
The setter does not verify that the new implementation address contains contract code. When the implementation is accidentally set to an EOA, createPool() still succeeds: the clone exists, the high-level call targets the clone, and the clone's delegatecall into the EOA returns successfully with empty data. As a result, the official factory records and announces a pool that was never initialized and cannot operate as a ConfidencePool.
Likelihood:
The condition occurs when the factory owner misconfigures poolImplementation to an EOA or another address with no code.
Every valid later createPool() call during that configuration creates and indexes a broken clone instead of reverting.
Impact:
The factory emits PoolCreated and getPoolsByAgreement() returns an address that is not an initialized pool.
Agreement owners and off-chain consumers can treat the official factory event and registry entry as a valid launch, causing false pool announcements, wasted gas, and loss of availability until the implementation pointer is corrected and affected pools are recreated.
Clone and pin the audited repository:
Save the following file as test/poc/EoaImplementationClonePoC.t.sol:
Run the PoC with Foundry:
Observed output summary with forge Version: 1.7.2-nightly, Solidity 0.8.26:
The passing assertions show that the factory deployed and indexed the clone, a pool view call returned no initialized state, and a later stake() call did not execute the pool staking logic.
Validate that the configured implementation contains code before storing it. One approach is to add a dedicated error and reject EOAs in setPoolImplementation():
For stronger defense, the setter could also perform an interface or initialization compatibility check on a temporary clone before accepting the implementation.
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.
The contest is complete and the rewards are being distributed.