# Borrow APY -> Deposit APY ```python= def apy(apr): return 2.718 ** (apr) - 1 ``` ```python= if borrowAPY < apy(slope_1): lendAPY = optimal/slpoe_1 * borrowAPY**2 * (1 - reserve) else: lendAPY = (1/slope_2 * (borrowAPY - slope_1) * (1 - optimal) + optimal) * borrowAPY * (1 - reserve) ``` ## Params ### DAI optimal = 0.8 slope_1 = 0.04 slope_2 = 0.75 reserve = 0.1 ### USDC optimal = 0.9 slope_1 = 0.04 slope_2 = 0.6 reserve = 0.1 ### USDT (same as USDC) optimal = 0.9 slope_1 = 0.04 slope_2 = 0.6 reserve = 0.1
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up