Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Uniswap Fee Getter #45

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ contract LenderCommitmentGroup_Smart is

IERC20 public principalToken;
IERC20 public collateralToken;
uint24 public uniswapPoolFee;

uint256 marketId;

Expand Down Expand Up @@ -174,6 +175,7 @@ contract LenderCommitmentGroup_Smart is

principalToken = IERC20(_principalTokenAddress);
collateralToken = IERC20(_collateralTokenAddress);
uniswapPoolFee = _uniswapPoolFee;

UNISWAP_V3_POOL = IUniswapV3Factory(UNISWAP_V3_FACTORY).getPool(
_principalTokenAddress,
Expand Down Expand Up @@ -717,6 +719,9 @@ contract LenderCommitmentGroup_Smart is
return totalPrincipalTokensLended - totalPrincipalTokensRepaid;
}




function getCollateralTokenAddress() external view returns (address) {
return address(collateralToken);
}
Expand Down Expand Up @@ -765,7 +770,7 @@ contract LenderCommitmentGroup_Smart is
getPoolTotalEstimatedValue() , 10000 ));
}


function getMinInterestRate() public view returns (uint16) {
return interestRateLowerBound + uint16( uint256(interestRateUpperBound-interestRateLowerBound).percent(getPoolUtilizationRatio()) );
}
Expand Down
Loading