Skip to content

Commit

Permalink
Merge branch 'feat/sepolia' of ssh://github.com/para-space/paraspace-…
Browse files Browse the repository at this point in the history
…core into feat/sepolia
  • Loading branch information
GopherJ committed Dec 22, 2023
2 parents 5bf41f0 + 8b1c2ee commit 20a316f
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 10 deletions.
6 changes: 0 additions & 6 deletions .husky/pre-push

This file was deleted.

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 20a316f

Please sign in to comment.