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

fix: added eBTC, PT_eBTC_26DEC2024 and PT_LBTC_27MAR2025 tokens #193

Merged
merged 1 commit into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 101 additions & 0 deletions contracts/PriceFeedDataLive.sol
Original file line number Diff line number Diff line change
Expand Up @@ -1843,6 +1843,63 @@ contract PriceFeedDataLive {
cpf.trusted = false;
cpf.reserve = false;
}
redStonePriceFeedsByNetwork[1].push(
RedStonePriceFeedData({
token: Tokens.LBTC,
dataServiceId: "redstone-primary-prod",
dataFeedId: "LBTC",
signers: [
0x8BB8F32Df04c8b654987DAaeD53D6B6091e3B774,
0xdEB22f54738d54976C4c0fe5ce6d408E40d88499,
0x51Ce04Be4b3E32572C4Ec9135221d0691Ba7d202,
0xDD682daEC5A90dD295d14DA4b0bec9281017b5bE,
0x9c5AE89C4Af6aA32cE58588DBaF90d18a855B6de,
address(0),
address(0),
address(0),
address(0),
address(0)
],
signersThreshold: 5,
trusted: false,
reserve: true
})
);

// ------------------------ eBTC ------------------------

{
CompositePriceFeedData storage cpf = compositePriceFeedsByNetwork[1].push();
cpf.token = Tokens.eBTC;
cpf.isTargetRedstone = true;
cpf.redstoneTargetToBaseData = RedStonePriceFeedDataShort({
dataServiceId: "redstone-primary-prod",
dataFeedId: "eBTC/WBTC",
signers: [
0x8BB8F32Df04c8b654987DAaeD53D6B6091e3B774,
0xdEB22f54738d54976C4c0fe5ce6d408E40d88499,
0x51Ce04Be4b3E32572C4Ec9135221d0691Ba7d202,
0xDD682daEC5A90dD295d14DA4b0bec9281017b5bE,
0x9c5AE89C4Af6aA32cE58588DBaF90d18a855B6de,
address(0),
address(0),
address(0),
address(0),
address(0)
],
signersThreshold: 5
});
cpf.targetStalenessPeriod = 240;
cpf.isBaseComposite = false;
cpf.baseToUSDFeed = 0xF4030086522a5bEEa4988F8cA5B36dbC97BeE88c;
cpf.baseStalenessPeriod = 4500;

cpf.trusted = false;
cpf.reserve = false;
}
theSamePriceFeedsByNetwork[1].push(
TheSamePriceFeedData({token: Tokens.eBTC, tokenHasSamePriceFeed: Tokens.LBTC, trusted: false, reserve: true})
);

// ------------------------ rETH ------------------------

Expand Down Expand Up @@ -8065,6 +8122,50 @@ contract PriceFeedDataLive {
reserve: true
})
);

// ------------------------ PT_eBTC_26DEC2024 ------------------------
pendlePriceFeedsByNetwork[1].push(
PendlePriceFeedData({
token: Tokens.PT_eBTC_26DEC2024,
underlying: Tokens.eBTC,
market: 0x36d3ca43ae7939645C306E26603ce16e39A89192,
twapWindow: 1800,
trusted: false,
reserve: false
})
);
pendlePriceFeedsByNetwork[1].push(
PendlePriceFeedData({
token: Tokens.PT_eBTC_26DEC2024,
underlying: Tokens.eBTC,
market: 0x36d3ca43ae7939645C306E26603ce16e39A89192,
twapWindow: 1800,
trusted: false,
reserve: true
})
);

// ------------------------ PT_LBTC_27MAR2025 ------------------------
pendlePriceFeedsByNetwork[1].push(
PendlePriceFeedData({
token: Tokens.PT_LBTC_27MAR2025,
underlying: Tokens.LBTC,
market: 0x70B70Ac0445C3eF04E314DFdA6caafd825428221,
twapWindow: 1800,
trusted: false,
reserve: false
})
);
pendlePriceFeedsByNetwork[1].push(
PendlePriceFeedData({
token: Tokens.PT_LBTC_27MAR2025,
underlying: Tokens.LBTC,
market: 0x70B70Ac0445C3eF04E314DFdA6caafd825428221,
twapWindow: 1800,
trusted: false,
reserve: true
})
);
}

