Hey guys Synthetix is wanting to let you guys know about our latest product - Atomic Swaps. If MetaMask could get this implemented it would be a win for both parties. 1inch recently integrated, and getting MetaMask to integrate would drive HIGH volume swaps to MM! Feel free to respond below with any questions or how to get in touch with our devs.
A good twitter thread on Atomic Swaps: https: // twitter. com/0x_____________/status/1538547273260490752
Some background on Atomic Swaps:
It gives the best USDC > ETH rate on ethereum right now, it’s atomic swaps
it allows for trading at the worse of uniswap prices / chainlink prices
the documentation is laid out here
https:// sips.synthetix. io/sips/sip-120/
https:// sips.synthetix. io/sips/sip-198/
This is an example of a test transaction
https:// etherscan. io/tx/0x53bf27bb7d96e050facc9f09c06602b7f418d78eab27792b88bf3fbb6e8a2729
you just need to call exchange Atomically, no slippage is applied
any of these can be traded in any direction
Synthetix: Ether Wrapper | Address 0xc1aae9d18bbe386b102435a8632c8063d31e747c | Etherscan
https: // etherscan. io/address/0xc1aae9d18bbe386b102435a8632c8063d31e747c
so basically users could do USDC > ETH through Synthetix at the best price on ethereum, since unwrap has 0 cost.
To explain how this works:
you just need to call exchangeAtomically with source ccy and destination ccy , amount and a min return amount https: // etherscan. io/tx/0x637b6dee26bfb5d3a3bbfe6a7136f0281f8aacf7fa1db03d5b0daa4fffc1a83a if trader wants to do ETH > USDC you do - ETH > sETH (crv/1inch) - sETH > sUSD ( atomic) - sUSD > USDC (crv/1inch) and you will most likely get the best fill available on ethereum during times of market volatility this also works with wBTC you could also provide it for any crv pool that contains forex like sEUR/sCHF… to get the price you use the contract call included here if you have someone that reads vy, this is a vy implementation that hops through crv pools and atomic swaps https: // github. com/curvefi/metaregistry/blob/atomic_synth_swap/contracts/MetaAtomicSynthSwap.vy basically calls : - the proxy address resolver 0x4E3b31eB0E5CB73641EE1E65E7dCEFe520bA3ef2
(an address that wil never change) to find address resolver (target) - uses the address resolver getAddress
and find address of Exchanger
and that of proxyERC20
- in Exchanger
you find getAmountForExchange
and can do exchangeAtomically
- One thing to mention , you can always send to ProxyERC20
contract (as shown in the tx above) these calls and it should work, proxyERC20 does not change