aave-protocol-v2/contracts/mocks/oracle/LendingRateOracle.sol
2020-10-15 15:41:56 +02:00

27 lines
877 B
Solidity

// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
import {ILendingRateOracle} from '../../interfaces/ILendingRateOracle.sol';
import {Ownable} from '../../dependencies/openzeppelin/contracts/Ownable.sol';
contract LendingRateOracle is ILendingRateOracle, Ownable {
mapping(address => uint256) borrowRates;
mapping(address => uint256) liquidityRates;
function getMarketBorrowRate(address _asset) external override view returns (uint256) {
return borrowRates[_asset];
}
function setMarketBorrowRate(address _asset, uint256 _rate) external override onlyOwner {
borrowRates[_asset] = _rate;
}
function getMarketLiquidityRate(address _asset) external view returns (uint256) {
return liquidityRates[_asset];
}
function setMarketLiquidityRate(address _asset, uint256 _rate) external onlyOwner {
liquidityRates[_asset] = _rate;
}
}