mirror of
				https://github.com/Instadapp/aave-protocol-v2.git
				synced 2024-07-29 21:47:30 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			27 lines
		
	
	
		
			877 B
		
	
	
	
		
			Solidity
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			877 B
		
	
	
	
		
			Solidity
		
	
	
	
	
	
| // SPDX-License-Identifier: agpl-3.0
 | |
| pragma solidity 0.6.12;
 | |
| 
 | |
| 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;
 | |
|   }
 | |
| }
 | 
