Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
✅ Deploy Preview for papaya-travesseiro-c75216 canceled.
|
solend-sdk/src/state/reserveV2.ts
Outdated
| protocolLiquidationFee: number; | ||
| protocolTakeRate: number; | ||
| addedBorrowWeightBPS: number; | ||
| borrowWeight: number; |
There was a problem hiding this comment.
why do we have this? Its not in state/reserve.rs
There was a problem hiding this comment.
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
solend-sdk/src/state/reserveV2.ts
Outdated
There was a problem hiding this comment.
i don't think we need a new file. the changes are backwards compatible. on upgrade, the new fields will be zero.
There was a problem hiding this comment.
also there are changes in lending market, obligation as well
solend-sdk/src/state/reserveV2.ts
Outdated
| ], | ||
| "rateLimiter" | ||
| ), | ||
| BufferLayout.u64("borrowWeightBPS"), |
solend-sdk/src/state/reserve.ts
Outdated
| protocolLiquidationFee: reserve.protocolLiquidationFee, | ||
| protocolTakeRate: reserve.protocolTakeRate, | ||
| addedBorrowWeightBPS: reserve.addedBorrowWeightBPS, | ||
| borrowWeight: 1 - (1.0 * reserve.borrowWeightBPS) / 10000, |
There was a problem hiding this comment.
1 + (1.0 * reserve.addedBorrowWeightBPS) / 10000?
1481453 to
0fff893
Compare
| protocolLiquidationFee: reserve.protocolLiquidationFee, | ||
| protocolTakeRate: reserve.protocolTakeRate, | ||
| addedBorrowWeightBPS: reserve.addedBorrowWeightBPS, | ||
| borrowWeight: 1 + (1.0 * reserve.borrowWeightBPS) / 10000, |
There was a problem hiding this comment.
ok this thing is pretty lit now that im using it 🔥
Add layout changes for parsing v2 reserves
No description provided.