Releases: dydxprotocol/v4-chain
Indexer v5.0.3
What's Changed
- Comment out debug logs (backport #1654)
- Ensure message forwarder samples all stats (backport #1653)
- Add marketType to perpetual_markets athena table (backport #1659)
- decode message in socks only once (backport #1646)
Full Changelog: indexer/v5.0.2...indexer/v5.0.3
Indexer v5.0.2
What's Changed
Full Changelog: indexer/v5.0.1...indexer/v5.0.2
Protocol v5.0.2
Indexer v5.0.1
Indexer v5.0.1 Release Notes
- Adds fixes to enable compliance & persistent geoblocking
- Add API support for parent subaccounts
- Add BEST_EFFORT_CANCELED orders to initial subaccount websocket channel subscription message
- Improvements to pnl calculation
- Pagination for certain API endpoints
- Add latest blockHeight processed by Indexer to subaccount websocket messages
- Add roundtable task to uncross the orderbook
- Add realized/unrealized pnl to consolidated subaccount websocket messages
Protocol v5.0.1
Protocol v5.0.0
Protocol v5.0.0 Release Notes
Highlights
This release includes changes in following major areas:
- Isolated Markets
- Batch order cancellation
- Protocol-enshrined LP Vault
- Slinky Sidecar/Vote Extension
- Performance Improvements
- Soft Open Interest Cap
- Full Node Streaming
Detailed Changes
Isolated Market
Perpetuals have been updated to include a market type which is either CROSS
or ISOLATED
. All currently existing perpetuals are CROSS
perpetuals and have no change to functionality.
For ISOLATED
perpetuals, a subaccount can only open a position in an ISOLATED
perpetual if it holds no other perpetual positions. Subaccounts with an open position in an ISOLATED
perpetual have their collateral stored in an account that is specific for the ISOLATED
perpetual. Each ISOLATED
perpetual will have a separate insurance fund that is used to backstop liquidations and collect liquidation fees.
Withdrawal gating logic when a subaccount with negative total net collateral is detected has been updated to gate withdrawals separately between CROSS
perpetuals and each ISOLATED
perpetual. For example, if a subaccount with negative total net collateral is detected and it holds an ISOLATED
perpetual position, withdrawals will only be gated for subaccounts with positions in that specific ISOLATED
perpetual and withdrawals are not gated for subaccounts with positions in CROSS
perpetuals or other ISOLATED
perpetuals.
The maximum number of subaccounts per address has been increased from 128 to 128001 to account for needed a subaccount to hold perpetual positions for each ISOLATED
perpetual.
Check out the blog post for more details on this new feature.
- Move insurance fund into x/perpetuals ([#1106](#1106))
- Add market type to the CreatePerpetual API ([#1118](#1118))
- Use market specific insurance fund for cross or isolated markets ([#1132](#1132))
- Add function to retrieve collateral pool addr for a subaccount ([#1142](#1142))
- Move SA module address transfers to use perpetual based SA accounts ([#1146](#1146))
- Add state migrations for isolated markets ([#1155](#1155))
- Update upper limit of subaccount number constraint ([#1164](#1164))
- Check isolated market constraints in UpdateSubaccount. ([#1158](#1158))
- Update subaccount-to-subaccount transfers for collateral pools. ([#1178](#1178))
- Add market type to indexer events. ([#1201](#1201))
- Add logic to transfer collateral when open/close isolated perpetual position. ([#1200](#1200))
- Update withdrawal gating to be per collateral pool. ([#1208](#1208))
- v5.0.0 state migration negative tnc subaccount store. ([#1226](#1226))
- Add query function for collateral pool address. ([#1256](#1256))
- Add new error code to be returned when orders fail isolated subaccount checks. ([#1331](#1331))
- Add V2 for perpetual market create event + handlers. ([#1395](#1395))
- Fix IsIsolatedPerpetual function orientation ([#1403](#1403))
- Fix consensus failure from unhandled error. ([#1418](#1418))
Protocol Vault
x/vault
module is added to introduce the functionality of LP vaults, which will be available for testing purposes only. A vault is activated after after its USDC balance reaches activation_threshold_quote_quantums
and automatically provides liquidity for its corresponding market by placing stateful orders on both sides of the book and refreshing them every block. When LP vaults are fully operational anyone can deposit into any vault and upon each deposit, a vault mints new shares for the depositor based on deposit amount and current vault equity. x/vault
parameters are updatable via governance.
Note that withdrawal from vaults is not supported in v5.0.0.
- add x/vault protos ([#1169](#1169))
- add x/vault total shares store ([#1179](#1179))
- construct simple vault orders ([#1206](#1206))
- refresh all vault orders ([#1213](#1213))
- store x/vault parameters in state, add query, and update via governance ([#1238](#1238))
- Implement MsgDepositToVault ([#1220](#1220))
- change vault state key to not use serialization ([#1248](#1248))
- Track shares of owners in vaults ([#1253](#1253))
- decommission vaults at the beginning of a block ([#1264](#1264))
- add cli for deposit to vault ([#1276](#1276))
- rename order_size_ppm to order_size_pct_ppm in vault params ([#1271](#1271))
- implement full vault strategy ([#1262](#1262))
- keep track of vault shares as integers ([#1267](#1267))
- vaults do not quote if order size is 0 ([#1325](#1325))
- Skip various order placement logic for vault orders ([#1332](#1332))
- return error if shares to mint is rounded down to zero ([#1333](#1333))
- initialize vault module params in v5.0.0 upgrade handler ([#1359](#1359))
- add activation threshold on vaults ([#1344](#1344))
- add OwnerShares and AllVaults query and cli ([#1362](#1362))
- bounded quotes by oracle price ([#1390](#1390))
- updated default vault parameters ([#1450](#1450))
BatchCancel
MsgBatchCancel
added to the protocol. Allow for batches (max 100) of short term orders to be cancelled. Treated as 2 order cancels by rate limiter.
- MsgBatchCancel Protos ([#1094](#1094))
- Validatebasic for new MsgBatchCancel ([#1101](#1101))
- msgBatchCancel success + failure fields ([#1130](#1130))
- Clob
MsgBatchCancel
functionality ([#1110](#1110)) - Batch Cancel CLI + additional validation ([#1204](#1204))
- Batch Cancel Rate Limit Metrics ([[#1233](https://github.com/dydxprotoco...
Indexer v5.0.0
Indexer v5.0.0 Release Notes
Isolated Markets
- Add market type to the CreatePerpetual API ([#1118](#1118))
- Add parentSubaccountNumber endpoint for fills ([#1205](#1205))
- Add market type to indexer events. ([#1201](#1201))
- Implement GET /address/parentSubaccountNumber API ([#1229](#1229))
- Implement /transfers/parentSubaccountNumber indexer API ([#1218](#1218))
- Add API to get asset positions for parent subaccount ([#1243](#1243))
- Update indexer to ingest and return market type for perpetuals ([#1266](#1266))
- Add V2 for perpetual market create event + handlers. (backport #1395) ([#1402](#1402))
- Add parentSubaccountNumber endpoint for historical-pnl (backport #1476) ([#1485](#1485))
- Add parent subaccount websocket (backport #1463) ([#1486](#1486))
- Fix subaccount validation to account for updated subaccount limit. (backport #1513) ([#1515](#1515))
Soft Open Interest Caps
- Update LiquidityTierUpsertEvent to add OI caps ([#1242](#1242))
- update DB and APIs to add OI caps info (backport #1305) ([#1387](https://github.com/dydxprotocol/v4-chain/pull/1387) [[#1368](https://github.com/dydxprotocol/v4-chain/pull/1368)](https://github.com/dydxprotocol/v4-chain/pull/1368))
- Add open interest update event and handlers (backport #1352) ([#1397](#1397))
- move open interest handler to block handler map (backport #1454) ([#1457](#1457))
Performance Improvements
- Batch Process Vulcan messages ([#1018](#1018))
- Optimize funding index update query ([#1061](#1061))
- Add Indexes to candles and orders to optimize queries ([#1060](#1060))
- add index that includes createdAt to fills to address read replica lag ([#1137](#1137))
- Use read replica rather than main instance for aggregate-trading-rewards query ([#1190](#1190))
- pass initial kafka timestamp from Ender -> Vulcan for better e2e order latency tracking ([#1211](#1211))
- Enable rate limiting in socks by default ([#1272](#1272))
- Indexer track e2e latency ([#1237](#1237))
Compliance
Implement persistent geo-blocking and close-only mode in Indexer
- remove geoblocking from Indexer endpoints ([#1029](#1029))
- add compliance status table ([#1032](#1032))
- add roundtable task for CLOSE_ONLY -> BLOCKED compliance status transition ([#1034](#1034))
- new compliance logic for comlink address-related endpoints ([#1048](#1048))
- implement new geo-blocking strategy for socks ([#1049](#1049))
- implement GET /compliance/screen/{address} endpoint ([#1087](#1087))
- implement POST /compliance/setStatus for dev/staging environments ([#1088](#1088))
- Implement skeleton for post /compliance/geoblock endpoint ([#1111](#1111))
- implement post /compliance/geoblock ([#1129](#1129))
- Fix Compliance types and validation (backport #1411) ([#1413](#1413))
- Add updatedAt to compliance v2 API responses (backport #1360) ([#1480](#1480))
- Update upsert querybuilder and compliance table upsert function (backport #1477) ([#1478](#1478))
- implement logic for FIRST_STRIKE_CLOSE_ONLY mode (backport #1372) ([#1479](#1479))
Batch Cancel
Bug Fixes
- Fix Aggregate Historical Trading rewards and always use generated id in tables ([#1022](#1022))
- Add missing index ([#1039](#1039))
- Try-catch update functions in cache-update loops. ([#1042](#1042))
- move funding handler from unordered_handlers to ordered_handlers ([#1097](#1097))
- Ensure that all matching status are returned in list orders endpoint ([#1100](#1100))
- Fix stateful order removal event ordering. (backport #1456) ([#1459](#1459))
Miscellaneous
- Add
print-block
cmd to scripts README ([#1096](#1096)) - add DELEVERAGING event type to print-block script ([#1120](#1120))
- Add script to print candle time boundaries ([#1126](#1126))
- Update Api documentation to have correct required fields ([#1167](#1167))
- Add flag to send subaccount websocket message for long term orders in vulcan ([#1224](#1224))
- Add flag to send subaccount websocket message from Ender for long term orders ([#1223](#1223))
- Add BEC to initial subaccount orders socks channel (backport #1500) ([#1504](#1504))
Indexer v4.1.2
Indexer v4.1.2 Release Notes
Adds BEST_EFFORT_CANCELED orders to initial socks subscription
Protocol v4.1.4
This release updates full node grpc streaming.
-
Introduces a configurable protocol-side buffered channel of full node streaming updates.
- prevents the full node from halting/lagging on a slow or unresponsive client by buffering updates.
- Once the configurable buffer limit is reached, all subscriptions and buffered updates will be dropped.
-
The
grpc-streaming-buffer-size
CLI flag has been added.- Defaults to 1000. Please adjust based on the responsiveness of your client implementation.
-
Metrics emitted
- Buffer size is emitted as a gauge (
grpc_streaming_buffer_size
) - Number connections is emitted as a gauge (
grpc_streaming_num_connections
)
- Buffer size is emitted as a gauge (
Note that the grpc streaming proto changes from v4.1.3 to v4.1.4 are proto-compatible. Current grpc streaming clients will not need to be updated.
Add a channel buffer to decouple abci and grpc streaming (backport #1530) #1595
Release protocol/v5.0.0-rc5
Release v5.0.0-rc5