Feat/upgradeable pools#234
Merged
Merged
Conversation
…nter-stash-contracts into feat/upgradeable-pools
There was a problem hiding this comment.
Pull request overview
This PR implements issue #233 by converting the Liquidity Pool contracts (and related components) to an upgradeable architecture using proxies and initializer-based setup, and updates deployment scripts/config/tests accordingly.
Changes:
- Refactors core pool contracts (LiquidityPool*, PublicLiquidityPool) and ERC4626Adapter to upgradeable patterns (initializers + ERC7201 storage).
- Updates deployment scripts and network configuration to deploy and reference
TransparentUpgradeableProxyinstances. - Updates Hardhat tests (and Echidna harnesses) to deploy pools/adapters behind proxies and assert non-reinitializability.
Reviewed changes
Copilot reviewed 30 out of 30 changed files in this pull request and generated 16 comments.
Show a summary per file
| File | Description |
|---|---|
| test/WETHLiquidityPool.ts | Deploys LiquidityPool via TransparentUpgradeableProxy in tests. |
| test/PublicLiquidityPool.ts | Deploys PublicLiquidityPool via proxy; expands initialization/reinit tests. |
| test/LiquidityPoolStablecoin.ts | Deploys LiquidityPoolStablecoin via proxy; adds reinit assertions. |
| test/LiquidityPoolAaveLongTerm.ts | Deploys LiquidityPoolAaveLongTerm via proxy; adds reinit assertions. |
| test/LiquidityPoolAave.ts | Deploys LiquidityPoolAave via proxy; adds reinit assertions. |
| test/LiquidityPool.ts | Deploys LiquidityPool via proxy; adds reinit assertions. |
| test/helpers.ts | Moves DEFAULT_PROXY_TYPE source; adds getContractAt usage in tests. |
| test/ERC4626Adapter.ts | Deploys PublicLiquidityPool + ERC4626Adapter via proxies in tests. |
| scripts/helpers.ts | Adds deployProxyX helper for deterministic proxy deployments. |
| scripts/deployUSDCStablecoinPool.ts | Switches stablecoin pool deploy flow to deployProxyX. |
| scripts/deployUSDCPublicPool.ts | Switches public pool deploy flow to deployProxyX. |
| scripts/deployUSDCPoolAaveLongTerm.ts | Switches Aave LT pool deploy flow to deployProxyX. |
| scripts/deployUSDCPoolAave.ts | Switches Aave pool deploy flow to deployProxyX. |
| scripts/deployUSDCPool.ts | Switches base USDC pool deploy flow to deployProxyX. |
| scripts/deployEURePool.ts | Switches EURe pool deploy flow to deployProxyX. |
| scripts/deployERC4626Adapter.ts | Switches adapter deploy flow to deployProxyX. |
| scripts/deploy.ts | Updates umbrella deploy script to deploy pools/adapters via proxies. |
| scripts/common.ts | Removes DEFAULT_PROXY_TYPE from scripts/common exports. |
| network.config.ts | Introduces DEFAULT_PROXY_TYPE + proxy IDs; updates config to use proxy IDs. |
| hardhat.config.ts | Adds/adjusts compiler overrides for pool contracts. |
| coverage-baseline.json | Updates baseline coverage metrics. |
| contracts/PublicLiquidityPool.sol | Converts to upgradeable ERC4626Upgradeable + ERC7201 storage layout. |
| contracts/LiquidityPoolStablecoin.sol | Converts to upgradeable initializer-based setup. |
| contracts/LiquidityPoolAaveLongTerm.sol | Adjusts constructor for upgradeable base; relies on inherited initializer. |
| contracts/LiquidityPoolAave.sol | Converts to upgradeable base + ERC7201 storage layout + initializer. |
| contracts/LiquidityPool.sol | Splits into LiquidityPoolBase (upgradeable) + concrete LiquidityPool + ERC7201 storage. |
| contracts/ERC4626Adapter.sol | Converts to upgradeable AccessControlUpgradeable + ERC7201 storage + initializer. |
| contracts/echidna/EchidnaPublicLiquidityPool.sol | Updates Echidna harness to deploy via ERC1967Proxy with init data. |
| contracts/echidna/EchidnaLiquidityPool.sol | Updates Echidna harness to deploy via ERC1967Proxy with init data. |
| contracts/Deps.sol | Updates deps aggregation; now includes proxy (and additional import). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mpetrunic
approved these changes
Jun 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes: #233