Inspiration

Inspired by the powerful opportunities of Chainlink CCIP and the desire to create a simple mechanism for connecting sellers and buyers and their assets between different chains got me thinking about cross-chain feasible swapper.

What it does

The +xchange provides the 5 stages mechanism to swap ERC721 and ERC20 tokens between chains. Also provides the single chain mode.

How we built it

This solution is based on a well-known sealed-bid second-price auction (Vickrey auction). These smart contracts are deployed in the source and destination chains and provide a mechanism for swapping lock/mintable ERC721 and bridged ERC20 tokens:

  • Seller creates an auction in the chain where the NFT (ERC721) token exists (source chain).
  • Seller creates an auction in the chain where buyers who desire to buy this token (destination chain).
  • Seller defines the minimum value of bid and collateral is the same for all bidders.
  • Bidders submit written bids without knowing the bids of the other people in the auction.
  • In every chain, the local winner is announced after bidders reveal the bid values.
  • The results of the auction in every destination chain are replied to source chain auction for the definition of a global winner.
  • The highest bidder from all chains wins but the price paid is the second-highest bid of all bids from all chains.
  • The global winner receives NFT tokens in his chain (destination chain) and sends payment (ERC20 cross-chain tokens) to the seller chain (source chain).
  • When the winner decides to sell this NFT token he also may create an auction in his chain with the same functionality and find the buyers from other chains.

Challenges we ran into

One of the biggest challenges of the +xchange is fault tolerance and reliability. And these problems are still not fully solved.

Accomplishments that we're proud of

The solution is working:) Sometimes...

What we learned

The hackathon allowed me to extend my possibilities and once again reminded that the time goes very fast

What's next for +xchange

A big bunch of improvements or/and bugfixes must be done before this project may be used in prod including:

  • increase cost efficacy,
  • increase reliance and fault tolerance,
  • implement the different auction strategies including Dutch auction,
  • simplification of the protocol.

Built With

Share this project:

Updates