diff --git a/.husky/pre-push b/.husky/pre-push deleted file mode 100755 index 4779cffc9..000000000 --- a/.husky/pre-push +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env sh -. "$(dirname -- "$0")/_/husky.sh" - -yarn typechain -yarn lint -yarn size diff --git a/helper-hardhat-config.ts b/helper-hardhat-config.ts index c8c8c6806..f6412aeb4 100644 --- a/helper-hardhat-config.ts +++ b/helper-hardhat-config.ts @@ -93,7 +93,7 @@ export const NETWORKS_RPC_URL: iParamsPerNetwork = { [eEthereumNetwork.paraxDev]: L2_RPC_URL || RPC_URL || - `https://nitrorpc-widespread-brown-mosquito-de4v5k1jm5.t.conduit.xyz`, + `https://nitrorpc-compact-lime-moose-5r7g6fkl78.t.conduit.xyz`, [eEthereumNetwork.polygon]: RPC_URL || `https://polygon-mainnet.g.alchemy.com/v2/${ALCHEMY_KEY}`, [eEthereumNetwork.polygonMumbai]: diff --git a/helpers/hardhat-constants.ts b/helpers/hardhat-constants.ts index 93a986c2f..23975bbb7 100644 --- a/helpers/hardhat-constants.ts +++ b/helpers/hardhat-constants.ts @@ -26,7 +26,7 @@ export const SEPOLIA_CHAINID = 11155111; export const FORK_CHAINID = 522; export const MAINNET_CHAINID = 1; export const PARALLEL_CHAINID = 1592; -export const PARAX_DEV_CHAINID = 4009937698923195; +export const PARAX_DEV_CHAINID = 3163830386846714; export const MOONBEAM_CHAINID = 1284; export const MOONBASE_CHAINID = 1287; export const ARBITRUM_ONE_CHAINID = 42161; diff --git a/helpers/init-helpers.ts b/helpers/init-helpers.ts index a8cb6c807..70508561f 100644 --- a/helpers/init-helpers.ts +++ b/helpers/init-helpers.ts @@ -420,7 +420,8 @@ export const initReservesByHelper = async ( variableDebtTokenToUse = stKSMVariableDebtTokenImplementationAddress; } else if ( reserveSymbol === ERC20TokenContractId.aWETH || - reserveSymbol === ERC20TokenContractId.awstETH + reserveSymbol === ERC20TokenContractId.awstETH || + reserveSymbol === ERC20TokenContractId.aUSDC ) { if (!pTokenATokenImplementationAddress) { pTokenATokenImplementationAddress = ( diff --git a/helpers/types.ts b/helpers/types.ts index 7cdf7da7e..015bd4126 100644 --- a/helpers/types.ts +++ b/helpers/types.ts @@ -458,6 +458,7 @@ export interface iAssetBase { DAI: T; WETH: T; USDC: T; + aUSDC: T; USDT: T; FRAX: T; WBTC: T; @@ -591,6 +592,7 @@ export enum ERC20TokenContractId { DAI = "DAI", WETH = "WETH", USDC = "USDC", + aUSDC = "aUSDC", USDT = "USDT", FRAX = "FRAX", WBTC = "WBTC", diff --git a/market-config/index.ts b/market-config/index.ts index f18fda770..e20c29968 100644 --- a/market-config/index.ts +++ b/market-config/index.ts @@ -78,6 +78,7 @@ import { strategyEXRP, strategyuBAYC, strategyuPPG, + strategyAUSDC, } from "./reservesConfigs"; export const CommonConfig: Pick< @@ -667,9 +668,15 @@ export const ParaxDevConfig: IParaSpaceConfiguration = { ...CommonConfig, ParaSpaceTeam: "0x018281853eCC543Aa251732e8FDaa7323247eBeB", Treasury: "0x018281853eCC543Aa251732e8FDaa7323247eBeB", + ParaSpaceAdmin: "0x28abAC3E3F1fbC8Aa4Ded74C1589026038f889d8", + EmergencyAdmins: ["0x28abAC3E3F1fbC8Aa4Ded74C1589026038f889d8"], + RiskAdmin: "0x28abAC3E3F1fbC8Aa4Ded74C1589026038f889d8", + GatewayAdmin: "0x28abAC3E3F1fbC8Aa4Ded74C1589026038f889d8", YogaLabs: {}, Uniswap: {}, - Tokens: {}, + Tokens: { + aUSDC: "0x259CdA67f5a3836aEBb207b94f0b57f548921631", + }, Marketplace: {}, Chainlink: {}, BendDAO: {}, @@ -694,6 +701,7 @@ export const ParaxDevConfig: IParaSpaceConfiguration = { BLOCKS: strategyBLOCKS, SEWER: strategySEWER, PPG: strategyPudgyPenguins, + aUSDC: strategyAUSDC, }, }; diff --git a/market-config/mocks.ts b/market-config/mocks.ts index 6d4fdc362..19c131648 100644 --- a/market-config/mocks.ts +++ b/market-config/mocks.ts @@ -6,6 +6,7 @@ export const MOCK_CHAINLINK_AGGREGATORS_PRICES = { // ERC20 DAI: parseEther("0.000908578801039414").toString(), USDC: parseEther("0.000915952223931999").toString(), + aUSDC: parseEther("0.000477910115122588").toString(), USDT: parseEther("0.000915952223931999").toString(), FRAX: parseEther("0.000915952223931999").toString(), WETH: parseEther("1").toString(), @@ -72,6 +73,7 @@ export const MOCK_CHAINLINK_AGGREGATORS_USD_PRICES = { // ERC20 DAI: parseUnits("1", 8).toString(), USDC: parseUnits("1", 8).toString(), + aUSDC: parseUnits("1", 8).toString(), USDT: parseUnits("1", 8).toString(), FRAX: parseUnits("1", 8).toString(), WETH: parseUnits("1896", 8).toString(), diff --git a/market-config/rateStrategies.ts b/market-config/rateStrategies.ts index 3d3cc4b67..2c8b2ddaf 100644 --- a/market-config/rateStrategies.ts +++ b/market-config/rateStrategies.ts @@ -17,6 +17,14 @@ export const rateStrategyUSDC: IInterestRateStrategyParams = { variableRateSlope2: utils.parseUnits("0.60", 27).toString(), }; +export const rateStrategyaUSDC: IInterestRateStrategyParams = { + name: "rateStrategyaUSDC", + optimalUsageRatio: utils.parseUnits("0.9", 27).toString(), + baseVariableBorrowRate: utils.parseUnits("0", 27).toString(), + variableRateSlope1: utils.parseUnits("0.04", 27).toString(), + variableRateSlope2: utils.parseUnits("0.60", 27).toString(), +}; + export const rateStrategyUSDT: IInterestRateStrategyParams = { name: "rateStrategyUSDT", optimalUsageRatio: utils.parseUnits("0.9", 27).toString(), diff --git a/market-config/reservesConfigs.ts b/market-config/reservesConfigs.ts index 70c0ea388..e498a748d 100644 --- a/market-config/reservesConfigs.ts +++ b/market-config/reservesConfigs.ts @@ -28,6 +28,7 @@ import { rateStrategyAAVE, rateStrategyAPE, rateStrategyARB, + rateStrategyaUSDC, rateStrategyBAL, rateStrategyBLUR, rateStrategyCRV, @@ -114,6 +115,7 @@ import { timeLockStrategyEXRP, timeLockStrategyuPPG, timeLockStrategyuBAYC, + timeLockStrategyaUSDC, } from "./timeLockStrategies"; export const strategyDAI: IReserveParams = { @@ -148,6 +150,22 @@ export const strategyUSDC: IReserveParams = { supplyCap: "0", }; +export const strategyAUSDC: IReserveParams = { + strategy: rateStrategyaUSDC, + auctionStrategy: auctionStrategyZero, + timeLockStrategy: timeLockStrategyaUSDC, + baseLTVAsCollateral: "8700", + liquidationThreshold: "8900", + liquidationProtocolFeePercentage: "0", + liquidationBonus: "10450", + borrowingEnabled: true, + reserveDecimals: "6", + xTokenImpl: eContractid.PTokenATokenImpl, + reserveFactor: "1000", + borrowCap: "0", + supplyCap: "0", +}; + export const strategyUSDT: IReserveParams = { strategy: rateStrategyUSDT, auctionStrategy: auctionStrategyZero, diff --git a/market-config/timeLockStrategies.ts b/market-config/timeLockStrategies.ts index 14fa32282..fe705e005 100644 --- a/market-config/timeLockStrategies.ts +++ b/market-config/timeLockStrategies.ts @@ -13,6 +13,18 @@ export const timeLockStrategyUSDC: ITimeLockStrategyParams = { period: "86400", }; +export const timeLockStrategyaUSDC: ITimeLockStrategyParams = { + name: "timeLockStrategyaUSDC", + minThreshold: parseUnits("105000", 6).toString(), + midThreshold: parseUnits("400000", 6).toString(), + minWaitTime: "12", + midWaitTime: "7200", + maxWaitTime: "21600", + poolPeriodWaitTime: "600", + poolPeriodLimit: parseUnits("1875000", 6).toString(), + period: "86400", +}; + export const timeLockStrategyUSDT: ITimeLockStrategyParams = { name: "timeLockStrategyUSDT", minThreshold: parseUnits("105000", 6).toString(), diff --git a/scripts/upgrade/ntoken.ts b/scripts/upgrade/ntoken.ts index ba3ca36f6..21713a50b 100644 --- a/scripts/upgrade/ntoken.ts +++ b/scripts/upgrade/ntoken.ts @@ -76,12 +76,14 @@ export const upgradeNToken = async (verify = false) => { continue; } - if (XTOKEN_SYMBOL_UPGRADE_WHITELIST && !XTOKEN_SYMBOL_UPGRADE_WHITELIST.includes(symbol)) { + if ( + XTOKEN_SYMBOL_UPGRADE_WHITELIST && + !XTOKEN_SYMBOL_UPGRADE_WHITELIST.includes(symbol) + ) { console.log(symbol + "not in XTOKEN_SYMBOL_UPGRADE_WHITELIST, skip..."); continue; } - if (xTokenType == XTokenType.NTokenBAYC) { if (!nTokenBAYCImplementationAddress) { console.log("deploy NTokenBAYC implementation");