function chainlinkPriceFeeds(uint256 index) external view returns (ChainlinkPriceFeedData memory) {
Expand Down
3 changes: 3 additions & 0 deletions contracts/Tokens.sol
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ enum Tokens {
RPL,
APE,
LBTC,
eBTC,
rETH,
AURA,
osETH,
Expand All @@ -73,6 +74,8 @@ enum Tokens {
PT_sUSDe_26DEC2024,
PT_eETH_26DEC2024,
PT_ezETH_26DEC2024,
PT_eBTC_26DEC2024,
PT_LBTC_27MAR2025,
sfrxETH,
_3Crv,
crvFRAX,
Expand Down
24 changes: 24 additions & 0 deletions contracts/TokensData.sol
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,14 @@ contract TokensDataLive {
tokenType: TokenType.NORMAL_TOKEN
})
);
tokenDataByNetwork[1].push(
TokenData({
id: Tokens.eBTC,
addr: 0x657e8C867D8B37dCC18fA4Caead9C45EB088C642,
symbol: "eBTC",
tokenType: TokenType.NORMAL_TOKEN
})
);
tokenDataByNetwork[1].push(
TokenData({
id: Tokens.rETH,
Expand Down Expand Up @@ -520,6 +528,22 @@ contract TokensDataLive {
tokenType: TokenType.NORMAL_TOKEN
})
);
tokenDataByNetwork[1].push(
TokenData({
id: Tokens.PT_eBTC_26DEC2024,
addr: 0xB997B3418935A1Df0F914Ee901ec83927c1509A0,
symbol: "PT_eBTC_26DEC2024",
tokenType: TokenType.NORMAL_TOKEN
})
);
tokenDataByNetwork[1].push(
TokenData({
id: Tokens.PT_LBTC_27MAR2025,
addr: 0xEc5a52C685CC3Ad79a6a347aBACe330d69e0b1eD,
symbol: "PT_LBTC_27MAR2025",
tokenType: TokenType.NORMAL_TOKEN
})
);
tokenDataByNetwork[1].push(
TokenData({
id: Tokens.sfrxETH,
Expand Down
68 changes: 68 additions & 0 deletions src/oracles/priceFeeds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1245,6 +1245,38 @@ export const priceFeedsByToken: Record<
},
trusted: false,
},
Reserve: {
type: PriceFeedType.REDSTONE_ORACLE,
dataServiceId: "redstone-primary-prod",
dataId: "LBTC",
stalenessPeriod: FOUR_MINUTES,
...REDSTONE_SIGNERS,
},
},
},
eBTC: {
Mainnet: {
Main: {
type: PriceFeedType.COMPOSITE_ORACLE,
targetToBasePriceFeed: {
type: PriceFeedType.REDSTONE_ORACLE,
dataServiceId: "redstone-primary-prod",
dataId: "eBTC/WBTC",
...REDSTONE_SIGNERS,
stalenessPeriod: FOUR_MINUTES,
},

baseToUsdPriceFeed: {
type: PriceFeedType.CHAINLINK_ORACLE,
address: "0xF4030086522a5bEEa4988F8cA5B36dbC97BeE88c",
stalenessPeriod: HOUR_1_BUFFERED,
},
trusted: false,
},
Reserve: {
type: PriceFeedType.THE_SAME_AS,
token: "LBTC",
},
},
},
rETH: {
Expand Down Expand Up @@ -3845,4 +3877,40 @@ export const priceFeedsByToken: Record<
},
},
},

