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

Increase max collateral factor #419

Merged
merged 11 commits into from
Jul 15, 2024
2 changes: 1 addition & 1 deletion contracts/ComptrollerStorage.sol
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ contract ComptrollerStorage {
uint256 internal constant MAX_CLOSE_FACTOR_MANTISSA = 0.9e18; // 0.9

// No collateralFactorMantissa may exceed this value
uint256 internal constant MAX_COLLATERAL_FACTOR_MANTISSA = 0.9e18; // 0.9
uint256 internal constant MAX_COLLATERAL_FACTOR_MANTISSA = 0.95e18; // 0.95

/// Prime token address
IPrime public prime;
Expand Down
21 changes: 11 additions & 10 deletions deploy/004-swap-router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,17 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
autoMine: true,
skipIfAlreadyDeployed: true,
});

const comptrollerStablecoinsAddresses = (await deployments.get("Comptroller_Stablecoins")).address;
await deploy("SwapRouter_Stablecoins", {
contract: "SwapRouter",
from: deployer,
args: [wBNBAddress, pancakeFactoryAddress, comptrollerStablecoinsAddresses, vbnbAddress],
log: true,
autoMine: true,
skipIfAlreadyDeployed: true,
});
if (hre.network.name !== "bsctestnet") {
const comptrollerStablecoinsAddresses = (await deployments.get("Comptroller_Stablecoins")).address;
await deploy("SwapRouter_Stablecoins", {
contract: "SwapRouter",
from: deployer,
args: [wBNBAddress, pancakeFactoryAddress, comptrollerStablecoinsAddresses, vbnbAddress],
log: true,
autoMine: true,
skipIfAlreadyDeployed: true,
});
}

