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: display lending positions post-hardfork shenanigans #7747

Merged
merged 3 commits into from
Sep 16, 2024

Conversation

gomesalexandre
Copy link
Contributor

@gomesalexandre gomesalexandre commented Sep 13, 2024

Description

Does precisely what it says on the box.
NOTE: While this fixes displaying positions, repays still can't be done because of close endpoint shenanigans: https://discord.com/channels/838986635756044328/1283906886051172427/1284230662517424254

Issue (if applicable)

closes N/A

Risk

High Risk PRs Require 2 approvals

What protocols, transaction types, wallets or contract interactions might be affected by this PR?

Low - ensure "Available Pools" is still displaying no pools

Testing

  • "Available Pools" is still empty
  • With a frame (or rather, Rabby watch-only address as Frame MM injection is currently borked following upstream changes) and a known borrower from the borrowers endpoint (https://paw.pt/i39K7GP3), lending positions are displayed

Engineering

  • ^

Operations

  • 🏁 My feature is behind a flag and doesn't require operations testing (yet)
  • ^

Screenshots (if applicable)

  • develop
Screenshot 2024-09-13 at 20 20 00
  • this diff
Screenshot 2024-09-13 at 21 22 37

@gomesalexandre gomesalexandre requested a review from a team as a code owner September 13, 2024 19:26
Copy link
Member

@0xApotheosis 0xApotheosis left a comment

Choose a reason for hiding this comment

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

Hmm, I'm wondering if we need to tweak the filter further.

Prod:

Screenshot 2024-09-14 at 6 41 03 AM

This branch:

Screenshot 2024-09-14 at 6 41 21 AM

Note my loan ratio now correctly shows, but I get infinite skeletons for collateral and debt values.

@gomesalexandre
Copy link
Contributor Author

Hmm, I'm wondering if we need to tweak the filter further.

Prod:

Screenshot 2024-09-14 at 6 41 03 AM This branch: Screenshot 2024-09-14 at 6 41 21 AM Note my loan ratio now correctly shows, but I get infinite skeletons for collateral and debt values.

Retested both with a known borrower:

image

and with my own addy (no loans atm):

image

and couldn't repro. @0xApotheosis is this happening deterministically for you? 🤔

@0xApotheosis
Copy link
Member

0xApotheosis commented Sep 14, 2024

It's deterministic for me, yeah (clean cache and all) - I'll see if I can work out what's up.

When I use the same seed on THORSwap I correctly see my loan:

Screenshot 2024-09-14 at 3 33 59 PM

Owner address for context: 0x32dbc9cf9e8fbcebe1e0a2ecf05ed86ca3096cb6

{
  "owner": "0x32dbc9cf9e8fbcebe1e0a2ecf05ed86ca3096cb6",
  "asset": "ETH.ETH",
  "debt_issued": "569180000",
  "debt_repaid": "568559236",
  "debt_current": "620764",
  "collateral_deposited": "999997",
  "collateral_withdrawn": "0",
  "collateral_current": "999997",
  "last_open_height": 13185036,
  "last_repay_height": 16971787
},

@gomesalexandre
Copy link
Contributor Author

gm @0xApotheosis! 2d0e08f

Confirmed this was an actual bug - non-lending enabled pools will error, which we should not fetch (and did not previously) but now will as we lost the ability to narrow our collateral pools proper - at least when fetching positions - "Available Pools" is still happy (though not user-facing happy as pools are still full upstream as they've been for many months!)

Screenshot 2024-09-16 at 13 15 43

Copy link
Member

@0xApotheosis 0xApotheosis left a comment

Choose a reason for hiding this comment

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

gm indeed @gomesalexandre! My loans are great again 😌

Screenshot 2024-09-16 at 7 22 38 PM

@0xApotheosis 0xApotheosis enabled auto-merge (squash) September 16, 2024 09:23
@0xApotheosis 0xApotheosis merged commit 15bf588 into develop Sep 16, 2024
3 checks passed
@0xApotheosis 0xApotheosis deleted the fix_lending_positions branch September 16, 2024 09:24
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.

2 participants