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

Risk Engine Reliability and Performance Improvements #143

Merged
merged 11 commits into from
Dec 15, 2023

Conversation

jkbpvsc
Copy link
Member

@jkbpvsc jkbpvsc commented Dec 4, 2023

  • Optimize compute when calculating account health
  • Use real time prices when calculating maintenance health
  • Ignore oracles when loading balances for deposits on isolated banks
  • More sanity checks
  • Removed logs that log pubkeys (expensive)
  • Better naming for some functions around the asset term

TODO:

  • Update indexer to calc maint health correctly
  • Update ts sdk to calc maint health correctly

@jkbpvsc jkbpvsc linked an issue Dec 4, 2023 that may be closed by this pull request
@jkbpvsc jkbpvsc marked this pull request as draft December 4, 2023 17:28
@jkbpvsc jkbpvsc requested a review from losman0s December 4, 2023 17:32
observability/indexer/src/utils/marginfi_account_dup.rs Outdated Show resolved Hide resolved
programs/marginfi/src/state/price.rs Show resolved Hide resolved
programs/marginfi/src/state/marginfi_group.rs Outdated Show resolved Hide resolved
programs/marginfi/src/state/price.rs Outdated Show resolved Hide resolved
programs/marginfi/src/state/marginfi_account.rs Outdated Show resolved Hide resolved
@jkbpvsc jkbpvsc marked this pull request as ready for review December 15, 2023 09:42
losman0s
losman0s previously approved these changes Dec 15, 2023
@jkbpvsc jkbpvsc merged commit 53e018a into main Dec 15, 2023
3 checks passed
jkbpvsc added a commit that referenced this pull request Oct 15, 2024
* feat: reworked risk engine value calculations

* fix: update imports, correct log name

* fix: fix indexer

* fix: use correct oracle type for price bands

* fix: format

* fix: again with cyrills unreasonable demands

* fix: add tests

* fix: fmt

* fix: update indexer, and cli

---------

Co-authored-by: J <[email protected]>
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.

Ignore stale banks for isolated deposits
2 participants