Kumbaya v3 routing: accept ETH + USDM + CL8Y (pool config + local/testnet testing) #41
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:open_issues
agents
agent:security_audit
agent:verify
area
timecurve
arena
arena-v2
audit
block:feature_review
block:security
bug
contracts
design
devops
docs
documentation
enhancement
epic
feature
frontend
indexer
low priority
megaeth
operations
ops
performance
QA
qa checklist
referrals
removal
security
smart-contracts
tech-debt
testing
time-arena
timecurve
visual-qa
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
code/yieldomega#41
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Enable multi-asset entry for TimeCurve participation by routing ETH and USDM into the sale’s accepted asset (CL8Y) via Kumbaya v3 liquidity, using the natural hop paths:
CL8Y remains a direct path (existing ERC-20 approve +
buyflow).Frontend: encode canonical Kumbaya v3 pair/pool (and fee tier) addresses per chain in the app (not user-configurable at runtime). Optional build-time overrides (
VITE_*) can point local/test deployments at mock or forked pools without forking the whole routing table into env for production.Testing: we must be able to exercise swaps + TimeCurve
buyend-to-end on Anvil (31337) and target testnets without relying on mainnet-only liquidity.Background (repo today)
buyexpects the accepted asset (launch default CL8Y) — seecontracts/src/TimeCurve.solanddocs/onchain/fee-routing-and-governance.md.frontend/src/pages/TimeCurvePage.tsx;frontend/src/lib/addresses.tshas no pool/router config —KumbayaPageis third-party link + placeholder viaVITE_KUMBAYA_DEX_URL.RESERVE_ASSET_ADDRESS/USDM_ADDRESSunset —contracts/script/DeployDev.s.sol,contracts/README.md.Scope (proposal)
Product / UX
Technical — routing
exactInput/exactOutputpaths, fee tiers.chainId, list:Testing — localnet (Anvil)
DeployDevextension deploys minimal Uniswap v3–compatible (or Kumbaya fork) pair contracts + seed liquidity CL8Y/WETH and WETH/USDM (mock tokens already mintable in dev).anvil --fork-url …for manual QA.frontend/.env.local/VITE_*override for pool addresses on 31337 so hardcoded “prod” table does not block local dev.Testing — public testnet
contracts/deployments/stage2-anvil-registry.json) or equivalent listing Kumbaya pool addresses on the target testnet.Open questions
Deliverables
kumbayaRoutes.ts(or similar):chainId → { pools, quoter, router }with tests.docs/…section for “local swap testing” and testnet registry update process.Acceptance criteria (high level)
chainIdor missing config fails closed with user-visible error.mentioned in commit
f49960f029Implemented GitLab #41 (merged to
main@92c5a9f).What shipped
frontend/src/lib/kumbayaRoutes.ts: chain table for31337+6343,VITE_KUMBAYA_*overrides, fail-closed routing, v3-styleexactOutputpath encoding; Vitest coverage.useTimeCurveSaleSession: pay with CL8Y | ETH | USDM;quoteExactOutput→ WETHdeposit+exactOutput(or USDM approve) → existing TimeCurve approve +buy.TimeCurveSimplePage: pay-with radios, slippage (bps), quote line, Kumbaya disclaimer, routing/quote errors.AnvilKumbayaRouter+DeployKumbayaAnvilFixtures.s.sol(Anvil-only constant-product fixture, same address for router + quoter).anvil_deploy_dev.shruns it ande2e-anvil.shexportsVITE_KUMBAYA_*.docs/testing/local-swap-testing.md,e2e-anvil.mdtable,frontend/.env.example,contracts/deployments/kumbaya-anvil-registry.example.json.Verification for @brouie
bash scripts/e2e-anvil.sh— expect 4 Playwright tests green (includes ETH swap + buy).VITE_KUMBAYA_WETH,USDM,SWAP_ROUTER,QUOTER(quoter = router for fixture)./timecurve, select ETH, wait for Quote: spend, run Buy CHARM — wallet should sign wrap, approvals, swap, approve CL8Y, buy.VITE_KUMBAYA_*/ table support — non-CL8Y modes should show a clear error (fail closed).kumbayaRoutes.tsor CI env.EOF
Update: needs compliance with #46 As kumbaya has provided their integration kit with testnet/mainnet connectors and contracts which should be utilized where possible instead of custom solutions. https://github.com/Kumbaya-xyz/integrator-kit
mentioned in issue #52
@PlasticDigits #41 verified.
Backend verification (earlier this morning)
kumbayaRoutes.test.ts: 9/9 Vitest passing (path packing, fail-closed chain/router/quoter/weth, pay-asset routing, slippage BPS)forge test: 177/177 includingAnvilKumbayaRouter+AnvilKumbayaFixturequoteExactOutputon-chain:address(0)post-seed (fixture frozen, correct)Frontend E2E (this afternoon via scripts/e2e-anvil.sh)
TimeCurve ETH route: quote, swap, and buy— test races against re-quote after slider change, NOT a feature bug. Filed as #52.Code review highlights (kumbayaRoutes.ts)
exactOutputpath packing (20 + 3 + 20 bytes per hop, output-first token order)Closing as verified.
mentioned in issue #42
mentioned in issue #123