Neutron’s High Frequency Oracle is a critical component of the network that provides accurate price data for various assets. As a validator, you must run the Connect price oracle service alongside your node to meet performance requirements.

Overview

Connect is Neutron’s price oracle service that fetches market prices from various providers and makes them available to the Neutron blockchain. Connect is forked from Skip-mev’s Connect oracle and maintained by the Neutron team at neutron-org/connect. Running Connect properly ensures that your validator contributes accurate price data to the network, which is essential for:
  • Meeting validator performance thresholds
  • Enabling DeFi applications that require accurate price feeds
  • Supporting financial operations on the network
Oracle price update reliability is one of the key performance metrics for Neutron validators. You must maintain at least 95% success rate for oracle price updates to receive rewards.

Installation Options

Download the latest stable version of Connect:
# Download Connect v1.2.1 (or latest version)
wget https://github.com/neutron-org/connect/releases/download/v1.2.1/connect-linux-amd64
sudo mv connect-linux-amd64 /usr/local/bin/connect
sudo chmod +x /usr/local/bin/connect

Configuration

You can configure Connect using one of the following methods:
Create a systemd service file to manage the Connect service:
sudo mkdir -p /var/log/connect
sudo touch /var/log/connect/sidecar.log
sudo chown -R $USER:$USER /var/log/connect
sudo nano /etc/systemd/system/connect.service
Add the following content:
[Unit]
Description=Connect Price Oracle Service
After=network-online.target

[Service]
User=$USER
ExecStart=/usr/local/bin/connect --host=0.0.0.0 --port=8080 --market-map-endpoint="127.0.0.1:9090" --log-file="/var/log/connect/sidecar.log"
Restart=always
RestartSec=3
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
Replace $USER with your actual username and adjust the path to the Connect binary as needed. The --market-map-endpoint should point to your node’s gRPC port.

Configure Neutron Node

Edit the Neutron node’s app.toml file to enable the oracle:
nano $HOME/.neutrond/config/app.toml
Find the [oracle] section and update it:
[oracle]
enabled = "true"
oracle_address = "0.0.0.0:8080"
client_timeout = "2s"
metrics_enabled = "true"
price_ttl = "10s"
interval = "1500ms"
prometheus_server_address = "0.0.0.0:8001"
Make sure to use lowercase true for boolean values, not capitalized True. Also ensure gRPC is enabled in your app.toml.

Starting the Service

Enable and start the Connect service:
sudo systemctl daemon-reload
sudo systemctl enable connect
sudo systemctl start connect
Check the status:
sudo systemctl status connect

Verification

Verify that your Connect oracle is working correctly:
1

Check Connect Logs

sudo journalctl -u connect -f
Look for successful connection messages and price updates.
2

Check Oracle Metrics

curl -s http://localhost:26660 | grep 'app_oracle_responses'
You should see output similar to:
# HELP app_oracle_responses The number of oracle responses
# TYPE app_oracle_responses gauge
app_oracle_responses{chain_id="neutron-1",status="Failure"} 128
app_oracle_responses{chain_id="neutron-1",status="Success"} 841042
If you see Success values increasing, your setup is working correctly.

Troubleshooting

Monitoring

Set up monitoring for your oracle service to ensure it maintains the required performance thresholds:
# Create a simple monitoring script
cat > /usr/local/bin/check-oracle.sh << 'EOF'
#!/bin/bash

TOTAL=$(curl -s http://localhost:26660 | grep 'app_oracle_responses{chain_id="neutron-1",status="Success"}' | awk '{print $2}')
FAILURES=$(curl -s http://localhost:26660 | grep 'app_oracle_responses{chain_id="neutron-1",status="Failure"}' | awk '{print $2}')

SUCCESS_RATE=$(awk "BEGIN {print ($TOTAL / ($TOTAL + $FAILURES)) * 100}")

echo "Oracle success rate: $SUCCESS_RATE%"

if (( $(echo "$SUCCESS_RATE < 95" | bc -l) )); then
  echo "WARNING: Oracle success rate below 95%"
fi
EOF

chmod +x /usr/local/bin/check-oracle.sh
This simple script checks the success rate of your oracle responses. You can expand it to send alerts via Telegram, Discord, or email when the success rate falls below the threshold.

Best Practices

  • Regular Updates: Keep your Connect binary updated to the latest version from neutron-org/connect
  • Network Configuration: Ensure proper firewall rules to allow Connect to access external price providers
  • Log Rotation: Configure log rotation for Connect logs to prevent disk space issues
  • Monitoring: Set up comprehensive monitoring for oracle performance with alerting