const comptrollerTronAddresses = (await deployments.get("Comptroller_Tron")).address;
await deploy("SwapRouter_Tron", {
Expand Down
3 changes: 1 addition & 2 deletions deploy/008-deploy-comptrollers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,15 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
);
const maxLoopsLimit = 100;

// Comptroller Beacon
const comptrollerImpl: DeployResult = await deploy("ComptrollerImpl", {
contract: "Comptroller",
from: deployer,
args: [poolRegistry.address],
log: true,
autoMine: true,
skipIfAlreadyDeployed: true,
});

// Comptroller Beacon
const comptrollerBeacon: DeployResult = await deploy("ComptrollerBeacon", {
contract: "UpgradeableBeacon",
from: deployer,
Expand Down
1 change: 1 addition & 0 deletions deploy/012-transfer-pools-ownership.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,5 @@ const transferSingleStepOwnerships = async (contractNames: string[], targetOwner
};

func.tags = ["TransferPoolsOwnership", "il"];
func.id = "transfer_pools_ownership"; // id required to prevent re-execution
export default func;
10 changes: 5 additions & 5 deletions deployments/ethereum.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
]
},
"ComptrollerImpl": {
"address": "0x13B3f65C0e2C64528F678B3C78ccac7341a2A66C",
"address": "0x25973b6BF39298D87B5498760a6c24CA06C3B40a",
"abi": [
{
"inputs": [
Expand All @@ -131,7 +131,7 @@
"type": "address"
},
{
"internalType": "enum ComptrollerStorage.Action",
"internalType": "enum Action",
"name": "action",
"type": "uint8"
}
Expand Down Expand Up @@ -393,7 +393,7 @@
},
{
"indexed": false,
"internalType": "enum ComptrollerStorage.Action",
"internalType": "enum Action",
"name": "action",
"type": "uint8"
},
Expand Down Expand Up @@ -845,7 +845,7 @@
"type": "address"
},
{
"internalType": "enum ComptrollerStorage.Action",
"internalType": "enum Action",
"name": "action",
"type": "uint8"
}
Expand Down Expand Up @@ -1865,7 +1865,7 @@
"type": "address[]"
},
{
"internalType": "enum ComptrollerStorage.Action[]",
"internalType": "enum Action[]",
"name": "actionsList",
"type": "uint8[]"
},
Expand Down
169 changes: 87 additions & 82 deletions deployments/ethereum/ComptrollerImpl.json

Large diffs are not rendered by default.

406 changes: 406 additions & 0 deletions deployments/ethereum/solcInputs/3cf93bd234aee0a62f57f3a0393a2ac0.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion deployments/ethereum_addresses.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"chainId": "1",
"addresses": {
"ComptrollerBeacon": "0xAE2C3F21896c02510aA187BdA0791cDA77083708",
"ComptrollerImpl": "0x13B3f65C0e2C64528F678B3C78ccac7341a2A66C",
"ComptrollerImpl": "0x25973b6BF39298D87B5498760a6c24CA06C3B40a",
"Comptroller_Core": "0x687a01ecF6d3907658f7A7c714749fAC32336D1B",
"Comptroller_Curve": "0x67aA3eCc5831a65A5Ba7be76BED3B5dc7DB60796",
"Comptroller_Liquid Staked ETH": "0xF522cd0360EF8c2FF48B648d53EA1717Ec0F3Ac3",
Expand Down
12 changes: 6 additions & 6 deletions deployments/sepolia.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
]
},
"ComptrollerImpl": {
"address": "0x7b5804A85fB05ebd70f525f06EcF3C238b57f585",
"address": "0xea4D6A5b13C3C9b1AeB13c64B84ff1B452804f4A",
"abi": [
{
"inputs": [
Expand All @@ -131,7 +131,7 @@
"type": "address"
},
{
"internalType": "enum ComptrollerStorage.Action",
"internalType": "enum Action",
"name": "action",
"type": "uint8"
}
Expand Down Expand Up @@ -393,7 +393,7 @@
},
{
"indexed": false,
"internalType": "enum ComptrollerStorage.Action",
"internalType": "enum Action",
"name": "action",
"type": "uint8"
},
Expand Down Expand Up @@ -845,7 +845,7 @@
"type": "address"
},
{
"internalType": "enum ComptrollerStorage.Action",
"internalType": "enum Action",
"name": "action",
"type": "uint8"
}
Expand Down Expand Up @@ -1865,7 +1865,7 @@
"type": "address[]"
},
{
"internalType": "enum ComptrollerStorage.Action[]",
"internalType": "enum Action[]",
"name": "actionsList",
"type": "uint8[]"
},
Expand Down Expand Up @@ -10969,7 +10969,7 @@
]
},
"PoolLens": {
"address": "0x88EEE51a178519Ffd386861F4B17F593af955c7c",
"address": "0xE4740d6C25D6CF4aE9DDbfE984f1C820A653318C",
"abi": [
{
"inputs": [
Expand Down
3 changes: 3 additions & 0 deletions deployments/sepolia/.migrations.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"transfer_pools_ownership": true
}
169 changes: 87 additions & 82 deletions deployments/sepolia/ComptrollerImpl.json

Large diffs are not rendered by default.

30 changes: 15 additions & 15 deletions deployments/sepolia/PoolLens.json

Large diffs are not rendered by default.

406 changes: 406 additions & 0 deletions deployments/sepolia/solcInputs/3cf93bd234aee0a62f57f3a0393a2ac0.json

Large diffs are not rendered by default.

256 changes: 256 additions & 0 deletions deployments/sepolia/solcInputs/a2f663b57eca5d5f8c043b9d37688ae3.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions deployments/sepolia_addresses.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"chainId": "11155111",
"addresses": {
"ComptrollerBeacon": "0x6cE54143a88CC22500D49D744fb6535D66a8294F",
"ComptrollerImpl": "0x7b5804A85fB05ebd70f525f06EcF3C238b57f585",
"ComptrollerImpl": "0xea4D6A5b13C3C9b1AeB13c64B84ff1B452804f4A",
"Comptroller_Core": "0x7Aa39ab4BcA897F403425C9C6FDbd0f882Be0D70",
"Comptroller_Curve": "0xD298182D3ACb43e98e32757FF09C91F203e9E67E",
"Comptroller_Liquid Staked ETH": "0xd79CeB8EF8188E44b7Eb899094e8A3A4d7A1e236",
Expand Down Expand Up @@ -35,7 +35,7 @@
"MockweETH": "0x3b8b6E96e57f0d1cD366AaCf4CcC68413aF308D0",
"NativeTokenGateway_vWETH_Core": "0xb8fD67f215117FADeF06447Af31590309750529D",
"NativeTokenGateway_vWETH_LiquidStakedETH": "0x1FD30e761C3296fE36D9067b1e398FD97B4C0407",
"PoolLens": "0x88EEE51a178519Ffd386861F4B17F593af955c7c",
"PoolLens": "0xE4740d6C25D6CF4aE9DDbfE984f1C820A653318C",
"PoolRegistry": "0x758f5715d817e02857Ba40889251201A5aE3E186",
"PoolRegistry_Implementation": "0x3213607Db41319E32C3706116Adf1Ae890E4083A",
"PoolRegistry_Proxy": "0x758f5715d817e02857Ba40889251201A5aE3E186",
Expand Down
Loading