PT_eBTC_26DEC2024: {
Mainnet: {
Main: {
type: PriceFeedType.PENDLE_PT_TWAP_ORACLE,
underlying: "eBTC",
market: "0x36d3ca43ae7939645C306E26603ce16e39A89192",
twapWindow: HOUR_1 / 2,
trusted: false,
},
Reserve: {
type: PriceFeedType.PENDLE_PT_TWAP_ORACLE,
underlying: "eBTC",
market: "0x36d3ca43ae7939645C306E26603ce16e39A89192",
twapWindow: HOUR_1 / 2,
},
},
},

PT_LBTC_27MAR2025: {
Mainnet: {
Main: {
type: PriceFeedType.PENDLE_PT_TWAP_ORACLE,
underlying: "LBTC",
market: "0x70B70Ac0445C3eF04E314DFdA6caafd825428221",
twapWindow: HOUR_1 / 2,
trusted: false,
},
Reserve: {
type: PriceFeedType.PENDLE_PT_TWAP_ORACLE,
underlying: "LBTC",
market: "0x70B70Ac0445C3eF04E314DFdA6caafd825428221",
twapWindow: HOUR_1 / 2,
},
},
},
};
3 changes: 3 additions & 0 deletions src/tokens/decimals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export const decimals: Record<SupportedToken, number> = {
OP: 18,
GHO: 18,
LBTC: 8,
eBTC: 8,
osETH: 18,
weETH: 18,
ezETH: 18,
Expand Down Expand Up @@ -252,4 +253,6 @@ export const decimals: Record<SupportedToken, number> = {
PT_sUSDe_26DEC2024: 18,
PT_eETH_26DEC2024: 18,
PT_ezETH_26DEC2024: 18,
PT_eBTC_26DEC2024: 8,
PT_LBTC_27MAR2025: 8,
};
19 changes: 19 additions & 0 deletions src/tokens/normal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export type NormalToken =
| "rETH"
| "AURA"
| "LBTC"
| "eBTC"
| "osETH"
| "weETH"
| "SWISE"
Expand All @@ -72,6 +73,8 @@ export type NormalToken =
| "PT_sUSDe_26DEC2024"
| "PT_eETH_26DEC2024"
| "PT_ezETH_26DEC2024"
| "PT_eBTC_26DEC2024"
| "PT_LBTC_27MAR2025"

// REDSTONE
| "SHIB"
Expand Down Expand Up @@ -351,6 +354,12 @@ export const normalTokens: Record<NormalToken, NormalTokenData> = {
symbol: "LBTC",
type: { AllNetworks: TokenType.NORMAL_TOKEN },
},
eBTC: {
name: "eBTC",

symbol: "eBTC",
type: { AllNetworks: TokenType.NORMAL_TOKEN },
},
rETH: {
name: "Rocket Pool ETH",
symbol: "rETH",
Expand Down Expand Up @@ -481,6 +490,16 @@ export const normalTokens: Record<NormalToken, NormalTokenData> = {
symbol: "PT_ezETH_26DEC2024",
type: { AllNetworks: TokenType.NORMAL_TOKEN },
},
PT_eBTC_26DEC2024: {
name: "Pendle PT eBTC 26 Dec 2024 expiry",
symbol: "PT_eBTC_26DEC2024",
type: { AllNetworks: TokenType.NORMAL_TOKEN },
},
PT_LBTC_27MAR2025: {
name: "Pendle PT LBTC 27 Mar 2025 expiry",
symbol: "PT_LBTC_27MAR2025",
type: { AllNetworks: TokenType.NORMAL_TOKEN },
},
};

export const isNormalToken = (t: unknown): t is NormalToken =>
Expand Down
12 changes: 12 additions & 0 deletions src/tokens/token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ export const tokenDataByNetwork: Record<
WLD: "0x163f8C2467924be0ae7B5347228CABF260318753",
OP: NOT_DEPLOYED,
LBTC: "0x8236a87084f8B84306f72007F36F2618A5634494",
eBTC: "0x657e8C867D8B37dCC18fA4Caead9C45EB088C642",
osETH: "0xf1C9acDc66974dFB6dEcB12aA385b9cD01190E38",
weETH: "0xCd5fE23C85820F7B72D0926FC9b05b43E359b7ee",
ezETH: "0xbf5495Efe5DB9ce00f80364C8B423567e58d2110",
Expand Down Expand Up @@ -379,6 +380,8 @@ export const tokenDataByNetwork: Record<
PT_sUSDe_26DEC2024: "0xEe9085fC268F6727d5D4293dBABccF901ffDCC29",
PT_eETH_26DEC2024: "0xf7906F274c174A52d444175729E3fa98f9bde285",
PT_ezETH_26DEC2024: "0x6ee2b5E19ECBa773a352E5B21415Dc419A700d1d",
PT_eBTC_26DEC2024: "0xB997B3418935A1Df0F914Ee901ec83927c1509A0",
PT_LBTC_27MAR2025: "0xEc5a52C685CC3Ad79a6a347aBACe330d69e0b1eD",

// GEARBOX
dDAI: "0x6CFaF95457d7688022FC53e7AbE052ef8DFBbdBA",
Expand Down Expand Up @@ -498,6 +501,7 @@ export const tokenDataByNetwork: Record<
RPL: "0xB766039cc6DB368759C1E56B79AFfE831d0Cc507",
APE: NOT_DEPLOYED,
LBTC: NOT_DEPLOYED,
eBTC: NOT_DEPLOYED,
rETH: "0xEC70Dcb4A1EFa46b8F2D97C310C9c4790ba5ffA8",
WLD: NOT_DEPLOYED,
OP: NOT_DEPLOYED,
Expand Down Expand Up @@ -671,6 +675,8 @@ export const tokenDataByNetwork: Record<
PT_sUSDe_26DEC2024: NOT_DEPLOYED,
PT_eETH_26DEC2024: NOT_DEPLOYED,
PT_ezETH_26DEC2024: NOT_DEPLOYED,
PT_eBTC_26DEC2024: NOT_DEPLOYED,
PT_LBTC_27MAR2025: NOT_DEPLOYED,

// GEARBOX
dDAI: NOT_DEPLOYED,
Expand Down Expand Up @@ -790,6 +796,7 @@ export const tokenDataByNetwork: Record<
RPL: "0xC81D1F0EB955B0c020E5d5b264E1FF72c14d1401",
APE: NOT_DEPLOYED,
LBTC: NOT_DEPLOYED,
eBTC: NOT_DEPLOYED,
rETH: "0x9Bcef72be871e61ED4fBbc7630889beE758eb81D",
osETH: NOT_DEPLOYED,
weETH: NOT_DEPLOYED,
Expand Down Expand Up @@ -963,6 +970,8 @@ export const tokenDataByNetwork: Record<
PT_sUSDe_26DEC2024: NOT_DEPLOYED,
PT_eETH_26DEC2024: NOT_DEPLOYED,
PT_ezETH_26DEC2024: NOT_DEPLOYED,
PT_eBTC_26DEC2024: NOT_DEPLOYED,
PT_LBTC_27MAR2025: NOT_DEPLOYED,

// GEARBOX
dDAI: NOT_DEPLOYED,
Expand Down Expand Up @@ -1088,6 +1097,7 @@ export const tokenDataByNetwork: Record<
RPL: NOT_DEPLOYED,
APE: NOT_DEPLOYED,
LBTC: NOT_DEPLOYED,
eBTC: NOT_DEPLOYED,
rETH: NOT_DEPLOYED,
osETH: NOT_DEPLOYED,
weETH: NOT_DEPLOYED,
Expand Down Expand Up @@ -1257,6 +1267,8 @@ export const tokenDataByNetwork: Record<
PT_sUSDe_26DEC2024: NOT_DEPLOYED,
PT_eETH_26DEC2024: NOT_DEPLOYED,
PT_ezETH_26DEC2024: NOT_DEPLOYED,
PT_eBTC_26DEC2024: NOT_DEPLOYED,
PT_LBTC_27MAR2025: NOT_DEPLOYED,

// GEARBOX
dDAI: NOT_DEPLOYED,
Expand Down
Loading