Skip to content

Commit 90e95c7

Browse files
committed
markdownlint . --fix
1 parent 63d2130 commit 90e95c7

File tree

5 files changed

+37
-27
lines changed

5 files changed

+37
-27
lines changed

contrib/devtools/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
Thanks to the entire Cosmos SDK team and the contributors who put their efforts into making simulation testing
44
easier to implement. 🤗
55

6-
https://github.com/cosmos/cosmos-sdk/blob/master/contrib/devtools/Makefile
6+
<https://github.com/cosmos/cosmos-sdk/blob/master/contrib/devtools/Makefile>

price-feeder/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

2-
32
# Oracle Price Feeder
3+
44
This is Juno's version of [Umee's price feeder](https://github.com/umee-network/umee/tree/main/price-feeder), intended to work with SDK 0.45.11.
55

66
The `price-feeder` tool is an extension of Juno's `x/oracle` module, both of
@@ -51,7 +51,7 @@ More information on the keyring can be found [here](#keyring)
5151
Please see the [example configuration](price-feeder.example.toml) for more details.
5252

5353
```shell
54-
$ price-feeder /path/to/price_feeder_config.toml
54+
price-feeder /path/to/price_feeder_config.toml
5555
```
5656

5757
## Configuration

price-feeder/price-feeder.md

Lines changed: 28 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,48 @@
11
# Price feeder documentation
22

33
## Description
4-
A side-car process that Juno validators must run in order to provide Juno's on-chain price oracle with price information.
4+
5+
A side-car process that Juno validators must run in order to provide Juno's on-chain price oracle with price information.
56

67
The ```price-feeder``` tool are based on Terra's [x/oracle](https://github.com/terra-money/classic-core/tree/main/x/oracle) module and [oracle-feeder](https://github.com/terra-money/oracle-feeder).
78

8-
## Overview:
9+
## Overview
910

1011
Juno ```price-feeder``` includes 2 components:
12+
1113
- PriceFeeder: responsible for obtaining price information from various reliable data sources, e.g. exchanges, and exposing this data via an API.
1214
- PriceOracle: consumes this data and periodically submits vote and prevote messages following the oracle voting procedure.
1315

14-
When ``PriceOracle`` start, it loops a process called ``Tick`` with 1000 milisecond interval.
16+
When ``PriceOracle`` start, it loops a process called ``Tick`` with 1000 milisecond interval.
17+
18+
## ```Tick``` process in detail
1519

16-
## ```Tick``` process in detail:
1720
1. GetParamCache: Get the latest parameters in x/oracle
18-
2. SetPrices: Retrieve all the prices and candles from our set of providers as determined in the config. Calculate TVWAP or VWAP prices, warns missing prices, and filters out any faulty providers.
21+
2. SetPrices: Retrieve all the prices and candles from our set of providers as determined in the config. Calculate TVWAP or VWAP prices, warns missing prices, and filters out any faulty providers.
1922
3. Vote/Prevote exchangeRate.
2023

21-
## ```SetPrices``` in detail:
24+
## ```SetPrices``` in detail
25+
2226
1. Get all price providers
2327
2. Collect prices from providers and set prices to local var.
2428
3. Compute the prices and save it to ``oracle.prices``.
2529
- Convert any non-USD denominated candles into USD
2630
- Filter out any erroneous candles
2731

28-
- ComputeTvwapsByProvider and ComputeTVWAP.
29-
- Check if tvwapPrices available, else use recent prices & VWAP instead.
30-
- ConvertTickersToUSD and FilterTickerDeviations.
31-
- ComputeVWAP.
32+
- ComputeTvwapsByProvider and ComputeTVWAP.
33+
- Check if tvwapPrices available, else use recent prices & VWAP instead.
34+
- ConvertTickersToUSD and FilterTickerDeviations.
35+
- ComputeVWAP.
36+
37+
### TVWAP calculate process
3238

33-
### TVWAP calculate process:
34-
TVWAP is time volume weighted average price.
39+
TVWAP is time volume weighted average price.
3540

3641
**Input**: Map(provider => Map(base => CandlePrice))
3742

3843
**Output**: Map(base => price)
3944

40-
**Process**:
45+
**Process**:
4146

4247
For each candle within 5 timePeriod (5 mins), we calculate:
4348

@@ -56,34 +61,38 @@ where:
5661
Then use VWAP formula for `volumeSum` and `weightedPrices`
5762

5863
**VWAP formula**:
59-
VWAP is volume weighted average price.
64+
VWAP is volume weighted average price.
6065

6166
vwap[base] = weightedPrices[base] / volumeSum[base]
6267

6368
### Explain TVWAP
6469

6570
TWAP is the average price of a financial asset over a certain period of time. The time period is chosen by the trader based on the market analysis and trading strategy adopted. TWAPs are normally used to execute large-volume trades in smaller chunks without disturbing the market. Large-scale institutional traders track TWAP values and trade by dividing their orders into smaller parts to try and keep their orders as close to TWAP values as possible.
6671

67-
TWAP benefits:
72+
TWAP benefits:
73+
6874
- Lower likelihood of causing asset price volatility when placing large orders
6975
- Ability to hide your market strategy from other large-volume traders
7076
- Good strategy for those who prefer trading by placing frequent daily orders
7177
- Applicability to algorithmic trading strategies
7278

73-
TWAP limitations:
79+
TWAP limitations:
80+
7481
- The TWAP formula concentrates on asset prices only and fails to take into account trading volumes.
7582
- Limited applicability to the needs of smaller-scale traders
7683

77-
VWAP is a mechanism used to calculate the price of an asset by taking price data from multiple trading environments and weighting each price by the amount of volume on each liquid market an asset is trading on. The VWAP calculation methodology is also used more broadly across finance as a technical indicator for traders, an order option offered by brokers or exchanges, and a benchmark.
84+
VWAP is a mechanism used to calculate the price of an asset by taking price data from multiple trading environments and weighting each price by the amount of volume on each liquid market an asset is trading on. The VWAP calculation methodology is also used more broadly across finance as a technical indicator for traders, an order option offered by brokers or exchanges, and a benchmark.
7885

7986
VWAP benefits:
87+
8088
- Market Coverage.
8189
- Highly Accurate and Fresh Data
8290
- Manipulation-Resistant
8391

84-
VWAP limitations:
92+
VWAP limitations:
93+
8594
- inaccurate or misleading for large orders that require many days to fill.
8695
- can be used to manipulate trading by placing trades only when market prices are at levels favorable with VWAP
8796
- not account for opportunity cost.
8897

89-
TVWAP formula is a new mechanism used to weight volume based on timestamp within the 5 min period. It's a variant of VWAP formula. The main difference between TVWAP and VWAP is that TVWAP shrinks the volume based on candle's timestamp, the further the timestamp count, the more volume will be shrink. VWAP is a measurement that shows the average price of an asset in a period of time, while TVWAP is a measurement that shows the average price of an asset in a period of time with a favor based on timestamp of data.
98+
TVWAP formula is a new mechanism used to weight volume based on timestamp within the 5 min period. It's a variant of VWAP formula. The main difference between TVWAP and VWAP is that TVWAP shrinks the volume based on candle's timestamp, the further the timestamp count, the more volume will be shrink. VWAP is a measurement that shows the average price of an asset in a period of time, while TVWAP is a measurement that shows the average price of an asset in a period of time with a favor based on timestamp of data.

tests/e2e/README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# End-to-end Tests
2+
23
## Structure
34

45
### `e2e` Package
@@ -16,7 +17,7 @@ an upgrade height, ensures the upgrade happens at the desired height, and
1617
then checks that operations that worked before still work as intended. If
1718
testing a fork, the test suite instead starts the chain a few blocks before
1819
the set fork height and ensures the chain continues after the fork triggers
19-
the upgrade. Note that a regular upgrade and a fork upgrade are mutually exclusive.
20+
the upgrade. Note that a regular upgrade and a fork upgrade are mutually exclusive.
2021

2122
The file e2e\_setup\_test.go defines the testing suite and contains the
2223
core bootstrapping logic that creates a testing environment via Docker
@@ -72,9 +73,9 @@ Conceptually, we can split the e2e setup into 2 parts:
7273
details of the configurer. More on this can be found
7374
[here](https://www.tutorialspoint.com/design_pattern/factory_pattern.htm)
7475

75-
The rules for deciding on the configurer type
76+
The rules for deciding on the configurer type
7677
are as follows:
77-
78+
7879
- If only `isIBCEnabled`, we want to have 2 chains initialized at the
7980
current branch version of Juno codebase
8081

@@ -208,4 +209,4 @@ This debug configuration helps to run e2e tests locally and skip the desired tes
208209
Please note that if the tests are stopped mid-way, the e2e framework might fail to start again due to duplicated containers. Make sure that
209210
containers are removed before running the tests again: `docker container rm -f $(docker container ls -a -q)`.
210211
211-
Additionally, Docker networks do not get auto-removed. Therefore, you can manually remove them by running `docker network prune`.
212+
Additionally, Docker networks do not get auto-removed. Therefore, you can manually remove them by running `docker network prune`.

tests/e2e/initialization/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,4 +125,4 @@ make docker-build-e2e-init-node
125125
```
126126

127127
This script will build a Docker image that runs a script in the `node` package
128-
and initializes all data necessary for starting up a new node.
128+
and initializes all data necessary for starting up a new node.

0 commit comments

Comments
 (0)