Inspiration

Fantom is a network for finance , and we have built defi tools to take Fantom a level up in category of DeFi. We have also built a collection of smart-contracts as npm package that would be helpful for anyone who wants to build on top of Fantom-Chain.

What it does

Fantom-Dex gives offers a varity of DeFi features for your daily use built on top of Fantom-Chain.

Fantom-Fi offers following features:

Swapping: Fantom-Fi consists of an entire swap that allows you to swap your tokens in the smoothest way possible, giving you a uniswap like swapping experience

Staking: Fantom-Fi allows you to stake your tokens in the smart contract as well as unstake them whenever needed, it also allows you to claim the rewards whenever the user wished.

Lending: Fantom-Fi allows users to lend different tokens including customly deployed ones, users can also borrow, withdraw, Repay and supply tokens by interacting with the lending-contract.

Liquidity Pool: Fantom-Fi allows users to create pool as well as adding and removing liquidity with three different tokens by depositing amount.

Price Oracle: Fantom-Fi has on chain pricefeeds from the pools not making users reliant on other protocols at all and simplifying the process with this feature.

How we built it

Fantom-Fi project contains a total of 22 smart-contracts, each contract responsible for a certain functionality. We integrated these contracts with a user friendly front-end to offer seamless DEX like experience. The front-end is built using NextJs and TailwindCSS and for smart-contracts we used Solidity.

We also built a collection of reusable smart-contracts as npm-package, using which anyone can build more DeFi tools on top of Fantom Chain

https://www.npmjs.com/package/xdefi-contracts

The frontend is built with Next.js and React.js. , We are using Wagmi.js & ethers.js for integration with the blockchain . Figma was used to create UI UX of the platform . Tailwind CSS was used to design the platform . Rainbowkit was used for Wallet Connections.

Challenges we ran into

This was a large scale project where we had 22 contracts to manage in the backend , which was a bit of chaos. But the structure we followed helped us to divide the main contracts , required for Frontend Interaction from the Core protocols .

Also integrating this into the interface , was a big task here ,as we had to also look for all types of token allowances and other conditions such as in case of FTM native token. These parts were quite challenging to work with in the frontend logic , and we spent a lot of time to ensure , that every type of condition would go through.

Accomplishments that we're proud of

We were able finish the integration on time submit a working project, this makes us proud. We are very happy to contribute to Fantom chain with a variety of DeFi tools combined in a DEX , under a single platform

What we learned

Working with Fantom Chain on a this large of a project was new to us, we learnt to deploy and integrate smart-contracts with Fantom chain .

What's next for Fantom-fi

Fantom-Fi has been an amazing project to learn from and the chain Fantom is quiet a fascinating chain with most of it's own tools to work with and as emerging and enthusiastic builders we are all up for the challenge to improve and consistently work on the product. We are also planning on adding more stuff to build on for users to make building in DeFi with Fantom a lot more convenient and easier.

Built With

Share this project:

Updates