Skip to content

Commit

Permalink
added arch document
Browse files Browse the repository at this point in the history
  • Loading branch information
scottburch committed Feb 13, 2021
1 parent 927ccd9 commit a6da353
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions x/oracle/docs/arch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Description

The feeder and processor in the oracle runs as a Cosmos module that encompasses both functions.

### Feeder

A feeder is responsible to fetch the data from remote sources and send the resulting data to the processor

### Processor

A processor is responsible for combining and filtering votes to produce a single value that it writes to the DB.

# Oracle flow

### Feeders

* Feeders start and read their configuration from the CRUD module

* Feeders then request information from the sources provided in the configuration

* For each source a preflight vote proof is generated and put on the blockchain

The preflight consists of the vote hashed with the address of the validator (to prevent free-riders)

* For each source at 20 seconds past the minute a vote is cast on the blockchain that matches the value in the preflight proof

### Processors

* Listens for preflight proofs and votes on the blockchain
* When a vote is received it is compared with the preflight proof - if the proof does not match, the vote is discarded
* votes are then compared and combined using a combination of weights and elimination rules
* A single value is written to the DB for each source along with the votes that led to the single value


0 comments on commit a6da353

Please sign in to comment.