Skip to content

Feat/upgradeable pools#234

Merged
lastperson merged 23 commits into
mainfrom
feat/upgradeable-pools
Jun 19, 2026
Merged

Feat/upgradeable pools#234
lastperson merged 23 commits into
mainfrom
feat/upgradeable-pools

Conversation

@lastperson

Copy link
Copy Markdown
Collaborator

Closes: #233

@lastperson lastperson self-assigned this Jun 11, 2026
Base automatically changed from feat/profit-accounting to main June 19, 2026 03:51
@lastperson lastperson marked this pull request as ready for review June 19, 2026 04:08
@lastperson lastperson requested a review from mpetrunic June 19, 2026 04:08
@mpetrunic mpetrunic requested a review from Copilot June 19, 2026 08:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 TransparentUpgradeableProxy instances.
  • 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.

Comment thread contracts/Deps.sol Outdated
Comment thread contracts/LiquidityPool.sol
Comment thread contracts/LiquidityPool.sol Outdated
Comment thread scripts/deployUSDCPool.ts Outdated
Comment thread scripts/deployUSDCPublicPool.ts Outdated
Comment thread scripts/deploy.ts Outdated
Comment thread scripts/deploy.ts Outdated
Comment thread scripts/deploy.ts Outdated
Comment thread scripts/deploy.ts Outdated
Comment thread scripts/deploy.ts Outdated
@lastperson lastperson merged commit 38536f9 into main Jun 19, 2026
5 checks passed
@lastperson lastperson deleted the feat/upgradeable-pools branch June 19, 2026 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make Liquidity Pools upgradeable

3 participants