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

Add peer liquidity high and asset liquidity high events #3012

Open
3 tasks done
mkurapov opened this issue Oct 2, 2024 · 0 comments · May be fixed by #3085
Open
3 tasks done

Add peer liquidity high and asset liquidity high events #3012

mkurapov opened this issue Oct 2, 2024 · 0 comments · May be fixed by #3085
Assignees
Labels

Comments

@mkurapov
Copy link
Contributor

mkurapov commented Oct 2, 2024

Context

Similar to how we have peer.liquidity_low and asset.liquidity_low webhook events, we should add a peer.liquidity_high and asset.liquidity_high webhook events.

Rafiki's A peer liquidity increases whenever payments are being sent from it, which, in other words, means the debt owing to the other peer increases. This information would be useful for the ASE to know as soon as it happens, to better manage their risk, and liquidity in general.

When it comes to asset liquidity, most of the changes to asset liquidity happen during cross-currency transfers (as it's necessary to convert from one asset account to another). Naturally, asset low and asset high liquidity events will go hand in hand (ie if sending between USD <> EUR, USD will decrease, EUR will increase, Rafiki could end up firing the asset low and asset high events), but this also seems useful to have from a FX risk perspective.

Todos

  • Add optional liquidityHighThreshold input variable to createPeer createAsset updatePeer updateAsset graphql mutations, and store this in the asset and peer tables
  • Add peer.liquidity_high and asset.liquidity_high webhook events. These events should get fired in the onCredit methods for assets & peers.
  • Create documentation issue for this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Backlog
Development

Successfully merging a pull request may close this issue.

2 participants