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

Commit

Permalink
eIP 52 implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
kasperpawlowski committed Mar 2, 2023
1 parent dfaa778 commit d297d9c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
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

0 comments on commit d297d9c

Please sign in to comment.