The Oracle module is an election and price feed information module which stores prices from external data with asset IDs from the Token module as keys. Oracle providers are elected in every era with the amount staked from the users. Oracle providers produce price information and are rewarded in each era on each block reward. Prices are stored in the state, and oracle providers are reviewed in each era. If they produce outliers, they get slashed. The total reward for each oracle provider in each era is recorded by the Reward module and stakers can get their rewards by claiming them.
A High-level overview diagram of the components that involve and interact with the module:
In Standard's oracle ecosystem, maintainer of the oracle in the blockchain is defined as provider. Provider maintains their oracle client lumen, and they deliver off-chain informations to the blockchain.
Slasher submits slashing request for slashing out the malicious provider submitting falsified information for a certain slot. Runtime verifies whether the provider has done malicious actions with the algorithm below:
sort oracle batch submitted from multiple oracle providers
2. outlier is detected with x < p25 - 1.5 * (p75 - p25) or x > p75 + 1.5 * (p75 - p25)
3. check if the outlier is within range of 1% error
4. if it is, slash the oracle node by the slashing algorithm coded in the module.
Stakers secure the Relay Chain by selecting good providers and staking STND.
Stakers can share earning fresh STND from block reward from nominating oracle providers to provide data to Standard.
By nominating oracle provider with STND, you become a nominator for the provider(s) of your choice. Pick your provider carefully - if they do not behave properly, they will get slashed and you will lose STND as well. However, if they do follow the rules of the network, then you can share in staking rewards that they generate.
While your STND are staked by nominating a validator, they are 'locked' (bonded). You can receive new DOT in your account but you cannot stake as validator or transfer STND away from your account. You can un-nominate at any time to stop staking your funds. Keep in mind that the un-nomination is effective in the next era, and that un-nominating does not automatically unbond your funds. There is an unbonding period of certain days before bonded funds can be transferred after issuing an unbond transaction.