Validators
Oracle Price Feeder

Running an Oracle Price Feeder

Sei has an Oracle module to support asset exchange rate pricing for use by other modules and contracts. When validating for the network, participation as an Oracle is expected and required in order to ensure the most reliable and accurate pricing for assets.

For each voting window, a validator must provide asset pricing for the whitelisted assets. At the end of each of these voting windows, the votes are aggregated, and the chain computes a weighted median based on validator voting power to compute the effective exchange rate on a per-asset basis.

Price Feeder

Validator need to participate in providing pricing for the oracle to avoid being penalized and jailed. There is an oracle sidecar that can be configured to run as a systemd service to provide a more robust and configurable solution to providing oracle asset prices. The sidecar can be built by running

make install-price-feeder

from the sei-chain repo dir. You need an associated config file that specifies the account from which to send oracle votes along with additional configuration information such as assets to provide and providers to use for pricing information (example (opens in a new tab)).

Systemd File Template

[Unit]
Description=Oracle Price Feeder
After=network.target
 
[Service]
User=root
Type=simple
Environment="PRICE_FEEDER_PASS={your keyring password for the oracle account here}"
# alternatively to `Environment`, validators can use `EnvironmentFile` to designate a file from which to get env var info
ExecStart=/root/go/bin/price-feeder /path/to/oracle/price_feeder_config.toml
Restart=on-failure
LimitNOFILE=6553500
 
[Install]
WantedBy=multi-user.target

Oracle Penalties

There are penalties for non-participation and participation with bad data. Validators have a miss count and abstain count that is tracked. The abstain count tracks the number of voting windows that the validator did not submit a vote. The miss count tracks the number of voting windows that the validator's vote was improper (either had data that was outside of 1 standard deviation, or didn't contain asset prices for all whitelisted assets). There is a slash window, which is a period of blocks specified by oracle parameters, across which if the validator has too many misses and/or abstains, they are slashed and jailed. This is because oracle integrity and freshness is treated as a core chain service, and validators that do not participate in the upkeep of oracle asset pricing are penalized. Note that misses and abstains both contribute to oracle penalization

Feeder Delegation

If you want to run the oracle price feeder while signing from a different account (recommended), you can set that up by setting a feeder for your validator. This will allow the feeder account to perform oracle votes on the validator behalf as well.

seid tx oracle set-feeder $FEEDER_ADDR --from $WALLET_NAME --fees 2000usei --chain-id $CHAIN_ID