Skip to content

feat(rfq): add Euclid Protocol RFQ provider - #1459

Open
EliasSalameh wants to merge 1 commit into
propeller-heads:mainfrom
EliasSalameh:euclid/rfq-provider
Open

EliasSalameh wants to merge 1 commit into
propeller-heads:mainfrom
EliasSalameh:euclid/rfq-provider

Conversation

@EliasSalameh

Copy link
Copy Markdown

Adds rfq:euclid as an RFQ liquidity source. Euclid's liquidity lives on its own app chain (VSL); the Euclid RFQ gateway quotes that depth as indicative price levels and settles fills atomically on the taker's chain from pre-positioned maker inventory.

  • tycho-simulation: EuclidClient (public WebSocket levels stream as full-state JSON frames + HTTP firm-quote endpoint with optional x-api-key), EuclidState (ProtocolSim + IndicativelyPriced over bid/ask ladders), decoder, builder, and EUCLID_API_URL/EUCLID_API_KEY configuration. Mirrors the Bebop integration structure.
  • tycho-execution: EuclidSwapEncoder (binding quote at encode time; packs token_in | token_out | tx_to | partial_fill_offset | original amount | calldata) and EuclidExecutor.sol. Euclid orders are maker-signed 1inch limit-order-protocol v3 RFQ orders settled through the 1inch Aggregation Router v5 (fillOrderRFQTo); the executor pins that router, allowlists the single fill selector, and patches the filled taker amount downward only. Foundry tests sign real orders with a test key and fill them through the live router on a mainnet fork, covering full and partial fills plus target/selector rejection.
  • rfq_quickstart: EUCLID_ENABLED wiring + README.

Adds rfq:euclid as an RFQ liquidity source. Euclid's liquidity lives on
its own app chain (VSL); the Euclid RFQ gateway quotes that depth as
indicative price levels and settles fills atomically on the taker's
chain from pre-positioned maker inventory.

- tycho-simulation: EuclidClient (public WebSocket levels stream as
  full-state JSON frames + HTTP firm-quote endpoint, keyless by default
  with an optional x-api-key), EuclidState (ProtocolSim +
  IndicativelyPriced over bid/ask ladders, per-pair layout), decoder,
  builder, and EUCLID_API_URL/EUCLID_API_KEY configuration. Mirrors the
  Bebop integration structure.
- tycho-execution: EuclidSwapEncoder (binding quote at encode time,
  forwarding the per-request origin like Bebop; packs token_in |
  token_out | tx_to | partial_fill_offset | original amount | calldata)
  and EuclidExecutor.sol. Euclid orders are maker-signed 1inch
  limit-order-protocol v3 RFQ orders settled through the 1inch
  Aggregation Router v5 (fillOrderRFQTo); the executor pins that router,
  allowlists the single fill selector, and patches the filled taker
  amount downward only. Registered in executor_deployments.json on
  Ethereum with the router as its constructor argument.
- Foundry tests sign real orders with a test key and fill them through
  the live router on a mainnet fork: full fill, partial fill (pro-rata
  down-patch), excess amountIn never patching up, expired-order and
  bad-signature reverts, target/selector rejection, transfer data.
- rfq_quickstart: EUCLID_ENABLED wiring + README.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Thank you for your contribution. Before we can merge it, please read the PropellerHeads Contributor License Agreement and sign it by posting the comment below. You only need to do this once.


I have read the PropellerHeads CLA and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@EliasSalameh

Copy link
Copy Markdown
Author

I have read the PropellerHeads CLA and I hereby sign the CLA

@kirsanium
kirsanium self-requested a review October 19, 2026 11:59

This branch is waiting to be deployed

1 waiting deployment
integration-tests — de690838 Waiting Oct 19, 2026 by EliasSalameh via Forge build, fmt, test (crates/tycho-execution/contracts) #3199
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants