Skip to content

Commit

Permalink
chore: aUSDC
Browse files Browse the repository at this point in the history
  • Loading branch information
zhoujia6139 committed Dec 7, 2023
1 parent fc6438d commit 8b1c2ee
Show file tree
Hide file tree
Showing 11 changed files with 59 additions and 12 deletions.
6 changes: 0 additions & 6 deletions .husky/pre-push

This file was deleted.

2 changes: 1 addition & 1 deletion helper-hardhat-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export const NETWORKS_RPC_URL: iParamsPerNetwork<string> = {
[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]:
Expand Down
2 changes: 1 addition & 1 deletion helpers/hardhat-constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion helpers/init-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = (
Expand Down
2 changes: 2 additions & 0 deletions helpers/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,7 @@ export interface iAssetBase<T> {
DAI: T;
WETH: T;
USDC: T;
aUSDC: T;
USDT: T;
FRAX: T;
WBTC: T;
Expand Down Expand Up @@ -591,6 +592,7 @@ export enum ERC20TokenContractId {
DAI = "DAI",
WETH = "WETH",
USDC = "USDC",
aUSDC = "aUSDC",
USDT = "USDT",
FRAX = "FRAX",
WBTC = "WBTC",
Expand Down
10 changes: 9 additions & 1 deletion market-config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ import {
strategyEXRP,
strategyuBAYC,
strategyuPPG,
strategyAUSDC,
} from "./reservesConfigs";

export const CommonConfig: Pick<
Expand Down Expand Up @@ -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: {},
Expand All @@ -694,6 +701,7 @@ export const ParaxDevConfig: IParaSpaceConfiguration = {
BLOCKS: strategyBLOCKS,
SEWER: strategySEWER,
PPG: strategyPudgyPenguins,
aUSDC: strategyAUSDC,
},
};

Expand Down
2 changes: 2 additions & 0 deletions market-config/mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down Expand Up @@ -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(),
Expand Down
8 changes: 8 additions & 0 deletions market-config/rateStrategies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
18 changes: 18 additions & 0 deletions market-config/reservesConfigs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import {
rateStrategyAAVE,
rateStrategyAPE,
rateStrategyARB,
rateStrategyaUSDC,
rateStrategyBAL,
rateStrategyBLUR,
rateStrategyCRV,
Expand Down Expand Up @@ -114,6 +115,7 @@ import {
timeLockStrategyEXRP,
timeLockStrategyuPPG,
timeLockStrategyuBAYC,
timeLockStrategyaUSDC,
} from "./timeLockStrategies";

export const strategyDAI: IReserveParams = {
Expand Down Expand Up @@ -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,
Expand Down
12 changes: 12 additions & 0 deletions market-config/timeLockStrategies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
6 changes: 4 additions & 2 deletions scripts/upgrade/ntoken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 8b1c2ee

Please sign in to comment.