Skip to main content

dYdX

FAQs​

Q: How do I get up and running?​

A: Here is a quick (5-10 minutes) step-by-step breakdown. Please reach out to us at skip.money/discord if you have questions!

Download the Slinky binary.​

The best way to get the Slinky binary is in the GitHub releases page for Slinky.

https://github.com/skip-mev/slinky/releases

The minimum slinky version required for dYdX is v1.0.1

We also provide a container image at ghcr.io/skip-mev/slinky-sidecar

This will include the Slinky binary, slinky.

Integrate the Slinky sidecar into your setup.​

The configuration of your validator setup requires you to tackle a few problems which we’ll mention here.

Configure the Slinky process

To run the slinky sidecar with stable defaults defined by the skip team

slinky --marketmap-provider dydx_api --market-map-endpoint https://<dydx-node REST API endpoint>

Before you complete your sidecar setup it is important that you setup your raydium API-keys + configure your sidecar to use these, see here for directions.

Notice, some default values may need to change depending on how you've setup your node + slinky-sidecar. See the Important defaults to change section in the Migration Guide

Point your chain binary at the Slinky sidecar​

The dYdX binary has been altered to accept new options which are used to configure your application. The following options in app.toml are relevant to Slinky operation. The top level config fields are as follows:

# This is a top level field which controls slinky vote extension enablement.
# It should always be set to true.
slinky-vote-extension-oracle-enabled = "true"

The following fields are specific to the oracle config section:

###############################################################################
### Oracle ###
###############################################################################
[oracle]
# Enabled indicates whether the oracle is enabled.
enabled = "true"

# Oracle Address is the URL of the out of process oracle sidecar. This is used to
# connect to the oracle sidecar when the application boots up. Note that the address
# can be modified at any point, but will only take effect after the application is
# restarted. This can be the address of an oracle container running on the same
# machine or a remote machine.
oracle_address = "localhost:8080"

# Client Timeout is the time that the client is willing to wait for responses from
# the oracle before timing out.
client_timeout = "2s"

# MetricsEnabled determines whether oracle metrics are enabled. Specifically
# this enables intsrumentation of the oracle client and the interaction between
# the oracle and the app.
metrics_enabled = "true"

Get your free API Keys and configure your decentralized provider endpoints​

Slinky supports the addition of state-RPCs to gather data directly from Solana and EVM chains. The Skip and dYdX team have already set up relationships and pre-paid for API endpoints you can use to get this data.

For each RPC URL, you will need an API key unique to your validator. To get this, go to the dYdX validator slack channel (which you should already be invited to once you make it into the active set), and request API keys from Helius, Polkachu, KingNodes, LavenderFive, and RhinoStake. Each of these are necessary to load into your config so your decentralized providers can work properly.

Once you have your 5 API keys, create an oracle.json and populate it as follows with your API keys. You should use the URLs listed below, and ask on the Slack #ext-dydx-validators-discussion or #v-dydx-private-testnet-discussion channels: for API keys to fill in below.

{
"providers": {
"raydium_api": {
"api": {
"endpoints": [
{
"url": "https://solana.polkachu.com",
"authentication": {
"apiKeyHeader": "x-api-key",
"apiKey": "API KEY YOU'VE RETRIEVED FROM SLACK"
}
},
{
"url": "https://slinky-solana.kingnodes.com",
"authentication": {
"apiKeyHeader": "x-api-key",
"apiKey": "API KEY YOU'VE RETRIEVED FROM SLACK"
}
},
{
"url": "https://solana.lavenderfive.com",
"authentication": {
"apiKeyHeader": "x-api-key",
"apiKey": "API KEY YOU'VE RETRIEVED FROM SLACK"
}
},
{
"url": "https://solana-rpc.rhino-apis.com",
"authentication": {
"apiKeyHeader": "x-api-key",
"apiKey": "API KEY YOU'VE RETRIEVED FROM SLACK"
}
},
{
"url": "https://dydx.helius-rpc.com",
"authentication": {
"apiKeyHeader": "x-api-key",
"apiKey": "API KEY YOU'VE RETRIEVED FROM SLACK"
}
}
]
}
}
}
}

Once you've created this file, you may run your sidecar as follows:

slinky --marketmap-provider dydx_api --market-map-endpoint https://<dydx-node REST API> --oracle-config <path to oracle.json>

Q: How do I know if my validator is properly fetching prices and posting them to the chain?​

A: A full set of prometheus metrics are integrated into both the sidecar and the dYdX application binary.

A comprehensive overview of the relevant side-car metrics is hosted in the root metrics.md. This document includes a grafana dashboard that can be utilized to monitor the sidecar. Apart from the Slinky SideCar Dashboard, we highly recommend the LavenderFive and RhinoStake monitoring dashboards which are built to be used with the Slinky sidecar.

To check if the sidecar is properly fetching prices, you can run curl localhost:8080/slinky/oracle/v1/prices | jq - where localhost:8080 is the default address of the sidecar. This will return a JSON object with the prices the sidecar has fetched.

To check if the dYdX application is properly fetching prices from the sidecar, you can run curl -s http://localhost:26660 | grep 'app_oracle_responses' - where localhost:26660 is the local prometheus endpoint of the dYdX application.

Additionally, the logs from your dYdX node binary will contain the following error if it is unable to connect to Slinky to grab prices:

Failed to run fetch prices for slinky daemon

If you are having issues, please read over the live support section below.

Q: How do I upgrade the sidecar binary?​

A: Upgrading the sidecar can be done out of band of the chain’s binary. If you have a load balancer, CNAME, etc., in front of your sidecar you can simply start up the new version and switch out which version traffic is being directed to during live chain validation.

If you are running the Slinky sidecar in a container you can shut down the container, pull the updated container image and relaunch your container to update.

If you are running the binary via systemd or other management tool, you will need to stop the process and re-launch using the newly released binary.

The dydx node will still be able to participate in consensus without the sidecar, and will begin attaching prices to blocks once Slinky is available. In the worst case, an upgrade in any of these manners will cause you to miss including vote extensions for a single block which should have no negative effects on you or the network.

Q: Which version of the sidecar binary should I be running?​

A: We are currently in the process of designing solutions around giving validators reliable signals for exactly the minimum version of sidecar they need to be running.

In the short term, sidecar version bumps will be scheduled well in advance of any required upgrade and comms will be sent out in the relevant validator channels with the exact version required, and any changes which are relevant to the operator experience.

For future releases we are working with the dYdX team and validators to build automation around version bumps and reasoning about compatibility based on on-chain data. We plan to increase the cadence of updates in line with feature additions, as opposed to batching for larger releases on a longer timeline.

Q: Is there a place I can go to get live support?​

A: For Slinky related issues, join the Skip discord skip.money/discord. Follow the onboarding prompts and get certified as a validator—you will be able to join dedicated discord channels based on which chain you are a validator for (dYdX).

For general issues related to dYdX, your normal support channels remain the same. If you can’t reach anyone from the Skip team for some reason which is critical, the dYdX team will be able to pull us in quickly as well.