Skip to content

Title not recorded

今天看了 OneKey 钱包的 Swap 功能,发现只是接入了 0x 的服务,十分简陋。然后顺着 0x 的 GitHub 看了一遍,然后结合昨天研究 MetaMask Swap 得出的一些初步结论,奶爸就斗胆来规划一下,打造一个聚合交易平台

接入现有聚合交易服务

0x[RFQ/DEX]: https://0x.org/docs/guides

1inch[AGG]: https://docs.1inch.io/api/

Totie[?]: https://developers.totle.com/api/operational-details

AirSwap[RFQ]: https://about.airswap.io/technology/request-for-quote

ParaSwap[AGG]: https://developers.paraswap.network/

整合现有 DEX

择优

let 最佳汇率;
range DEX:
  range 交易对:
    if 汇率 > 最佳汇率:
      最佳汇率 = 汇率;
return 最佳汇率

路径拆分

A -> B 可能直接交易因为池深度不够,滑点会很大
A 20% -> B
  30% -> C -> B
  50% -> D -> B
这么拆分一下最终的滑点会比直接交易小

专业做市商

与像 Watermute 这种专业做市商合作给他们撮合订单

以上其实就是做一个聚合交易平台核心的部分,至于前端其实怎么做都可以

Comments

阿呆

阿呆 Guest ·v1

每个字我都认识,连在一起我怎么就看不懂了呢?

奶爸

奶爸 Guest ·v1

@阿呆 千万美金的市场

Commenting as a guest. A nickname is required; email is optional. Only new comments posted after verifying your email and signing in will appear on your profile. Existing guest comments will not be linked automatically.

Share article

Title not recorded

Email X

View original ↗