Inspiration

I personally transfer USDC from Near to Eth, cause exchanged in local country only has Eth support. I personally use the Rainbow bridge right now. Although I am happy with the experience, I have always kind of always thought the process to be complex and something that I don't understand. Everytime I do a bridge, I am always scared. With Chain Signatures, if you have liquidity on Eth, the process of transferring USDC to Eth becomes really simple, straightforward and easy to do. I would personally use an app that I fully understand while trying to transfer USDC from Near to other chains. DirectTransfer does it.

What it does

DirectTransfer is niche take on today's complex apps via which users bridge/transfer stable coins from one chain to another. With Chain signatures the process is really really straightforward.

  1. A smart contract on Near, controls an Eth address using Chain Signatures.
  2. When you send USDC to this contract on Near, it creates a transaction to transfer you the same amount of USDC to an address you mention in the transaction.
  3. You get return the signed Eth transaction which now gets sent to Sepolia testnet.
  4. With this the swap/transfer is complete. You now don't have the USDC on Near, but have it on Ethereum.

How we built it

  1. I used a Rust contract to achieve this. Using chain signatures.
  2. Used a simple next js frontend. The client app is also responsible for relaying the Eth tx to the Sepolia network.

Challenges we ran into

  1. Figuring out the ins-outs of the MPC network and Chain Signatures.
  2. Ethereum payload and transaction types.
  3. Reliably sending correct Eth nonce and network details to the Near contract for tx creation.
  4. Putting all the pieces together.

Accomplishments that we're proud of

  1. The transfer works. :P
  2. Working contract that interacts with the MPC network to generate the Eth tx successfully.
  3. Building end to end flow in absence of not very concrete examples.

What we learned

More Rust, Near callbacks, Eth transactions, Problems usually bridge/swap apps face. etc.

What's next for Direct Transfer

  1. Build a better nonce strategy.
  2. Use Safe on Eth hold funds.
  3. Improve the edge cases.

Built With

Share this project:

Updates