Inspiration
Inspired by other projects like Harvest finance which helps users to optimise the yield generated with a simple interface. A project like Harvest Finance is currently missing on Stacks and the goal of this project is to see how the same kind of approach could be applied to Arkadiko.
What it does
This project aims to explore the potential of using Stacks Defi to provide a simple way to automatically compound your DIKO rewards to more LP from the Arkadiko protocol, removing the need to manually do many actions and optimise the yield.
First, you need to deploy the smart contracts for your wallet. Then deposit some STX-USDA LP tokens in the pool. When you call the compound function, the smart contracts automate a process that would be quite long to do manually:
- Claim all the pending DIKO rewards
- Swap 50% DIKO rewards to USDA
- Swap 50% DIKO rewards to STX
- Get STX-USDA LP tokens from the swap
- Stake the new LP tokens into the pool
How we built it
The repository is composed of clarity smart contracts and a simple react web interface written with next.js to interact with them. The smart contracts can be found in the clarity folder and the web interface in the app folder.
Challenges we ran into
As all the logic is based on the Arkadiko contracts I didn't manage to write local tests for the project. So I had to deploy the contract on mainnet and test it there every time I made a change to the contract. It made the process way longer than testing locally on devnet.
Accomplishments that we're proud of
After a few days, managed to get the contract working. Now one can deploy the contract and use the logic on the USDA-STX arkadiko pool and compound the LP tokens in a single click.
What we learned
Defi is really composable, I didn't have to ask Arkadiko if they had a public API, you just write your own logic and plug the contracts of other projects in the mix.
What's next for defi-arkadiko-compound
- The next big step is to modify the contract to make it work for multiple users in order to provide a simple UX for users
- Open to other Arkadiko pools
- Set a strategist fee on the Diko reward
- Investigate applying the same to other Defi projects (Alex, Stackswap...)
Log in or sign up for Devpost to join the conversation.