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

v1-subgraph clean-up #26

Merged
merged 12 commits into from
Oct 7, 2024
Merged

Conversation

arthurka-o
Copy link
Contributor

@arthurka-o arthurka-o commented Aug 14, 2024

https://linear.app/autonomysoftware/issue/BAC-122/v1-subgraph-clean-up

Changes in schema:

  • Build:
    • currentOi is removed (we already have position.initialOi)
    • currentDebt is removed (we already have position.initialDebt)
    • isLong is removed (we already have position.isLong)
    • collateral is removed (we already have position.initialCollateral)
    • value is removed (not used as far as we know)
  • Unwind:
    • currentOi is renamed to oiUnwound - "amount of oi unwound"
    • currentDebt is removed (we already have position.currentDebt)
    • isLong is removed (same as Build)
    • collateral is removed (didn't make sense, was always 0)
    • value is removed (didn't make sense, was always 0)
  • Liquidate:
    • currentOi is removed (we already have position.currentOi)
    • currentDebt is removed (same as Unwind)
    • isLong is removed (same as Build)
    • collateral is removed (same as Unwind)
    • value is removed (same as Unwind)

@arthurka-o arthurka-o force-pushed the arthurka/bac-122-v1-subgraph-clean-up branch from 6e332a7 to 43bc13e Compare August 14, 2024 13:18
@arthurka-o arthurka-o marked this pull request as ready for review August 16, 2024 12:08
@arthurka-o arthurka-o requested a review from TomasCImach August 16, 2024 12:09
- Calculate `initialCollateral` without external calls
Extracted how much user sends OVL to the contract,
substract `transferFee` and get `initialCollateral`

- Fix tests
- Replace `currentOi` with `oiUnwound`
- Remove `currentDebt`, `isLong`, `collateral`,
and `value`
@arthurka-o arthurka-o force-pushed the arthurka/bac-122-v1-subgraph-clean-up branch from 4c2b6d6 to 7918bab Compare August 22, 2024 13:37
@arthurka-o
Copy link
Contributor Author

arthurka-o commented Sep 3, 2024

@TomasCImach TomasCImach merged commit cbf1a9d into main Oct 7, 2024
1 check passed
@TomasCImach TomasCImach deleted the arthurka/bac-122-v1-subgraph-clean-up branch October 7, 2024 14:00
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