I woke up on Saturday morning (10/23/2021). It was 9 am. My mom had just gotten back from the grocery store. She complained to me that the groceries were too expensive and her salary wasn't keeping up. "Damn," I thought, "sounds like a problem for deFi smart-contracts to solve!"
What it does
These smart contracts pay employees their inflation-adjusted salary based on the most recent API.
How we built it
Chainlink keepers automatically trigger the smart contracts to pay employees when it's time. Chainlink API functions get the latest cpi from the BLS. Uniswap lets the company/employer store their assets in whatever currency they want but can swap to the employee's preferred currency/token when it comes time to pay them. Right now, the employer has to keep lots of cash in the smart-contract to pay the employees. In the future, we want this cash to always be in use, so the employer could add it to a Uniswap liquidity pool or lend it out to earn yields. We read the Solidity, Uniswap, and Chainlink docs. A few StackExchange/StackOverflow Q&As also helped.
Challenges we ran into
Time was our biggest challenge. We started coding at 9 am 10/23/2021 and realized we couldn't fully finish the implementations of all the functions. I don't like staying up until 2 am coding so at about 9 pm 10/23/2021 I decided to call it a night and submit what I have. I hope the judges will get the idea.
Accomplishments that we're proud of
I've never used Chainlink keepers so I was stoked to successfully use them. I tested my Chainlink keepers functions in Remix and they worked great!
What we learned
I learned a lot about Solidity mappings, Uniswap v3, and Chainlink keepers.
What's next for Inflation Adjusted Salary
I'm not sure if there's already an app that does this, but I want to add a plug-in or separate app that lets anybody pay and receive in whatever crypto they want. Eg. let's say you go to the grocery store and the cashier asks for 20 USDC but all you want to own and carry is ETH. You should be able to put 20 USDC into your app, see the ETH conversion, hit confirm, and then the app automatically takes whatever currency you have (ETH in this case) does a swap on Uniswap, and transfers it to the cashier all in one transaction.