Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

eIP 52 implementation #195

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions contracts/Constants.sol
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ abstract contract Constants {
uint internal constant MODULEID__IRM_CLASS__LIDO = 2_000_504;
uint internal constant MODULEID__IRM_CLASS__USDT = 2_000_505;
uint internal constant MODULEID__IRM_CLASS__OHM = 2_000_506;
uint internal constant MODULEID__IRM_CLASS__LSD = 2_000_507;

// Swap types
uint internal constant SWAP_TYPE__UNI_EXACT_INPUT_SINGLE = 1;
Expand Down
14 changes: 14 additions & 0 deletions contracts/modules/interest-rate-models/IRMClassLSD.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// SPDX-License-Identifier: GPL-2.0-or-later

pragma solidity ^0.8.0;

import "../../BaseIRMLinearKink.sol";


contract IRMClassLSD is BaseIRMLinearKink {
constructor(bytes32 moduleGitCommit_)
BaseIRMLinearKink(MODULEID__IRM_CLASS__LSD, moduleGitCommit_,
// Base=0% APY, Kink(70%)=5% APY Max=200% APY
0, 514255952, 25819008208, 3006477107
) {}
}
8 changes: 4 additions & 4 deletions contracts/modules/interest-rate-models/IRMClassLido.sol
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ contract IRMClassLido is BaseIRM {
lidoOracle = 0x442af784A788A5bd6F42A01Ebe9F287a871243fb;
stETH = 0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84;

// Base=Lido APY, Kink(80%)=8% APY Max=200% APY
slope1 = 709783723;
slope2 = 37689273223;
kink = 3435973836;
// Base=Lido APY, Kink(70%)=5% APY Max=200% APY
slope1 = 514255952;
slope2 = 25819008208;
kink = 3006477107;
}

function computeInterestRateImpl(address, uint32 utilisation) internal override returns (int96) {
Expand Down