yearn / budget

yearn budget requests and audits
MIT License
37 stars 26 forks source link

Research and build Yearn consumer-faced app #219

Closed MarcoWorms closed 4 months ago

MarcoWorms commented 4 months ago

Scope

Yearn provides the best risk-adjusted yields in DeFi.

Today Yearn's interfaces make sure users can use Yearn contracts without resorting to etherscan or low-level rpc calls, and they also conveniently aggregate data. But these UIs feel like complex dashboards and doing any action often requires previous knowledge of what you want to do to take good decisions and follow if your decisions are paying off.

I want to propose an app for Yearn that goes above and beyond in reaching out to the user and helping them understand Yearn's greatest product: the best risk-adjusted yields in DeFi.

But how do we engage people in boring things like financial education and risk management? I propose to create a UI + protocol that helps people set financial goals through an extremely accessible interface, it gives them the tools to keep the money deposited and keep depositing frequently to hit their financial goals, and helps them liquidate positions if volatility happens. Here is the plan:

  1. Create the Liquidatooor protocol (this budget request is to research and build this part)
  2. Create the Goals interface, connect it with Liquidatooor
  3. Gamify the Goals interface

Since this is a big effort I broke it down into individual parts that can deliver value to Yearn when delivered independently.

The names proposed for each part are just temporary, we can find the best names in the building process.

Plan

The Liquidatooor (This request's scope)

This is a protocol that lets people set USD price ranges and batch liquidate Yearn vaults using cowswap. Here is a pseudo function of its interface:

const vaultTokens = [vaultToken1, vaultToken2, ...]

liquidateWhenAbove(totalUSDprice, vaultTokens, targetToken)
// or
liquidateWhenBelow(totalUSDprice, vaultTokens, targetToken)

cancelLiquidation(liquidationId)

Example usage: When you call liquidateWhenAbove (and assuming Liquidatooor has approved access to transfer the vaults) when the aggregate balance of the vaults in the vaultTokens array goes above the totalUSDprice, this would trigger to sell all positions in cowswap to targetToken. It also creates an ID for this liquidation order that can be canceled with cancelLiquidation()

Note: Selling vaults in cowswap uses the Yearn-made solver that already deposits/withdraws from vaults when no market liquidity is available, so the above process would have similar risks to just selling the underlying in cowswap

I will use the liquidator to then build the UI I proposed in the intro, and I believe it can also be used by a wide range of users with different risk appetites. It allows people to stay in Yearn vault positions while also setting stop-losses and take-profits range. As a Yearn user I feel this is a missing piece in our ecosystem today.

The Goals UI

With the liquidator shipped I will switch to making a UI where people can set financial goals and follow their Yearn positions and yield, and also get notified when their positions were liquidated. Here is a rough UX path:

The Goals UI gamification

This part makes sure there is constant engagement around the deposits and the UI, and I believe this can be achieved by bringing many of the well-tested gamification tactics from the mobile industry.

Let's reward users that deposit frequently by showing them nice information and stats of how much time they saved to hit that goal when taking into account the projected yield. People often get more serious about their finances once they start to see the compounding effects of yield in the long run. At 10% APY money doubles in 7 years and not in 10. Let's show these projections in an engaging way and find other exciting things that can engage people into hitting their goals. Here are behaviors that should be rewarded IMO:

And the "Rewards" here, like Duolingo, are just bragging rights and social leaderboards, and fireworks in the UI. The real reward is that user was able to save money and hit their goal, the gamification is just a way to digest financial education into the UI.

Deadline

2024-10-21 (assuming start at 2024-7-21)

People

I will solo build this, ofc with the help of all my frens around yearn, but I want to have the autonomy to research and ship this from end-to-end and I have the skills needed to build all parts

Money

Here are the funds I request to focus on building the Liquidatooor protocol:

I expect to deliver a functioning version of Liquidatooor by the end of these 3 months, similar to the proposed pseudocode. I believe this first part it's a good standalone product and is worth shipping it, it might be even more valuable than the UI.

I expect other parts to follow a similar timeline and budget if Liquidatooor goes well, so the complete project would take 9 months split across 3 requests (this being the first one). For the second UI part, I might get an external designer it would help make it extremely polished.

I will post weekly reports on this issue about progress in research and development because this is not something that is guaranteed to bring revenue to Yearn so at least let's guarantee it brings knowledge!

I'm very open to feedbacks, now and along the project!

Amount (Total)

15000 DAI + 3 YFI (as veYFI locked for 2 years)

Wallet address

0xB1d693B77232D88a3C9467eD5619FfE79E80BCCc

Reporting

Weekly

MarcoWorms commented 4 months ago

Updated the YFI comp part to use locked veYFI instead, I think this sets better alignment between me and this project bringing more TVL to yearn in the long term

MarcoWorms commented 4 months ago

I'm closing this request because I won't be able to work on it in anymore