Skip to content

feat: integrate TrebleSwap (Algebra v1.2.2) on Base network - #1139

Open
Shimodos wants to merge 1 commit into
VeloraDEX:masterfrom
trebleswap:feat/treble-integration
Open

feat: integrate TrebleSwap (Algebra v1.2.2) on Base network#1139
Shimodos wants to merge 1 commit into
VeloraDEX:masterfrom
trebleswap:feat/treble-integration

Conversation

@Shimodos

@Shimodos Shimodos commented Feb 9, 2026

Copy link
Copy Markdown

Summary
Integrate TrebleSwap DEX on Base network (chain 8453). TrebleSwap is built on Algebra Protocol v1.2.2 with custom pool support.

Changes
Add Treble fork class extending AlgebraIntegral
Add TrebleSwap configuration for Base network (factory, quoter, router, subgraph)
Add Quoter ABI supporting deployer field for custom pools
Add integration tests for WETH/USDC and USDC/TREB pairs (SELL & BUY)
Add TREB token to e2e test constants
Register TrebleSwap in DEX index
Contract addresses (Base)
Factory: 0x6e606Cf94A4DDc01aEed2Fce16d1b4f5B33e0A31
Quoter: 0x4b25da09909A2CAF6ec8584B09BA0e24519A46fa
SwapRouter: 0x309959994fc3fC6F789796923408f27748879b01
Subgraph: TrebleSwap Subgraph
Test results
All 7 integration tests passing:

Pool initialization and config verification
SELL/BUY pricing for WETH/USDC (graceful skip when TVL < $50K threshold)
SELL/BUY pricing for USDC/TREB (full on-chain price verification, TVL > $100K)
Top pools discovery for WETH and TREB tokens
How it works
TrebleSwap uses Algebra's Quoter with individual parameters (tokenIn, tokenOut, deployer, amount, limitSqrtPrice). The base AlgebraIntegral class handles encoding/decoding, so the Treble fork only needs to provide its own ABI and config. Pools are auto-discovered from the subgraph — no hardcoded pool addresses needed.

@Shimodos
Shimodos force-pushed the feat/treble-integration branch from 5a1c55c to 561c4b5 Compare February 9, 2026 17:22
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