š°Yield Calculation
Last updated
Last updated
In Stella, the definition of "Yield" is the remaining value of the position in US dollars at the time of closing the position after repaying the debts and returning the leveragoorsā initial input.
Where the value of each part is calculated as follows
In Stella, we need to calculate the annualized yield in order to determine how much profit should be shared between the lenders and leveragoors
Alice input 1000 USDC and open a position with leverage 4x on Uniswap V3 ETH/USDC 0.3% strategy by borrowing 2 ETH and 1000 USDC where ETH@1000
As time passed for exactly 30 days, Alice's position accrue the trading fee and her current position composition is 2.1 ETH + 2100 USDC where ETH price is still the same @1000
Alice closes the position getting the yield of $200 over 30 days
So, Alice's position yield is
Yield = $200
Annualized Yield = 60.83%
= timestamp at the the time of closing the position
= timestamp at the time where the position was opened