ind liq metrics and mock scripts for dashboard#597
Conversation
.env.dlob.local.example
Outdated
| @@ -0,0 +1,16 @@ | |||
| ENDPOINT=https://api.devnet.solana.com | |||
There was a problem hiding this comment.
Do we need this file?
There was a problem hiding this comment.
didn't end up using this one so will remove
| @@ -0,0 +1,22 @@ | |||
| ENDPOINT=https://api.devnet.solana.com | |||
There was a problem hiding this comment.
Do we need this file?
There was a problem hiding this comment.
this one is just for the mock=true and mock value mode.
src/publishers/tradesPublisher.ts
Outdated
| const stateCommitment: Commitment = 'confirmed'; | ||
| let driftClient: DriftClient; | ||
|
|
||
| type FillEvent = { |
There was a problem hiding this comment.
OrderAction record in the drift sdk
There was a problem hiding this comment.
Hmm yea I did try to use this at first but there's actually a lot of existing conversion done before it's passed through, like the precisions and maker/taker pub keys to strings. So this type represents the payload that redis was already taking (typed any) but to avoid breaking changes I locked it down.
|
As discussed I would merge this into staging so we can start to visualise in grafana better |
Tracy and Kevin want a dashboard that monitors metrics around how much ind liq / quotes that whitelisted MM's are adding, and what there actual fills are like in relation to those quotes.
Open to feedback on some of these are measured but I'm starting with:
Indicative presence rate
% of fills the MM had any ind quote
indicative_presence_total / market_fill_countCompetitive presence rate
% of fills where at least one quote level would have crossed or matched the observed fill price.
indicative_competitive_opportunity_total / market_fill_countIndicative size on book
notional value of quotes - regardless of spread
indicative_total_size_on_bookCompetitive size on book
notional value of quotes which would have crossed or matched the observed fill price.
indicative_competitive_size_on_bookQuote-to-Fill Conversion Rate
% of fills where the maker had a competitive presence and actually filled. Note that there are many reasons why they didn't fill - and this doesn't really break that down so at best we can just observe trends.
indicative_competitive_fill_total / indicative_competitive_opportunity_totalNotional Capture Rate
Same definition as above but in terms of notional value.
indicative_competitive_captured_notional_total / indicative_competitive_opportunity_notional_totalFill Price vs Indicative Quote
Distribution of fills based on bps between the fill and best quoted price, for fills the maker captured. This is broken into 5 spread buckets from very tight to very wide.
indicative_fill_vs_quote_bucket_totalI'm testing the listener by:
Example of the metrics