Skip to content
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

Add bLUSD APR and Yield amplification stat #902

Merged
merged 2 commits into from
Sep 28, 2022

Conversation

edmulraney
Copy link
Contributor

Use Yearn to get yield rates of LUSD-3CRV and Stability Pool strategies, then use these rates to calculate bLUSD's APR and Yield amplification.

Example usage on our Goerli testnet game:
image

treasury.pending.add(treasury.reserve)
);
const permanentYield = cachedYearnApys.lusd3Crv.mul(treasury.permanent);
const overallApr = pendingAndReserveYield.add(permanentYield).div(bLusdSupply);
Copy link
Collaborator

@danielattilasimon danielattilasimon Sep 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be divided by treasury.reserve instead of bLusdSupply?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How come?

Its basically adding the yield sources and working out how much yield 1 bLUSD is receiving in comparison to staking 1 LUSD in the Stability Pool yourself.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it depends on how we want to define yield amplification.

Consider this: let's say the system runs long enough for the backing ratio to increase to 3x. Let's also say bonding is no longer attractive, as such there's no pending bucket. The size of the permanent bucket is 10% that of the reserve. For simplicity, let's say both buckets earn 10% APR. What's the yield amplification in this case?

If we divide by bLUSD supply: 3.3X
If we divide by the reserve: 1.1X

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that's a good point. I guess the reserve controls the min market price too (redemption price), not the bLUSD supply.

I'll switch it to the reserve now, thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Goerli with the adjusted formula:

image

@edmulraney edmulraney merged commit 2fdd5a4 into main Sep 28, 2022
@edmulraney edmulraney deleted the blusd-apr-and-yield-amplification branch September 28, 2022 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants