Thursday, August 25, 2022

Leveraged APY quiz answers

These are the answers to the Leveraged APY pop-quiz

1. How much is principal: $7,463.98 


... you may have invested all the supply, but, at the end of the day the principal is what you have when you exit the protocol.

2. How much is leveraged? I think a more appropriate question is: how much money is this net APY paying on. That's the question. And the answer is: $26,948.76

3. My working definition of 'real APY' is: 'what is the realized APY on the principal?' as opposed the the net APY on the leverage.

The next answer may be a multiparter, just so you know.

4. What wasn't asked was: "what is the overall 1-year gain?" So: what is the overall 1-year gain?

$492.21


How was the distribution computed? We used the 'Pert'-formula.

new principal = principal * exp(rate x time)

'Pert'

Then we subtract the starting principal from the new principal to determine the distribution.

To compute the 'real APY' we use that distribution and the un-leveraged principal to compute the rate:

new principal = principal + distribution = $7,956.19

And plug everything into the Pert-formula, solving for rate to get real APY.

The real APY? 6.39%


D-mn. 😱😱😱

Now, recall, that @BenqiFinance reported my net APY to be 1.81%, but my REAL APY is 6.39%.

This, ladies and gentlemen, is the power of leverage: I'm getting paid distribution yields on borrowed assets, or, as I call it: "Other People's Money."

SWEET.

BONUS 

Pop-quiz, à la Rust!

Write a Rust program that takes Supply, Borrow, and net APY as arguments and returns the real APY.

SPREADSHEET (Leverage tab)


No comments:

Post a Comment