-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: Onchainkit Defi Supply/Withdraw/Interest component #1046
Comments
Interesting! Tell me more, how you think these component should look or be used? |
I am imagining something like your current swap UI. I want to build a 3 section tab (Assets (clean render from cdp_listBalances), Swap (exists), Invest (what we are describing)). Instead of the top section saying "Sell", it would say "Supply" and the token select would be one of the possible tokens that you can deposit into Defi (USDC into compound for the initial case) The balance would render what is currently in the wallet initially let's say 50 USDC. Instead of the bottom section saying "Buy" it would say "Deposited & Yielding" It would show the current amount in compound that is generating yield with the point in time interest rate. Let's say I have 25 USDC deposited growing at 3% (changes block to block, I have a sample calc below) Both sections have a 25%,50%,Max button to populate/change the counter for how much we will supply and/or withdraw drawing from erc20 balance calls. Lastly, the swap button would be split into two buttons (Supply & Withdraw) which does the respective compound commands: Sample Withdraw Code:
Sample Supply Code:
Sample USDC interest rate code:
|
Describe the solution you'd like
It would be great to have high quality components for Defi in this kit. I would personally focus on Compound first with Aave and Moonwell as fast-follows.
Describe alternatives you've considered.
For Onchain summer I worked on a chores/app with USDC for children and did direct calls to the compound (Base) contracts, but it was clunky.
The text was updated successfully, but these errors were encountered: