Skip to content

Releases: dydxprotocol/v4-chain

Release protocol/v4.0.0-dev1

23 Feb 07:27
efb358f
Compare
Choose a tag to compare
Pre-release

Release v4.0.0-dev1

Release Candidate: Protocol v4.0.0-rc2

15 Feb 21:54
2571114
Compare
Choose a tag to compare
Pre-release

Fix unnecessary home directory creation issues (backport #1073) (#1075)

Indexer v3.0.1

09 Feb 20:16
43b8aeb
Compare
Choose a tag to compare

Indexer v3.0.1 Release Notes

  • Introduces a performance improvement to queries to the funding_index_updates psql table to reduce db load (#1065)

Release Candidate: Protocol v4.0.0-rc1

09 Feb 18:53
49dc3b9
Compare
Choose a tag to compare
Pre-release
protocol/v4.0.0-rc1

Release Candidate: Indexer v4.0.0-rc1

09 Feb 20:19
21f6358
Compare
Choose a tag to compare
Pre-release

Release Candidate Indexer v4.0.0-rc1 Release Notes

  • Introduces a performance improvement to queries to the funding_index_updates psql table to reduce db load (#1065)

Release Candidate: Protocol v4.0.0-rc0

07 Feb 23:14
c7bcbf6
Compare
Choose a tag to compare
Pre-release

Release candidate for testnet.

Protocol v4.0.0 Draft Release Notes

Highlights

This release includes changes in three major areas:

  • Order Book Features
    • Reduce-Only Orders
    • Conditional Order Improvements
  • Risk and Safety Improvements
    • IBC Withdrawal Rate Limiting
    • Subaccount Withdrawal Gating
    • Community Enabled Slashing
  • Cosmos-related Improvements
    • Added x/authz module
    • Cosmos SDK v0.50 Upgrade

See below for a detailed breakdown of the changes.

What's New?

Reduce-Only Orders

This feature adds support for Fill-Or-Kill and Immediate-Or-Cancel + Reduce-Only orders. Reduce-Only orders may not be enabled on any other order types. FOK or IOC orders can be either short term or conditional. Reduce-only orders can be submitted to the protocol by marking the timeInForce boolean field on the Order object to be true . Support for non-FOK or IOC Reduce Only orders will be added in a future update.

  • Indexer account for reduce only resize errors (#963)
  • E2E Tests for Replacement RO Orders, allow all types of RO order replacements (#949)
  • Reduce Only FOK e2e tests (#939)
  • Allow FOK/IOC Reduce Only Orders (#919)

Conditional Order Improvements

Improved the telemetric and triggering for conditional orders.

  • Add latency and gauge metrics for conditional orders (#1014)
  • Add some telemetry for conditional order triggering (#958)
  • Trigger conditional orders using traded price within the block (#945)
  • Update state R/W methods (#938)
  • State R/W methods for last trade price (#910)

IBC Withdrawal Rate Limiting

This safety feature adds rate-limiting for asset withdrawal from the dYdX chain, analogous to the IBC rate limit modules on Stride and Osmosis. It uses a Continuous Token Bucket algorithm as the underlying rate-limit mechanism, where withdrawal capacity recovers towards a baseline during each block. Default parameters only include rate limit for USDC.

The default software rate limits net-withdrawal of Noble USDC, at below levels:

max(1% of TVL, $1mm) per hour
AND
max(10% of TVL, $10mm) per day

These rate limit parameters can be updated by governance via MsgSetLimitParams.

  • Update default rate limit params for USDC (backport #1056) (#1057)
  • Add licensing info in x/ratelimit and attributions to Stride (backport #1031) (#1036)
  • Fix x/ratelimit ProcessWithdrawal logic; improve info logs (backport #1044) (#1050)
  • Add upgrade handler for ratelimit keeper (#1019)
  • Implement queries for x/ratelimit; get limiter and capacity together in keeper (#1013)
  • Wire x/ratelimit methods to IBC transfer logic (#962)
  • Implement messages, genesis in x/ratelimit (#968)
  • x/ratelimit: Implement UpdateCapacityEndBlocker (#941)
  • Implement GetBaseline (#897)

Subaccount Withdrawal Gating

Subaccount withdrawal gating will block all subaccount transfers and withdrawals for 50 blocks. Withdrawal gating will be triggered if 5 minute chain outage occurs or a negative equity subaccount cannot be liquidated / deleveraged.

  • Add RPC query endpoint for withdrawal gating block heights (#964)
  • Halt withdrawals if chain outage seen within the last 5 minutes (#955)
  • Fix withdrawal gating double usage of metrics name for two different types of counters. (#972)
  • Gate withdrawals if negative TNC subaccount encountered after liquidation and deleveraging steps (#936)
  • Write block number to state when encountering zero-fill deleveraging op (#904)
  • Block withdrawals if a negative equity subaccount was recently seen in state (#878)

Community Enabled Slashing

Exposed a MsgSlashValidator message that can be included in a governance proposal. This can be used by the community to slash validators that have misbehaved.

  • Implement x/govplus MsgSlashValidator (#1016)
  • Scaffolding x/govplus module (#1011)

Added x/authz Module

By popular request, the x/authz module was added from cosmos-sdk.

  • Enable authz module to allow granting privileges (#960)

Cosmos SDK v0.50 Upgrade

The Cosmos SDK has been upgraded to v0.50.3 allowing features such as optimistic execution and vote extensions to be enabled in future protocol releases. See the Cosmos SDK 0.50.0 release announcement and release notes for additional details.

  • Bump Cosmos-SDK version for updated default gov parameters (#1017)
  • Disable MsgCancelProposal (#1015)
  • Re-add Rosetta cmd (#1002)
  • Upgrade Cosmos to 0.50.3 to be able to re-add rosetta cmd. (#1000)
  • Remove genesis check that isn't needed since the issue was with how testapp was simulating block processing. (#993)
  • Reduce usage of basic_manager.ModuleBasics in favor of using module.NewBasicManagerFrom... (#984)
  • Fix CLI tests to correctly generate module address (#981)
  • Update usage of mocks and re-enable test. (#975)
  • Fix bogus account numbers being generated in tests and re-enable tests. (#976)
  • Ensure that we use the client context with AutoCLI (#966)
  • Have testing genesis.sh match expected gov parameters for 0.50 (#935)
  • Add 4.0.0 upgrade handler for Cosmos 0.47 -> 0.50 upgrade handler. (#918)
  • Integrate AutoCLI as part of Cosmos 0.47 -> 0.50 upgrade and re-add a few standalone commands that changed packages (#932)
  • Remove DB shutdown, Cosmos 0.50 SDK does this now in BaseApp (#920)
  • Address nit and fix Cosmos 0.50 post merge conflict (#922)
  • Upgrade to Cosmos 0.50.1 and CometBFT 0.38 (#867)

Bug Fixes

  • Fix --home flag being ignored in cosmos v0.50 (backport #1053) (#1055)
  • Fix settled funding event emission (backport #1051) (#1054)
  • Make funding payment event ordering deterministic (#921)

Other

  • Migrate more callsites to the new logging library + new unwrapSdkContext (#1047)
  • Migrate more logs to new logging lib, add lib.UnwrapSDKContext (#1003)
  • Remove delaymsg from module_accounts list (#978)
  • Final settlement e2e tests (#926)
  • Logging Library with Contextual Tags (#872)

Release Candidate: Indexer v4.0.0-rc0

07 Feb 23:14
4dd753e
Compare
Choose a tag to compare
Pre-release

Release candidate for testnet.

Indexer v4.0.0 Draft Release Notes

What's New?

Trading Rewards

  • Fix Aggregate Historical Trading rewards and always use generated id in tables (#1022) (#1024)
  • Fix typo for historical trading rewards (#1020)
  • Remove first block from aggregate trading rewards roundtable task interval (#965)
  • Start processing aggregate trading rewards from first reward (#959)
  • Add historical trading reward block and aggregation endpoints (#954)
  • Add logic to aggregate trading rewards (#952)
  • Update /v4/addresses/:address to return totalTradingRewards (#933)
  • Add support for trading reward tables in Athena (#930)
  • Add AggregateTradingRewardsProcessedCache with roundtable task (#927)
  • Create Aggregate trading rewards roundtable task outline (#917)

Other API Changes

  • Fix addresses endpoint requiring Wallet (#1010)

Other Bug Fixes

  • Fix occasional missing pnl ticks (#951)

Other

  • Add missing index (#1039) (#1041)
  • Add index to address for compliance_data (#1001)
  • Update default postgres options for tables (#999)
  • Wait until bazooka image finishes upgrading before running bazooka in auxo lambda (#973)
  • Update datadog agent image to use ECR hosted image. (#969)
  • Add lock multiplier for pnl ticks roundtable task (#953)
  • Add roundtable task to take fast sync Postgres snapshots every 4 hours (#912)
  • Add more granular stats for liquidations/deleveraging (#925)
  • Update BlockTable.getLatest to throw an error and simplify logic (#915)

Protocol v3.0.0

19 Jan 03:31
85fb10a
Compare
Choose a tag to compare

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.

  • (x/ratelimit) Scaffolding code for x/ratelimit (#870)
  • (x/ratelimit) Initial protos for x/ratelimit (#864)
  • (x/ratelimit) Implement keeper methods for LimitParams and DenomCapacity (#877)

Indexer v3.0.0

18 Jan 23:07
08fb729
Compare
Choose a tag to compare

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

17 Jan 19:23
08fb729
Compare
Choose a tag to compare
Pre-release

Protocol-compatible Indexer release candidate for testnet. Deprecates non-linear margin requirements. Promoted to v3.0.0.