You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the collateral token is the WBTC and its precision is defined by the "decimal point" in the ERC20. WBTC’s decimals = 8 (which is far away from the DAI who has decimals = 18). This feature limits the precision of the Synthetic BTC Mining Contract.
In the "mint" routine of the MARTKETProtocol, the required collateral token is calculated by:
Note:
CTK: Collateral token. Is is the WBTC in this project so far. WTC.decimals = 8
INDEX: The BME in this project. According to the BME84 design, (Cap - Floor) = 1.6e-5. So INDEX.decimals should be >= 6. Considering the decline in the BME caused by production reducing, the better INDEX.decimals is >= 9
qtyMultiplier: A constant ratio
qtyToMint: How many position pairs can we get after the "mint" routine
The contract multiplier(also called contract size) = 1 according to the previous discussions
It is impossible to implement the protocol under the above constraints.
For example, if we have (Cap - Floor) = 1.6e-5 which means Value(1 contract) = 1.6e-5 BTC. Even if we set every factors to the minimum value (ie. INDEX.decimals = 6, qtyMultiplier = 1, qtyToMint = 1), we still have to pay 1.6e-2 BTC which is wrong.
Proposal 1: Set the contract multiplier(also called contract size)
Adopt issue #44: Value(1 contract) = Multiplier * the index value
I propose the following settings:
INDEX.decimals = 9. It has 4 significance digits until 3 years later
Note that you can buy 1e-5 contracts. So the minimum collateral could be 0.00016 WBTC
qtyMultiplier = 1
So that 9(INDEX.decimals) - 6(contract multiplier) + 5(POSITION.decimals) = 8(WBTC.decimals).
ADVANTAGE: It uses a standard financial term. ADVANTAGE: This is the only method to increase the significance digits of the BMC.
DISADVANTAGE: Make it harder for users to understand the meaning of the value of 1 contract.
Proposal 2: Use pBTC instead
Deploy a new contract which atomicly exchange the WBTC(decimals = 8) with pBTC(decimals = 18).
ADVANTAGE: It is a more complete implementation.
DISADVANTAGE: One more step is involved for the user.
Proposal 3: Modify the index
Modifing the index by times the BME by 1e3 and keep contract multiplier = 1.
For example: index = 1.6e-5 * 1e3 = 1.6e-2 BTC, which means Value(1 contract) = 1.6e-2 BTC
INDEX.decimals = 3. For example, 1.6e-2 is represented by 16. There are only 2 significance digits.
So that 3(INDEX.decimals) + 5(POSITION.decimals) = 8(WBTC.decimals).
ADVANTAGE: The simplest method to make this project implemented.
DISADVANTAGE: It seems the significance digits is not enough even today. I think the issue #44 is still required.
Proposal 4: Modify the MARTKETProtocol code
The core formula in the 'mint' routine only allows multiplication. The contract multiplier(also called contract size) is a "division" function in the 'mint' routine. So adding a division function will allow INDEX.decimals > CTK.decimals.
In MarketContract.sol,
add a QTY_DENOMINATOR after the QTY_MULTIPLIER.
The text was updated successfully, but these errors were encountered:
osp-ng
changed the title
wBTC Is Hard To Implement This Protocol Due To The Lack Of Precision
WBTC Is Hard To Implement Contract Size 1:1 Due To The Lack Of Precision
Jul 18, 2019
Currently, the collateral token is the WBTC and its precision is defined by the "decimal point" in the ERC20. WBTC’s decimals = 8 (which is far away from the DAI who has decimals = 18). This feature limits the precision of the Synthetic BTC Mining Contract.
In the "mint" routine of the MARTKETProtocol, the required collateral token is calculated by:
Note:
It is impossible to implement the protocol under the above constraints.
For example, if we have (Cap - Floor) = 1.6e-5 which means Value(1 contract) = 1.6e-5 BTC. Even if we set every factors to the minimum value (ie. INDEX.decimals = 6, qtyMultiplier = 1, qtyToMint = 1), we still have to pay 1.6e-2 BTC which is wrong.
Proposal 1: Set the contract multiplier(also called contract size)
Adopt issue #44: Value(1 contract) = Multiplier * the index value
I propose the following settings:
So that 9(INDEX.decimals) - 6(contract multiplier) + 5(POSITION.decimals) = 8(WBTC.decimals).
ADVANTAGE: It uses a standard financial term.
ADVANTAGE: This is the only method to increase the significance digits of the BMC.
DISADVANTAGE: Make it harder for users to understand the meaning of the value of 1 contract.
Proposal 2: Use pBTC instead
Deploy a new contract which atomicly exchange the WBTC(decimals = 8) with pBTC(decimals = 18).
ADVANTAGE: It is a more complete implementation.
DISADVANTAGE: One more step is involved for the user.
Proposal 3: Modify the index
Modifing the index by times the BME by 1e3 and keep contract multiplier = 1.
For example: index = 1.6e-5 * 1e3 = 1.6e-2 BTC, which means Value(1 contract) = 1.6e-2 BTC
So that 3(INDEX.decimals) + 5(POSITION.decimals) = 8(WBTC.decimals).
ADVANTAGE: The simplest method to make this project implemented.
DISADVANTAGE: It seems the significance digits is not enough even today. I think the issue #44 is still required.
Proposal 4: Modify the MARTKETProtocol code
The core formula in the 'mint' routine only allows multiplication. The contract multiplier(also called contract size) is a "division" function in the 'mint' routine. So adding a division function will allow INDEX.decimals > CTK.decimals.
In MarketContract.sol,
add a QTY_DENOMINATOR after the QTY_MULTIPLIER.
In MarketCollateralPool.sol,
will be
The text was updated successfully, but these errors were encountered: