This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# @version 0.3.10 | |
""" | |
@title SreUSD Rate Calculator | |
@notice Provides a per-second yield rate for sreUSD, based on current cycle data and stored assets | |
@author Curve.fi | |
""" | |
interface IResupplyVault: | |
def rewardsCycleData() -> (uint256, uint256, uint256): view | |
def storedTotalAssets() -> uint256: view |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# @version 0.3.10 | |
""" | |
@title fxSAVE Rate Calculator | |
@notice Calculates a per-second yield rate based on wstETH rewards using Curve's crvUSD oracle for price. | |
""" | |
interface IFxUSDBasePool: | |
def nav() -> uint256: view | |
def balanceOf(account: address) -> uint256: view |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# @version 0.3.10 | |
""" | |
@title sUSDe Rate Calculator | |
@notice Returns the per-second yield rate for sUSDe. | |
""" | |
interface ISUSDE: | |
def totalAssets() -> uint256: view | |
def vestingAmount() -> uint256: view |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# @version 0.3.10 | |
""" | |
@title sUSDS Rate Calculator | |
@notice Returns the per-second yield rate for sUSDS. | |
sUSDS exposes `ssr()` as a per-second compounding factor in 1e27 scale. | |
r_sec(1e18) = (ssr - 1e27) / 1e9 | |
""" | |
interface ISUSDS: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# @version 0.3.10 | |
""" | |
@title SDOLA Rate Calculator | |
@notice Provides a per-second yield rate for sDOLA, based on previous week rewards | |
@author Curve.fi | |
""" | |
interface IDolaVault: | |
def totalAssets() -> uint256: view | |
def weeklyRevenue(epoch: uint256) -> uint256: view |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# @version 0.3.10 | |
""" | |
@title fxSAVE Rate Calculator | |
@notice Calculates a per-second yield rate based on wstETH rewards using Curve's crvUSD oracle for price. | |
""" | |
interface IFxUSDBasePool: | |
def nav() -> uint256: view | |
def balanceOf(account: address) -> uint256: view |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# @version 0.3.10 | |
""" | |
@title SfrxusdMonetaryPolicy | |
@notice Based on SecondaryMonetaryPolicy, however following EMA of sfrxUSD yield rate | |
@author Curve.fi | |
@license Copyright (c) Curve.Fi, 2020-2024 - all rights reserved | |
""" | |
from vyper.interfaces import ERC20 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# @version 0.3.10 | |
""" | |
@title OracleProxy | |
@notice Oracle proxy allowing LlamaLend factory admin to set price oracle contract after deployment | |
@author Curve.Fi | |
@license MIT | |
""" | |
interface Factory: | |
def admin() -> address: view |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# @version 0.3.10 | |
""" | |
@title CryptoFromPoolsVaultWAgg | |
@notice Price oracle for chained pools (up to 8) combining crypto/crvUSD pricing and vault redemption rate. | |
It also references aggregated USD, so works for mint markets. | |
Only suitable for vaults which cannot be affected by donation attack (like sFRAX) | |
@author Curve.Fi | |
@license MIT | |
""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# @version 0.3.10 | |
""" | |
@title SemiLog monetary policy | |
@notice Monetary policy to calculate borrow rates in lending markets depending on utilization. | |
Unlike "core" policies, it does not depend on crvUSD price. | |
Calculated as: | |
log(rate) = utilization * (log(rate_max) - log(rate_min)) + log(rate_min) | |
e.g. | |
rate = rate_min * (rate_max / rate_min)**utilization | |
@author Curve.fi |
NewerOlder