Lender APY depends on a set of variables comprising the Pool state and a number of parameters. These variables are:
Weighted Average Loan APR
Borrow Rate (as a ratio of Borrowed Capital to Total Pool Capital)
Lending pools publicly provide information on Projected Lender APYs for current and arbitrary borrow rates. The Projected Lender APY is calculated in the following manner:
First, the Pool APY is calculated:
poolAPY=weightedAvgLoanAPR∗totalPoolCapitalborrowedCapital Next, the Protocol Fee APY is calculated, representing the portion of the Pool APY allocated to protocol fees:
protocolFeeAPY=poolAPY∗protocolEarningPercent Then, the portion of the APY corresponding to the First Loss Capital Provider’s leveraged earnings is calculated:
stakeToPoolRatio=totalPoolCapitalstakedCapital leveragedEarnPercent=stakeToPoolRatio∗(stakerEarnFactor−100%) stakerWithdrawbleAPY=(poolAPY−protocolFeeAPY)∗100%+leveragedEarnPercentleveragedEarnPercent Finally, the Lender APY is calculated as the difference between the Pool APY and the sum of the Protocol Fee APY and First Loss Capital Provider’s Withdrawable Earnings APY:
lenderAPY=poolAPY−(protocolFeeAPY+stakerWithdrawableAPY)