smart-contracts/backlog/tasks/task-6 - Integrate-CoW-Prot...

51 lines
1.7 KiB
Markdown

---
id: TASK-6
title: Integrate CoW Protocol for MEV-Protected Community Token Trading
status: To Do
assignee: []
created_date: '2026-04-03 21:40'
labels:
- solidity
- cow-protocol
- mev
dependencies:
- TASK-5
references:
- /home/jeffe/Github/payment-infra/contracts/
documentation:
- backlog/docs/CoW_Protocol_Research.md
- backlog/docs/CoW_Integration_Summary.md
priority: medium
---
## Description
<!-- SECTION:DESCRIPTION:BEGIN -->
Wire up existing CoW Protocol integration from payment-infra for MEV-protected batch auction trading of community tokens.
Existing contracts (payment-infra):
- BondingCurveAdapter.sol — pre-interaction hook for GPv2Settlement
- MycoConditionalOrder.sol — IConditionalOrder handler for ComposableCoW
- Plus: MycoLimitOrder, MycoTWAPOrder, MycoDCAOrder variants
Work needed:
1. Port/adapt these contracts to work with the new enhanced bonding curve (TASK-5)
2. Register Watch Tower for automated conditional order monitoring
3. Test on Base Sepolia with GPv2Settlement (0x9008D19f58AAbD9eD0D60971565AA8510560ab41)
4. Ensure tranche tokens (myUSD-S, myUSD-M) are tradeable via CoW batch auctions
5. Implement custom solver hints for bonding curve pricing
MEV protection for community tokens:
- Private order flow (never in mempool)
- Uniform clearing prices (all trades in batch at same price)
- Coincidence of Wants matching (peer-to-peer, no AMM slippage)
<!-- SECTION:DESCRIPTION:END -->
## Acceptance Criteria
<!-- AC:BEGIN -->
- [ ] #1 BondingCurveAdapter works with new enhanced bonding curve
- [ ] #2 Conditional orders execute correctly via Watch Tower
- [ ] #3 Tranche tokens tradeable via CoW batch auctions
- [ ] #4 Integration tested on Base Sepolia
<!-- AC:END -->