Skip to content

Feat/stash dex#252

Merged
mpetrunic merged 3 commits into
mainfrom
feat/stash-dex
Jun 25, 2026
Merged

Feat/stash dex#252
mpetrunic merged 3 commits into
mainfrom
feat/stash-dex

Conversation

@lastperson

Copy link
Copy Markdown
Collaborator

Closes: #244

@lastperson lastperson requested a review from mpetrunic June 25, 2026 08:57
@lastperson lastperson self-assigned this Jun 25, 2026

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 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 StashDex upgradeable contract with per-route fee config, borrowing via ILiquidityPool.borrowDirect, repay/forward flows, and a proxied balance() 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.

Comment thread contracts/StashDex.sol
Comment thread contracts/StashDex.sol
Comment thread scripts/deployStashDex.ts
@mpetrunic mpetrunic merged commit 190ec4a into main Jun 25, 2026
3 of 6 checks passed
@mpetrunic mpetrunic deleted the feat/stash-dex branch June 25, 2026 12:53
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.

Create StashDex contract with stash-backed swap interface

4 participants