Coil — an MEV-resistant intent DEX where every order in a batch clears at one uniform price — plugs into the TARE stack three ways, and every connection only moves value Coil has already earned. A DEX is a harder test of that rule than a gauge vote: now there's order flow, fees, and a contract that wants to trade. Three small contracts, each built so the worst an operator can do is leave money on the table — never take it.
CoilFeeRouter is installed as Coil's fee_recipient. The permissionless harvest(token)
pulls the accrued (≤1%) fee: TARE passes straight through (donated as-is); USDC is swapped USDC→TARE through the
canonical Curve StableSwap-NG pool, then donated to the engine's permissionless donate_to_surplus() — no engine change.
price_oracle, capped by an owner-set, hard-capped slippage.recover rejects TARE and USDC outright.A capped slice of each USDC fee routes — still in USDC — to gauge voters, with zero veForge contract changes.
A second EmissionRouter instance whose reward token is USDC feeds the existing token-agnostic
BribeDistributor; CoilFeeRouter peels off a bounded slice before it swaps.
gauge_bps hard-capped at 50% (set to 20%); surplus always keeps the majority of every harvest.distribute reads zero weight and no-ops.CoilMakerStrategy is a Keep strategy (asset = USDC) that is itself a Coil trader: it rests limit intents
("sell USDC, buy TARE, at or above this price") and authorizes them on-chain via EIP-1271 — a
keeper-managed registry of approved order digests, answered from isValidSignature.
approve_intent floors every order's min_buy at the pool's EMA oracle — and the keeper cannot widen it. A resting order can never fill below oracle value.harvest() swaps banked TARE back to USDC directly through the pool, EMA-floored.For the maker strategy a stateful machine plays all three roles — vault, keeper, solver — interleaved with harvests, time travel, and EMA moves, asserting after every step:
totalAssets == idle_USDC + TARE·EMA / scale.convertToAssets(totalSupply) ≤ totalAssets (+dust).Totals: CoilFeeRouter 27+1 · CoilMakerStrategy 12+1 · plus a veForge integration test proving the 6-decimal USDC emission path end-to-end. Full Keep suite: 160 green, no regression.
Mocks prove logic; they don't prove you got a real counterparty's ABI, decimals, and EIP-712 digest right. Both risky integrations were run on a Sepolia fork against the real contracts.
invalid signature).totalAssets rose 1000.00 → 1001.96; harvest realized TARE back to 201.94 USDC; the vault redeemed 1001.94 USDC on its 1000 deposit — market-making yield captured by a contract that never held a key to anyone's money.| Contract | Address |
|---|---|
| Coil (intent DEX) | 0x95107C1844191047D781C4f6AD90Ea14c422a578 |
| CoilFeeRouter (A) | 0xdD4A74631770C32930b03A0a7AbD8572D1641547 |
| EmissionRouter · USDC (B) | 0xf28A9E305BD4631442b89a73a58387B4d66b511F |
| CoilMakerStrategy (C) | 0x07cD6636840a44B77e4AC2e971eD96c076C73006 |
| GaugeController (reused) | 0xA28c124827bbe1e6d5fce394d04F7Dff8550c369 |
| BribeDistributor (reused) | 0x64452025DbDbaA862C8A7137deB05A1FC11316B3 |