38 lines
2.3 KiB
Markdown
38 lines
2.3 KiB
Markdown
## Abstract
|
|
|
|
The Oracle module provides ClawChain with up-to-date and accurate price feeds of exchange rates of CLAW against various denominations so that on-chain services (DEX, marketplace, agent economy) have fair pricing data.
|
|
|
|
As price information is extrinsic to the blockchain, the ClawChain network relies on validators to periodically vote on current exchange rates, with the protocol tallying up the results once per `VotePeriod` and updating the on-chain exchange rate as the weighted median of the ballot.
|
|
|
|
> Forked from [Terra Classic](https://github.com/classic-terra/core) v4.0.0 `x/oracle` (Apache 2.0). Price feeder forked from [Ojo](https://github.com/ojo-network/price-feeder) (Apache 2.0).
|
|
|
|
> Since the Oracle service is powered by validators, you may find it interesting to look at the [Staking](https://github.com/cosmos/cosmos-sdk/tree/master/x/staking/spec/README.md) module, which covers the logic for staking and validators.
|
|
|
|
## Contents
|
|
|
|
1. **[Concepts](01_concepts.md)**
|
|
- [Voting Procedure](01_concepts.md#Voting-Procedure)
|
|
- [Reward Band](01_concepts.md#Reward-Band)
|
|
- [Slashing](01_concepts.md#Slashing)
|
|
- [Abstaining from Voting](01_concepts.md#Abstaining-from-Voting)
|
|
2. **[State](02_state.md)**
|
|
- [ExchangeRatePrevote](02_state.md#ExchangeRatePrevote)
|
|
- [ExchangeRateVote](02_state.md#ExchangeRateVote)
|
|
- [ExchangeRate](02_state.md#ExchangeRate)
|
|
- [FeederDelegation](02_state.md#FeederDelegation)
|
|
- [MissCounter](02_state.md#MissCounter)
|
|
- [AggregateExchangeRatePrevote](02_state.md#AggregateExchangeRatePrevote)
|
|
- [AggregateExchangeRateVote](02_state.md#AggregateExchangeRateVote)
|
|
- [TobinTax](02_state.md#TobinTax)
|
|
3. **[EndBlock](03_end_block.md)**
|
|
- [Tally Exchange Rate Votes](03_end_block.md#Tally-Exchange-Rate-Votes)
|
|
4. **[Messages](04_messages.md)**
|
|
- [MsgExchangeRatePrevote](04_messages.md#MsgExchangeRatePrevote)
|
|
- [MsgExchangeRatePrevote](04_messages.md#MsgExchangeRatePrevote)
|
|
- [MsgDelegateFeedConsent](04_messages.md#MsgDelegateFeedConsent)
|
|
- [MsgAggregateExchangeRatePrevote](04_messages.md#MsgAggregateExchangeRatePrevote)
|
|
- [MsgAggregateExchangeRateVote](04_messages.md#MsgAggregateExchangeRateVote)
|
|
5. **[Events](05_events.md)**
|
|
- [EndBlocker](05_events.md#EndBlocker)
|
|
- [Handlers](05_events.md#Handlers)
|
|
6. **[Parameters](06_params.md)** |