Feat/stash dex#252
Merged
Merged
Conversation
mpetrun5
approved these changes
Jun 25, 2026
There was a problem hiding this comment.
Pull request overview
This PR introduces a new upgradeable StashDex contract intended to provide a stash-backed swap interface (borrow tokenOut from configured liquidity pools, route tokenIn to a configured processor, and enforce an oracle-validated fee), along with deployment/config updates and comprehensive tests.
Changes:
- Adds the
StashDexupgradeable contract with per-route fee config, borrowing viaILiquidityPool.borrowDirect, repay/forward flows, and a proxiedbalance()view for indexers. - Adds a full Hardhat test suite for StashDex behavior (routes, pools, fees, pause, repay/forward, and proxy deployment).
- Adds deployment + network config plumbing for StashDex and extends the liquidity pool interface/testing mocks (
directDebt).
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
contracts/StashDex.sol |
New upgradeable DEX contract that borrows from liquidity pools and routes tokenIn to processors. |
contracts/interfaces/ILiquidityPool.sol |
Adds directDebt() to the pool interface. |
contracts/testing/TestLiquidityPool.sol |
Enhances test pool to track/repay direct debt. |
contracts/testing/TestWETH.sol |
Adds mint() helper for tests. |
test/StashDex.ts |
Comprehensive StashDex test coverage (proxy init, routes/pools, swap, repay/forward, pause, balance). |
scripts/deployStashDex.ts |
New deployment script for StashDex proxy + initial config. |
scripts/helpers.ts |
Adds default Hardhat network config for StashDex. |
scripts/test.ts |
Includes StashDex deploy in the script-based test deploy flow. |
network.config.ts |
Adds StashDex config shape + initial ETHEREUM StashDex config and proxy IDs used by scripts. |
coverage-baseline.json |
Updates baseline coverage numbers. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mpetrunic
approved these changes
Jun 25, 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: #244