Looking for someone to help me write and deploy some contracts
Budget: $10 – $30 USD
You can do the following in python, JavaScript, or natively in Solidity, whatever you are most
comfortable with. You can use a testnet such as Kovan Network or set up your own local blockchain via
Ganache. Your task to create two smart contracts that can performs the functions below:
1. Set up a contract called PriceFeed that can read in price data for ETH (ETH/USDT, ETH/USDC,
ETH/DAI ect) on chain from any two decentralized exchanges of your choice. Every time the
function get_prices is called it should return the prices for ETH.
2. Set up a contract called Flashloan that can call the PriceFeed contract and store the prices
received from get_prices into global variables. The Flashloan contract should also have a
function called start_flashloan, when this function is called, it should attempt to borrow 100 Dai,
perform no trades, and simply return the Dai at the end + pay the fee. Perform the flashloan
using Aave.
3. The Flashloan contract should have another function called swap_tokens which takes in any two
tokens and converts token A into token B. Show that this works by integrating it with start_
flashloan going from the borrowed Dai to ETH, then call the function again to go from ETH back
to Dai before completing the flashloan.
comfortable with. You can use a testnet such as Kovan Network or set up your own local blockchain via
Ganache. Your task to create two smart contracts that can performs the functions below:
1. Set up a contract called PriceFeed that can read in price data for ETH (ETH/USDT, ETH/USDC,
ETH/DAI ect) on chain from any two decentralized exchanges of your choice. Every time the
function get_prices is called it should return the prices for ETH.
2. Set up a contract called Flashloan that can call the PriceFeed contract and store the prices
received from get_prices into global variables. The Flashloan contract should also have a
function called start_flashloan, when this function is called, it should attempt to borrow 100 Dai,
perform no trades, and simply return the Dai at the end + pay the fee. Perform the flashloan
using Aave.
3. The Flashloan contract should have another function called swap_tokens which takes in any two
tokens and converts token A into token B. Show that this works by integrating it with start_
flashloan going from the borrowed Dai to ETH, then call the function again to go from ETH back
to Dai before completing the flashloan.