Inspiration
Limit Orders can play an important role in DEFI for any ecosystem , they enable degens to buy or swap crypto at their choice of price and that is a big plus , We want to buy at a price we are comfortable with and not at manipulated by the whales . For Filecoin chain , this did not exist till now, so our aim was to create one.
What it does
Cross Chain Limit Order Protocol to swap or buy assets on any chain at a fixed price . It is fully automated using Gelato to make the Smart Contracts actually smart and realise the full potential of building cross chain dApps using Axelar Network .
How we built it
Our Smart Contracts are our power and the most important component , created in Solidity and currently deployed on Filecoin HyperSpace , Polygon Mumbai , Goerli testnets for testing purposes.
We built this project with the use of DEXs like UNISWAP , that handles the exchange of assets through our contract ,when executed. We have plans to add OnChain aggregators like PARASWAP and 1INCH to provide the best rates to our users.
Cross chains calls are made along with assets bridging from source chain to destination chain using AXELAR Network . Assets include USDC , USDT , DAI , wAXL on 4 chains ETH , Filecoin, Polygon & ARBITRUM. We used axelar docs and guides to implement these functionalities
Automation was handled by GEALTO Automate , we create tasks in the backend on the destination chain , which checks if price matches the limit price set . That later triggers a Single execution to swap the assets.
Frontend is built using Next.js , Tailwind CSS , Axelar SDK , Uniswap SDK , Wagmi + Rainbowkit , Ethers
Challenges we ran into
At first , We struggled to estimate gas fees for all the tx included in a single call i.e. Axelar + Gelato for the limit orders. For axelar we paid gasFees at the time of tx directly and For gelato - 1 Balance was created and topped up.
Also getting assets to the FVM test chain was a challenge too , via the axelar protocol , to test our contracts and it was quite difficult for us to manage multiple chain and assets with their info prepared.
Accomplishments that we're proud of
This whole project was created in just a duration of 3 days starting with research , then contract creation , testing and deployment. We are proud to say that we performed the 1st CrossChain limit order transaction from Goerli to Mumbai and Swap WETH for WMATIC.
What we learned
We had not worked with cross chain dApps before , and this hackathon made us to learn about cross chain dApp more , especially the role of protocols like Axelar in creating an cross chain future.
We got to work quite in depth with Smart Contracts , creating payloads ,decoding and encoding ABIs in the contract side. Learnt a lot about how automation can completely transform the smart Contracts.
Did a quite an intensive research on DEXs and aggregators , in struggle to decide which could be the best ones for our protocol.
What's next for FTXSwap
We want to become a cross chain aggregator , enabling limit Swap across chain with the best pricing and lowest slippage possible with aggregators like ParaSwap and 1 inch with the use of Gelato web3 functions
Built With
- axelar
- etherjs
- gelato
- nextjs
- solidity
Log in or sign up for Devpost to join the conversation.