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.
points are stacked in every rebase(10 blocks). When an era ends, the block reward is divided by half to reward network validators, and oracles. oracles get block reward proportionally to their stacked point in an era. oracle providers are replaced with new ones in oracle provider pool.
quicksort oracle data in reward distribution
outlier is detected with x < p25 - 1.5 * (p75 - p25) or x > p75 + 1.5 * (p75 - p25)
check if the outlier is within range of 1% error
if it is, slash the oracle node by 1/3.
reward rest of the node.