New BAIP: Dynamic price feeds based on EMAs and smartcoin metrics
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 18/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Domain
- blockchain, fintech-quant
Research direction
No source files, tests, or implementation entry points are named. Start with the BAIP specification, then review the linked Shorting Attack Protection and BAIP 4 discussions to understand the proposed EMA, market-state, and smartcoin-metric requirements. Done would require an agreed, implementable consensus change rather than the current draft alone.
Written by the indexing model from the issue text.
Description
BAIP: 0003
Title: Dynamic price feeds based on EMAs and smartcoin metrics
Authors: [bench]
Status: Draft
Type: Consensus
Created: 2019-11-02
Abstract
The feed price is next to liquidity the most important factor of the smartcoin market.
The current feed script implementation has several limitations and drawbacks on the market performance:
- no robustness against market manipulation
- no consequent collateral selling in a downtrend
- selling collateral at too low price
- too much collateral selling in an uptrend
Motivation
The price feeds guides the debt borrowing and collateral selling through different market states.
Optimizing the price feed, increases the market performance and collateral value.
Price feeds should:
- minimize bad debt
- minimize low selling of collateral
- minimize margin calls
- be robust against market manipulation
Because simple solutions were not successful so far, a complex approach was developed.
Rationale
To ensure the best feed price performance in every market condition, the price feed calculations must be dependent on the current market state and market metrics.
A combination of different Exponential Moving Averages (EMAs) provide the feed price range and the right market state. The smartcoin metrics and other script parameters precise the price feed calculation, dependent on the current market state.
Feed price range
This proposal combines the advantages of a fast, medium and slow EMA for price feed definition.
The weighting for the different EMAs, is dependent on the state parameters, smartcoin metrics and price feed parameters.
Shorting attack on BTS, shows the advantage and disadvantage of three different EMAs:
- fast EMA (red line), good collateral selling, but low BTS price
- medium EMA (yellow line)
- slow EMA (green line), bad collateral selling, but high BTS price

Specification
Price feed script is based on:
- 3 different EMAs
- 5 different EMA parameter
- 5 additional price feed parameter
- 6 different market states for price feed calculation
- 2 different market state parameters (
state_value&transition_value) - 4 different market conditions for market state transition
- smartcoin metrics (amount of collateral sell/buy)
Dynamic price feed flow

Summary for Shareholders
Feed prices based on different EMAs and smartcoin metrics is a very important upgrade to improve our smartcoin market performance.
Discussion
See also
- Moving Averages - Simple and Exponential
- BSIP78: Asset Feature - MLP (Market Liquidity Pool)
- New BSIP: Debt Asset Feature - MPLP (Margin Position Liquidity Pool)
Copyright
This document is placed in the public domain.
- Dominant language
- No language data
- Stars
- 6
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from bitshares/baips
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
MystenLabs/sui#28056 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
filecoin-project/solstice#76 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
CypherBoxLLC/Cypher-Box#283 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
blinklabs-io/bursa#904 ·