project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4
project screenshot 5
project screenshot 6

Accio.NFT

A one-click magic for buying NFTs with cross-chain liquidity.

Accio.NFT

Created At

ETHGlobal Tokyo

Winner of

4️⃣ Linea — Best Use

🦄 1inch — 🥉 Best use of Fusion

🏆 Hyperlane — Best Overall

Project Description

  • Accio.NFT combines interchain bridging protocol with NFT marketplaces to create a one-click UX for buying NFTs with cross-chain liquidity

  • Background

    • As the Ethereum ecosystem expands, we are seeing more and more new L2 chains.
    • This means that in order to use multiple products, users need to move liquidity between multiple chains. The current UX for bridging liquidity is quite cumbersome—users need to swap and bridge tokens from each chain separately.
    • So we thought that there needs to be an easy way for users to collect assets from multiple chains at once and use their beloved products.
  • Functionalities

    • Users can check their wETH balances on 4+ chains (Goerli, Mumbai, Linea, Optimism)
    • Users can swap USDC -> wETH using 1inch Fusion API
    • Users can check the NFTs currently on sale (Opensea)
    • Users can buy NFTs by specifying how much they want wETH they want to use from which chains (e.g. 0.5 wETH on Linea and 0.5 wETH on Mumbai)

How it's Made

Modules


Smart contracts

The buy function on the LiquidityAggregator contract is the initial entrypoint that triggers the cross-chain liquidity aggregation and NFT purchase flow:

  • Stores the user's request within the contract storage
  • Fetches user funds on the local chain if needed
  • Sends interchain messages to the LiquidityAggregators on the remote chains
  • Once the remote LiquidityAggregator receives the message, it gets the user's funds on the remote chain and calls transferRemote on the HypERC20 token to send them over to the origin chain.
  • Upon a successful interchain transfer, the handleWithToken function on the origin chain's LiquidityAggregator is called and if the funds are all aggregated, an NFT purchase is executed.

Frontend

  • Easily view liquidity across multiple chains
  • Display the aggregated value of various tokens from multiple chains through the 1inch API
  • Support simple swaps across multiple chains using the 1inch Fusion SDK
  • Aggregate and display NFT collection information from multiple chains and marketplaces. Also used opensea.io API
  • Integrated with the accio.nft smart contract
  • View your NFTs distributed across multiple chains

Tech stack


Hyperlane

  • Using Hyperlane was essential for making our project since we needed both a general messaging bridge and a token bridge. We had fun trying to deploy Hyperlane on a new chain (Linea) and running validators/relayers ourselves.
  • One challenge we encountered was related to relayers--our messages kept failing because the relayer transaction ran out of gas. We ended up digging up the rust code to find out where the gas limit was being set and doubled it to make our transactions go through.
  • Another challenge was modifying the Warp Route default contracts so that it could send arbitrary data along with bridging token. We wanted to use hyperlane-deploy, which contains helper scripts for deploying and testing Warp Route, but we couldn't use it as given because it was importing hyperlane-sdk as an npm package. We ended up using git submodule to solve this problem.

1inch

  • We implemented 1inch Fusion SDK into our service so that users can swap their assets in the most safe and gas-efficient way
  • We used the 1inch quote API to enable a quick glance at the total value of various tokens on each chain.

Metamask (Linea)

  • We deployed our contract on Linea Goerli network because we believed that it has potential to become a widely-used L2 chain for NFTs and gaming since it is cheap and is very well integrated with other products such as Metamask and Infura.

Airstack

  • We used Airstack to get NFT metadata and the latest transfer information for each NFT collection
background image mobile

Join the mailing list

Get the latest news and updates