Skip to content

feat: add Baseline AMM dex adapter - #3

Closed
ind-igo wants to merge 5 commits into
KyberNetwork:mainfrom
0xBaseline:feat/baseline-adapter
Closed

feat: add Baseline AMM dex adapter#3
ind-igo wants to merge 5 commits into
KyberNetwork:mainfrom
0xBaseline:feat/baseline-adapter

Conversation

@ind-igo

@ind-igo ind-igo commented Apr 17, 2026

Copy link
Copy Markdown

Implements on-chain adapter for the Baseline Mercury AMM, enabling swaps through the Baseline Relay contract.

ind-igo and others added 5 commits April 17, 2026 20:01
Implements on-chain adapter for the Baseline Mercury AMM, enabling
KyberSwap aggregator to execute swaps through the Baseline Relay contract.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- foundry.toml: pin gas_limit to 16_777_215 to satisfy EIP-7825 under
  evm_version = 'osaka' (nightly foundry enforces the per-tx cap)
- IBaseline: drop unused reserve() declaration
- BaselineAdapter.t.sol: add roundtrip, revert-path, fuzz, and
  consecutive-approve tests; strengthen existing assertions

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Switch buy execution from buyTokensExactIn (on-chain binary search) to
buyTokensExactOut (direct curve computation) for significant gas savings.
The pre-computed amountOut is decoded from calldata and amountIn serves
as the slippage limit. Update tests to mainnet $B pool with ETH_RPC_URL.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ind-igo ind-igo closed this May 12, 2026
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.

1 participant