This repository contains advanced features to improve SparkLend beyond the core contracts. This repository is mostly focused on improving security and automating governance processes.
Please note all these oracles are designed for consumption by AaveOracle
which assumes 8 decimal places.
FixedPriceOracle: A hardcoded oracle price that never changes. Used for: DAI/USDC/USDT markets
CappedOracle: Returns min(market price, hardcoded max price)
. Not currently used.
WSTETHExchangeRateOracle: Provides wstETH/USD by multiplying the wstETH exchange rate by ETH/USD. Used for: wstETH market
RETHExchangeRateOracle: Provides rETH/USD by multiplying the rETH exchange rate by ETH/USD. Used for: rETH market
WEETHExchangeRateOracle: Provides weETH/USD by multiplying the weETH exchange rate by ETH/USD. Used for: weETH market
MorphoUpgradableOracle: Allows Spark Governance to change an oracle for Morpho Blue markets. Planned to be used in Morpho Blue.
VariableBorrowInterestRateStrategy: Modified version of DefaultReserveInterestRateStrategy
that removes the stable borrow logic.
RateTargetBaseInterestRateStrategy: Overridden version of VariableBorrowInterestRateStrategy
that sets the base variable borrow rate to match an external rate source with a fixed spread. Used for: DAI market
RateTargetKinkInterestRateStrategy: Overridden version of VariableBorrowInterestRateStrategy
that sets the variable slope 1 rate to match an external rate source with a fixed spread. Used for: ETH/USDC/USDT markets
PotRateSource: Adapter to convert DSR into APR which can be consumed by one of the rate target interest rate strategies. Used for: DAI/USDC/USDT markets
CappedFallbackRateSource: Wraps another rate source, caps the rate and protects against reverts with a fallback value. Used for: ETH market
forge build
forge test
The IP in this repository was assigned to Mars SPC Limited in respect of the MarsOne SP