Releases: dydxprotocol/v4-chain
Protocol v3.0.0
Protocol v3.0.0 Release Notes
What's New?
Interchain Accounts (ICA) Host Module
The Host sub-module of the Interchain Accounts Module is enabled. This enables the dYdX chain to act as a Host Chain where interchain accounts can be registered by other controller chains. See detailed documentation on the Interchain Accounts module.
- (app) Add ICA Host Submodule (#899)
Liquidations Daemon Improvements
Liquidations daemons performance improvements by minimizing the number of RPC queries made against the main application. This reduces lock contention with other ABCI callbacks and enables optimizations in net collateral and margin requirement calculations.
- (daemons/liquidations) Optimize OffsetSubaccountPerpetualPosition subaccount iteration (#906)
- (daemons/liquidations) Replicate IsLiquidatable logic on daemon (#873)
- (daemons/liquidations) Proto updates for daemon liquidation request (#885)
- (daemons/liquidations) Update daemon liquidation info to include negative tnc subaccounts and open positions (#879)
- (daemons/liquidations) Organizational update for liquidation daemon (#855)
- (daemons/liquidations) Add grpc to get all perpetuals and liquidity tiers (#859)
- (daemons/liquidations) Add grpc to get previous block info (#856)
- (daemons/liquidations) Add grpc to get all market prices (#857)
Winding Down Markets
Markets can now be closed down. Markets whose clob pairs are transitioned to the FINAL_SETTLEMENT status will have open positions closed at the oracle price and open stateful orders cancelled. All trading for the market is suspended.
- (x/clob) Allow FINAL_SETTLEMENT clob pair status, block trading, cancel open stateful orders, and close open positions via oracle-price deleveraging (as opposed to bankruptcy-price deleveraging) (#829)
Deprecate non-linear margin requirements
Non-linear margin requirements removed as a feature. Margin requirements will no longer be scaled up if position size exceeds certain threshold.
- (x/clob) Deprecate non-linear margin requirements (#836)
Bug Fixes
- (x/bridge) Do not error when completing a bridge with non-positive amount (#691)
- (x/clob) Small
PrepareCheckState
fixes (#695)
Other
- (x/clob) Validate enums in MsgPlaceOrder protos (#931)
- (app) Add empty string check to string flag parsing (#883)
- (x/rewards) Emit TradingRewardEventV1 events in rewards module (#850)
- (daemons) Migrate daemon monitoring to use health checks (#783)
- (app) Add flag to format tag values for datadog error tracking (#858)
- (app) Fix CLOB flag parsing for MEV telemetry hosts (#876)
- (daemons) Restore pricefeed config tomls (#863)
- (app) Add debug tendermint command (#723)
- (daemons/bridge) Panic on startup if eth rpc endpoint is not provided (#725) (#710)
- (x/clob) Duplicate validation checking for ProcessProposerMatchesEvents (#708)
- (daemons/pricefeed) Add tracking for market availability in order to alert in datadog (#706)
- (x/perpetuals) Add queries for x/perpetuals state (#686)
- (x/clob) CLI commands for x/clob params (#699)
- (app) Add generic json printer to help format customtypes in protos (#702)
- (app) Remove extraneous authtypes.NewModuleAddress, consolidate constants (#641)
- (daemons/pricefeed) Always log market id when pair information is missing. (#694)
- (app) Remove Reset method and swap to appOptions/baseAppOptions being explicitly set instead of an appCreatorFn (#697)
- (x/delaymsg) Explicitly log out delayed message when execution fails (#687)
[In Development] Withdrawal Rate Limiting
In-progress safety feature to rate limit asset withdrawal from the dYdX chain, analogous to the IBC rate limit module on Osmosis. The feature is planned to go live in the next major version. Changes so far do not affect behavior of the software.
Indexer v3.0.0
Indexer v3.0.0 Release Notes
API
- Deprecate basePositionNotional in Indexer APIs (#971)
- Block subscribing to subaccounts from restricted regions for read-only mode. (#896)
- Update api documentation (#781)
- Add new TradeType field (#789) (#788) (#779)
- Websockets: Send final message per order id for order fills, with aggregated fills from the entire block (#658)
- Remove unused socks fields and add candle resolutions for websockets (#633)
Ender SQL Optimizations
- Organize Ender SQL scripts (#860)
- Use a single SQL function to process a block. (#827)
- Fix line numbers in SQL function stack traces (#821)
- Remove market cache. (#818)
- Delete price cache in ender. (#815)
- Remove non-SQL implementation of creating initial rows (#816)
- Update handlers to use SQL function only removing the Knex option (#811)
- Refactor out looking up clob pair into SQL function. (#784)
- Improve comments, remove SQL function that wasn't being used, fix some stylistic choices in case statements. (#780)
- Update all stateful order handlers to use a SQL function to perform reads & updates. (#774)
- Update ender funding to execute updates via a SQL function. (#770)
- Update ender transfer handler to execute updates via a SQL function. (#763)
- Update ender liquidity tier upsert to execute updates via a SQL function. (#761)
- Update ender perpetual market create to execute updates via a SQL function. (#760)
- Update ender update perpetual handler to execute updates via a SQL function. (#755)
- Update ender
update clob pair
handler to execute via a SQL function. (#752) - Update asset create handler to use SQL function. (#748)
- Update
ender
market price update handler to execute updates via a SQL function. (#746) - Push ender market modify logic to use a single SQL function (#745)
- Push ender market create logic to use a single sql function (#737)
- Add support for liquidation handler to use a single SQL function. Also fix fill and order models since clientMetadata is a nullable field. (#734)
Bug Fixes
- Handle invalid TimeInForce emitted from protocol (#948)
- Prevent IOC/FOK orders from changing order book levels / sending updates. (#898)
- Remove adjusted margin fraction calculation (#903)
- Fix unsettled funding sign (#854)
- Update order side when replacing. Fix liquidations side bug. (#807)
- Don't send cancel messages if orders are fully filled in state. (#754)
- Prevent orders transitioning from canceled to best effort canceled (#753)
- Do not send subaccount websocket message for unplaced and unreplaced BEST_EFFORT_OPENED orders (#716)
- Have vulcan re-queue cached order updates instead of ender. (#688)
- Prevent blocks from being skipped by ender (#639)
- Fix order handler to return correct updatedAt/updatedAtHeight (#733)
Final Settlement and Deleveraging
- Add FINAL_SETTLEMENT to perpetual markets status constraint (#943)
- Allow FINAL_SETTLEMENT and cancel open stateful orders (#829)
- Update MatchPerpetualDeleveraging and DeleveragingEventV1 to have final settlement flag (#833)
- Add protos for final settlement clob pair status and removal reason (#828)
- Handle deleveraging events (#730)
- Process deleveraging events emitted from protocol (#736)
Trading Rewards
- Fix Trading reward event processing (#916)
- Add TradingRewardsHandler (#902)
- Add TradingRewardEventV1 (#837)
- Create trading_rewards postgres table (#822)
- Create trading_reward_aggregations postgres table (#825)
- Update wallets postgres table with totalTradingRewards field (#819)
Stateful Orders
- Cache and send order updates for stateful orders. (#683)
- Add cache for order updates for stateful orders. (#682)
Other
- Upgrade Indexer cosmos dependency versions (#888)
- Add more Indexer stats around funding indices (#861)
- Add more pnl stats (#826)
- Add fees to fills Athena DDL table. (#824)
- Track lag for block time to ingestion time (#820)
- Remove unused lastPrice from perpetual_markets table (#813)
- Query for PerpetualPositions by openEventId (#777)
- Default athena snapshots to be off (#775)
- Send timing fields for orders when possible (#768)
Release Candidate: Indexer v3.0.0-rc2
Protocol-compatible Indexer release candidate for testnet. Deprecates non-linear margin requirements. Promoted to v3.0.0.
Release Candidate: Protocol v3.0.0-rc1
Release candidate for testnet. Promoted to v3.0.0.
Release Candidate: Indexer v3.0.0-rc1
Protocol-compatible Indexer release candidate for testnet.
Release Candidate: Indexer v3.0.0-rc0
Protocol-compatible Indexer release candidate for testnet. Superceded by v3.0.0-rc1.
Release Candidate: Protocol v3.0.0-rc0
Release candidate for testnet. Superceded by v3.0.0-rc1.
Indexer v1.0.4 Release Notes
Indexer v1.0.4 Release Notes
v1.0.4
contains an emergency patch for an invalid TimeInForce
value in an order fill event on-chain that leads to ender
being unable to process block 4686923.
Bugfixes
- (ender) Handles invalid
TimeInForce
values in theOrderFillEvent
asGTT
Indexer v1.0.3 Release Notes
Indexer v1.0.3 Release Notes
v1.0.3
contains fixes for unsettled funding and unrealized pnl.
Bugfixes
- (comlink) Fixed bug where unsettled funding had sign inverted.
Protocol v2.0.0
Protocol v2.0.0 Release Notes
v2.0.0
contains an upgrade handler that properly initializes module accounts as ModuleAccount
. This fixes a chain-halting vulnerability if an account managed to be improperly initialized (7a32aa9).
In code paths where a ModuleAccount
is expected, an account will be lazily initialized as ModuleAccount
. If an account already exists, a type assertion to ModuleAccount
is performed, and upon failure the program will panic. This assertion fails if the account has somehow been initialized as a BaseAccount
prior to its first usage as a ModuleAccount
. For example, if a bank send is performed, an uninitialized destination account will be initialized as a BaseAccount
.
Once a module account has been initialized as a BaseAccount
, all paths that expect a ModuleAccount
will panic. In particular, the x/vest
BeginBlocker
will panic if the treasury account is a BaseAccount
. Thus, it is possible to halt a chain with uninitialized module accounts with two bank sends: Send balance to a treasury account to initialize it as BaseAccount
, and then send to its corresponding vest account to initiate vesting.
A few other code paths are also affected by this. For example, querying an incorrectly initialized module account through the x/auth
module_account
endpoint will error.
Go version
1.21