New BAIP: Dynamic price feeds based on EMAs and smartcoin metrics

Open
#7 4 comments 0 reactions 0 assignees View on GitHub

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

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

ema3

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

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

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from bitshares/baips

All issues in bitshares/baips

Similar issues

More Blockchain issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.