web icon indicating copy to clipboard operation
web copied to clipboard

feat: add chainflip swapper

Open CumpsD opened this issue 1 year ago • 1 comments

This PR is still in progress! Only quotes are done for now, Draft PR to receive early feedback.

Description

Add Chainflip as cross-chain swapper source, to bring Solana and more routes to users to lead to better pricing.

Risk

The concept of Chainflip is a bit different from smart contract based swaps, since you do not interact with a swap, but instead ask a deposit address to which you can do a regular transfer of assets.

What protocols, transaction types, wallets or contract interactions might be affected by this PR?

A new protocol is added, no existing ones are touched.

Testing

Engineering

Make sure the chainflip feature flag is enabled.

yarn dev as usual, go to the trade page and do a swap between any of the following supported chainflip assets:

  • eth (ethereum, arbitrum)
  • btc
  • sol
  • usdt (ethereum)
  • usdc (ethereum, arbitrum, solana)

Operations

  • [x] :checkered_flag: My feature is behind a flag and doesn't require operations testing (yet)

Testing for a non technical person is identical to an engineer, use the Trade screen and check if quotes show up and swaps can be made.

Screenshots (if applicable)

image

image

image

image

image

Todo's

  • Get a better logo of chainflip which fits inside the rounded corners preview (gets cut off now)

CumpsD avatar Oct 23 '24 14:10 CumpsD

Putting this comment here as a marker of the point I hand over this PR as I'm now so far out of my comfort zone in the codebase that I got stuck :) Quotes are working nicely, a big chunk of getUnsignedUtxoTransaction and getUnsignedEvmTransaction is done, but I can't get getUnsignedEvmTransaction to work :/

A shapeshift dev can probably fix it in a few hours and go over things to make them fit better in the shapeshift codebase. I can always pick up afterwards again to double check chainflip specifics and test things out.

It's 95% there :D so close, yet so far, I hope it helps to get Chainflip over the line :)

image

CumpsD avatar Oct 29 '24 00:10 CumpsD

temporarily closing - will reopen as #8026 as the team picks back up the work to get this over the finish line

Thanks for the contribution @CumpsD 👏 👏 👏 👏 👏 👏

0xean avatar Oct 30 '24 21:10 0xean