Skip to content

Commit

Permalink
Add frax stable pool (#486)
Browse files Browse the repository at this point in the history
* add frax-usdc stable pool

* add new Tag for frax pool

---------

Co-authored-by: xieqian <[email protected]>
  • Loading branch information
xieqiancaosissi and xieqian authored Mar 8, 2024
1 parent d610d92 commit 8865532
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 36 deletions.
6 changes: 3 additions & 3 deletions src/pages/pools/LiquidityPage/LiquidityPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ import {
REF_UNI_V3_SWAP_CONTRACT_ID,
USDTT_USDCC_USDT_USDC_POOL_ID,
USDT_USDC_POOL_ID,
// FRAX_USDC_POOL_ID,
FRAX_USDC_POOL_ID,
} from '../../../services/near';
import { WatchListStartFull } from '../../../components/icon/WatchListStar';
import _, { orderBy, sortBy, filter } from 'lodash';
Expand Down Expand Up @@ -2313,8 +2313,8 @@ function StablePoolCard({
const isMobile = useClientMobile();
const is_new_pool =
poolData.pool.id == USDTT_USDCC_USDT_USDC_POOL_ID ||
poolData.pool.id == USDT_USDC_POOL_ID;
// poolData.pool.id == FRAX_USDC_POOL_ID;
poolData.pool.id == USDT_USDC_POOL_ID ||
poolData.pool.id == FRAX_USDC_POOL_ID;
return (
<div
className="mb-4 xs:mb-2 md:mb-2"
Expand Down
6 changes: 3 additions & 3 deletions src/pages/pools/poolsComponents/StablePoolList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
USD_CLASS_STABLE_POOL_IDS,
USDTT_USDCC_USDT_USDC_POOL_ID,
USDT_USDC_POOL_ID,
// FRAX_USDC_POOL_ID,
FRAX_USDC_POOL_ID,
} from 'src/services/near';
import _, { find } from 'lodash';
import { FormattedMessage } from 'react-intl';
Expand Down Expand Up @@ -344,8 +344,8 @@ function StablePoolCard({
const isMobile = useClientMobile();
const is_new_pool =
poolData.pool.id == USDTT_USDCC_USDT_USDC_POOL_ID ||
poolData.pool.id == USDT_USDC_POOL_ID;
// poolData.pool.id == FRAX_USDC_POOL_ID;
poolData.pool.id == USDT_USDC_POOL_ID ||
poolData.pool.id == FRAX_USDC_POOL_ID;
return (
<div
className="mb-4 xs:mb-2 md:mb-2"
Expand Down
42 changes: 20 additions & 22 deletions src/services/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ export default function getConfig(
'2497',
'2194',
'2320',
'4514',
],
FARM_LOCK_SWITCH: process.env.FARM_LOCK_SWITCH || 0,
VotingGauge: ['10%', '10%'],
Expand Down Expand Up @@ -265,15 +264,15 @@ export default function getConfig(
'a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48.factory.bridge.near',
],
USDT_USDC_POOL_ID: process.env.USDT_USDC_POOL_ID || 4513,
// FRAX_USDC_POOL_ID: process.env.FRAX_USDC_POOL_ID || 4514,
FRAX_USDC_POOL_ID: process.env.FRAX_USDC_POOL_ID || 4514,
USDT_USDC_TOKEN_IDS: [
'usdt.tether-token.near',
'17208628f84f5d6ad33f0da3bbbeb27ffcb398eac501a31bd6ad2011e36133a1',
],
// FRAX_USDC_TOKEN_IDS: [
// '853d955acef822db058eb8505911ed77f175b99e.factory.bridge.near',
// '17208628f84f5d6ad33f0da3bbbeb27ffcb398eac501a31bd6ad2011e36133a1',
// ],
FRAX_USDC_TOKEN_IDS: [
'853d955acef822db058eb8505911ed77f175b99e.factory.bridge.near',
'17208628f84f5d6ad33f0da3bbbeb27ffcb398eac501a31bd6ad2011e36133a1',
],
BLACK_TOKEN_LIST: ['token.pembrock.near'],
REF_MEME_FARM_CONTRACT_ID:
process.env.REF_MEME_FARM_CONTRACT_ID ||
Expand Down Expand Up @@ -571,7 +570,6 @@ export default function getConfig(
'2497',
'2194',
'2320',
'4514',
],

FARM_LOCK_SWITCH: process.env.FARM_LOCK_SWITCH || 0,
Expand All @@ -594,15 +592,15 @@ export default function getConfig(
USDTT_USDCC_USDT_USDC_POOL_ID:
process.env.USDTT_USDCC_USDT_USDC_POOL_ID || 4179,
USDT_USDC_POOL_ID: process.env.USDT_USDC_POOL_ID || 4513,
// FRAX_USDC_POOL_ID: process.env.FRAX_USDC_POOL_ID || 4514,
FRAX_USDC_POOL_ID: process.env.FRAX_USDC_POOL_ID || 4514,
USDT_USDC_TOKEN_IDS: [
'usdt.tether-token.near',
'17208628f84f5d6ad33f0da3bbbeb27ffcb398eac501a31bd6ad2011e36133a1',
],
// FRAX_USDC_TOKEN_IDS: [
// '853d955acef822db058eb8505911ed77f175b99e.factory.bridge.near',
// '17208628f84f5d6ad33f0da3bbbeb27ffcb398eac501a31bd6ad2011e36133a1',
// ],
FRAX_USDC_TOKEN_IDS: [
'853d955acef822db058eb8505911ed77f175b99e.factory.bridge.near',
'17208628f84f5d6ad33f0da3bbbeb27ffcb398eac501a31bd6ad2011e36133a1',
],
USDTT_USDCC_USDT_USDC_TOKEN_IDS: [
'usdt.tether-token.near',
'17208628f84f5d6ad33f0da3bbbeb27ffcb398eac501a31bd6ad2011e36133a1',
Expand Down Expand Up @@ -681,7 +679,7 @@ export function getExtraStablePoolConfig(
'3689',
'4179',
'4513',
// '4514',
'4514',
],
USDTT_USDCC_USDT_USDC_POOL_INDEX: {
'usdt.tether-token.near': 0,
Expand All @@ -693,10 +691,10 @@ export function getExtraStablePoolConfig(
'usdt.tether-token.near': 0,
'17208628f84f5d6ad33f0da3bbbeb27ffcb398eac501a31bd6ad2011e36133a1': 1,
},
// FRAX_USDC_POOL_INDEX: {
// '853d955acef822db058eb8505911ed77f175b99e.factory.bridge.near': 0,
// '17208628f84f5d6ad33f0da3bbbeb27ffcb398eac501a31bd6ad2011e36133a1': 1,
// },
FRAX_USDC_POOL_INDEX: {
'853d955acef822db058eb8505911ed77f175b99e.factory.bridge.near': 0,
'17208628f84f5d6ad33f0da3bbbeb27ffcb398eac501a31bd6ad2011e36133a1': 1,
},
};
case 'development':
case 'pub-testnet':
Expand Down Expand Up @@ -864,7 +862,7 @@ export function getExtraStablePoolConfig(
'3689',
'4179',
'4513',
// '4514',
'4514',
],
USDTT_USDCC_USDT_USDC_POOL_INDEX: {
'usdt.tether-token.near': 0,
Expand All @@ -876,10 +874,10 @@ export function getExtraStablePoolConfig(
'usdt.tether-token.near': 0,
'17208628f84f5d6ad33f0da3bbbeb27ffcb398eac501a31bd6ad2011e36133a1': 1,
},
// FRAX_USDC_POOL_INDEX: {
// '853d955acef822db058eb8505911ed77f175b99e.factory.bridge.near': 0,
// '17208628f84f5d6ad33f0da3bbbeb27ffcb398eac501a31bd6ad2011e36133a1': 1,
// },
FRAX_USDC_POOL_INDEX: {
'853d955acef822db058eb8505911ed77f175b99e.factory.bridge.near': 0,
'17208628f84f5d6ad33f0da3bbbeb27ffcb398eac501a31bd6ad2011e36133a1': 1,
},
};
}
}
Expand Down
16 changes: 8 additions & 8 deletions src/services/near.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const USDTT_USDCC_USDT_USDC_TOKEN_IDS =
config.USDTT_USDCC_USDT_USDC_TOKEN_IDS;

export const USDT_USDC_TOKEN_IDS = config.USDT_USDC_TOKEN_IDS;
// export const FRAX_USDC_TOKEN_IDS = config.FRAX_USDC_TOKEN_IDS;
export const FRAX_USDC_TOKEN_IDS = config.FRAX_USDC_TOKEN_IDS;

export const STABLE_POOL_ID = config.STABLE_POOL_ID;

Expand All @@ -57,7 +57,7 @@ export const REF_FARM_BOOST_CONTRACT_ID = config.REF_FARM_BOOST_CONTRACT_ID;
export const REF_MEME_FARM_CONTRACT_ID = config.REF_MEME_FARM_CONTRACT_ID;

export const USDT_USDC_POOL_ID = config.USDT_USDC_POOL_ID;
// export const FRAX_USDC_POOL_ID = config.FRAX_USDC_POOL_ID;
export const FRAX_USDC_POOL_ID = config.FRAX_USDC_POOL_ID;

export const {
BTCIDS,
Expand All @@ -83,7 +83,7 @@ export const {
USDT_POOL_INDEX,
USDTT_USDCC_USDT_USDC_POOL_INDEX,
USDT_USDC_POOL_INDEX,
// FRAX_USDC_POOL_INDEX,
FRAX_USDC_POOL_INDEX,
} = getExtraStablePoolConfig();

export const extraStableTokenIds = BTCIDS.concat(LINEARIDS)
Expand All @@ -105,7 +105,7 @@ export const AllStableTokenIds = new Array(
.concat(extraStableTokenIds)
.concat(USDTT_USDCC_USDT_USDC_TOKEN_IDS)
.concat(USDT_USDC_TOKEN_IDS)
// .concat(FRAX_USDC_TOKEN_IDS)
.concat(FRAX_USDC_TOKEN_IDS)
)
);

Expand All @@ -127,7 +127,7 @@ export const ALL_STABLE_POOL_IDS = [
NEW_NEARX_POOL_ID,
USDT_POOL_ID,
USDT_USDC_POOL_ID,
// FRAX_USDC_POOL_ID,
FRAX_USDC_POOL_ID,
]
.filter((_) => _)
.map((id) => id.toString());
Expand Down Expand Up @@ -169,8 +169,8 @@ export const getStableTokenIndex = (stable_pool_id: string | number) => {
return USDTT_USDCC_USDT_USDC_POOL_INDEX;
case USDT_USDC_POOL_ID.toString():
return USDT_USDC_POOL_INDEX;
// case FRAX_USDC_POOL_ID.toString():
// return FRAX_USDC_POOL_INDEX;
case FRAX_USDC_POOL_ID.toString():
return FRAX_USDC_POOL_INDEX;
}
};

Expand Down Expand Up @@ -199,7 +199,7 @@ export const USD_CLASS_STABLE_POOL_IDS = [
USDT_POOL_ID,
USDTT_USDCC_USDT_USDC_POOL_ID.toString(),
USDT_USDC_POOL_ID.toString(),
// FRAX_USDC_POOL_ID.toString(),
FRAX_USDC_POOL_ID.toString(),
];

export const BTC_CLASS_STABLE_TOKEN_IDS = BTCIDS;
Expand Down

0 comments on commit 8865532

Please sign in to comment.