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.
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