Skip to content

Add layout changes for parsing v2 reserves#40

Merged
DaSichuan merged 1 commit intomasterfrom
reserve_v2
Mar 23, 2023
Merged

Add layout changes for parsing v2 reserves#40
DaSichuan merged 1 commit intomasterfrom
reserve_v2

Conversation

@DaSichuan
Copy link
Copy Markdown
Contributor

No description provided.

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 23, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
public ❌ Failed (Inspect) Mar 23, 2023 at 11:42PM (UTC)

@netlify
Copy link
Copy Markdown

netlify bot commented Mar 23, 2023

Deploy Preview for papaya-travesseiro-c75216 canceled.

Name Link
🔨 Latest commit e5cafe6
🔍 Latest deploy log https://app.netlify.com/sites/papaya-travesseiro-c75216/deploys/641ce3037bc75f0008412fcf

protocolLiquidationFee: number;
protocolTakeRate: number;
addedBorrowWeightBPS: number;
borrowWeight: number;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we have this? Its not in state/reserve.rs

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

borrowWeight? just because we don't use addedBorrowWeightBPS in the code, and call borrow_weight() instead.
I figured i'd just add the pre calculated value as a field for convenience

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't think we need a new file. the changes are backwards compatible. on upgrade, the new fields will be zero.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also there are changes in lending market, obligation as well

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kk

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wait

],
"rateLimiter"
),
BufferLayout.u64("borrowWeightBPS"),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addedBorrowWeightBPS?

protocolLiquidationFee: reserve.protocolLiquidationFee,
protocolTakeRate: reserve.protocolTakeRate,
addedBorrowWeightBPS: reserve.addedBorrowWeightBPS,
borrowWeight: 1 - (1.0 * reserve.borrowWeightBPS) / 10000,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 + (1.0 * reserve.addedBorrowWeightBPS) / 10000?

@DaSichuan DaSichuan force-pushed the reserve_v2 branch 2 times, most recently from 1481453 to 0fff893 Compare March 23, 2023 23:35
protocolLiquidationFee: reserve.protocolLiquidationFee,
protocolTakeRate: reserve.protocolTakeRate,
addedBorrowWeightBPS: reserve.addedBorrowWeightBPS,
borrowWeight: 1 + (1.0 * reserve.borrowWeightBPS) / 10000,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok this thing is pretty lit now that im using it 🔥

0xodia pushed a commit that referenced this pull request Sep 9, 2024
0xodia pushed a commit that referenced this pull request Sep 9, 2024
Add layout changes for parsing v2 reserves
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants