PaxDexAdapter
File:contracts/src/adapters/PaxDexAdapter.solPattern: Non-upgradeable
Inherits:
Initializable, OwnableUpgradeable, UUPSUpgradeable
The PaxDexAdapter is the swap execution layer. It provides a clean swap() interface that CopyTradingVault calls — abstracting away the specifics of the PaxDex Router’s exactInputSingle API. This design allows the swap routing logic to be upgraded without touching vault logic.
State Variables
| Variable | Type | Description |
|---|---|---|
paxDexRouter | address | Address of the PaxDex V3-style router |
Interface
The adapter targets a Uniswap V3-styleexactInputSingle interface:
Functions
swap
CopyTradingVault.executeGroupTrade() after the vault approves this contract to spend amountIn.
Builds the ExactInputSingleParams struct and calls paxDexRouter.exactInputSingle(...). Returns the received output amount.
setPaxDexRouter
Integration with CopyTradingVault
The adapter acts as a stateless, trusted bridge — the vault never interacts with PaxDex directly. Future router migrations only require a single
setPaxDexRouter() admin call with no changes to vault logic.