project screenshot 1

UniCrop

Growing Crypto assets through yield Farming, Arbitrage, whether it is ERC20 or NFTs, through interchanging and cross-exchanging assets among themseleves.

UniCrop

Created At

UniCode

Project Description

UniCrop is about growing crypto assets, whether it is ERC20 or NFTs, through interchanging and cross-exchanging assets among themseleves. The asset can grow in many ways: staking/yield Farming, using Flashswap and leveraging Arbitrage opportunity, etc. For this project, we have implemented a Flashswap example with DAI/USDC using Uniswap V3 protocol.We initially tried to create a staking Yield Farming app using a scaffolding we already had. We wanted to stake WBTC and deposit in Compound Pool in Python based Brownie framework. We wanted to use Uniswap V3 Oracle for Price limit for harvesting and deploy to Optimism. But, due to lack of time, we ran into some roadblocks with the Brownie framework and pivoted to FlashSwap implementation.

How it's Made

  1. It lets your contract borrow 1,500 DAI from DAI/USDC pool with 0.05 % fee.

  2. The contract execute uniswapV3FlashCallback function. First, it swaps 1500 DAI for UNI on Kyber protocol (1500 DAI - 55.66 UNI )

  3. The contract swaps 55.66 UNI and swap them for DAI on Uniswap DAI/ETH 0.05% pool and UNI/ETH 0.05% pool.

  4. The contract pays back the amount with the pool fee ( 1500 DAI * (1 + 0.05%) = 1,500.75 DAI).

    If the transaction does not have enough amount tp pay back the borrowed amount, the whole transaction will be reverted.

background image mobile

Join the mailing list

Get the latest news and updates