From b058ee6976913fffd49cb921acd9bf5e70b4cd7d Mon Sep 17 00:00:00 2001 From: Reynold Morel Date: Thu, 6 Jun 2024 10:20:50 -0400 Subject: [PATCH 1/6] Initial commit --- IPs/RSKIPxx.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 IPs/RSKIPxx.md diff --git a/IPs/RSKIPxx.md b/IPs/RSKIPxx.md new file mode 100644 index 00000000..349a7bc8 --- /dev/null +++ b/IPs/RSKIPxx.md @@ -0,0 +1,34 @@ +--- +rskip: TBD +title: StableMinGasPrice +description: +status: Draft +purpose: Usa +author: @rmoreliovlabs +layer: Core +complexity: 2 +created: 2024-06 +--- +# EthSwap + + +|RSKIP | TBD | +| :------------ |:-------------| +|**Title** |StableMinGasPrice| +|**Created** |JUNE-2024 | +|**Author** |@rmoreliovlabs | +|**Purpose** |Usa | +|**Layer** |Core | +|**Complexity** |2 | +|**Status** |Draft | + +# **Abstract** + +This RSKIP proposes a feature that allows RSK miners to configure the minimum gas price (MinGasPrice) in fiat currency instead of the current cryptocurrency (WEI) linked to Bitcoin. + +## Motivation + +In the current RSK network, miners have the ability to set the minimum gas price through the `miner.minGasPrice` configuration, which is denominated in WEI. This parameter is essentially linked to the Bitcoin price, causing the gas price to vary in correlation with Bitcoin's value. This behaviour creates uncertainty in transaction costs, often leading to increased costs when Bitcoin appreatiates. This unpredictability can negatively impact user experience, as transaction fees become less stable. + +This can be solved adding a new feature that allows miners to specify and configure the minimum gas price in fiat currency. By decoupling gas prices from Bitcoin's market fluctuations, this property aims to stabilize transaction costs in terms of fiat value, thereby improving predictability. This approach not only protects users from the volatility of cryptocurrency markets but also provides a better user experiencie. + From 07f3d840be7faa572ddc4bc01772de003f5fd374 Mon Sep 17 00:00:00 2001 From: Reynold Morel Date: Thu, 6 Jun 2024 18:19:17 -0400 Subject: [PATCH 2/6] Updating RSKIP number --- IPs/RSKIP433.md | 75 +++++++++++++++++++++++++++++++++++++++++++++++++ IPs/RSKIPxx.md | 34 ---------------------- README.md | 2 ++ 3 files changed, 77 insertions(+), 34 deletions(-) create mode 100644 IPs/RSKIP433.md delete mode 100644 IPs/RSKIPxx.md diff --git a/IPs/RSKIP433.md b/IPs/RSKIP433.md new file mode 100644 index 00000000..d766c1ca --- /dev/null +++ b/IPs/RSKIP433.md @@ -0,0 +1,75 @@ +--- +rskip: 433 +title: StableMinGasPrice +description: +status: Draft +purpose: Usa +author: RM +layer: Core +complexity: 2 +created: 2024-06 +--- +# EthSwap + + +|RSKIP | 433 | +| :------------ |:-------------| +|**Title** |StableMinGasPrice| +|**Created** |JUNE-2024 | +|**Author** |RM | +|**Purpose** |Usa | +|**Layer** |Core | +|**Complexity** |2 | +|**Status** |Draft | + +# **Abstract** + +This RSKIP proposes a feature that allows RSK miners to configure the minimum gas price (MinGasPrice) in fiat currency instead of the current cryptocurrency (WEI) linked to Bitcoin. + +## Motivation + +In the current RSK network, miners have the ability to set the minimum gas price through the `miner.minGasPrice` configuration, which is denominated in WEI. This parameter is essentially linked to the Bitcoin price, causing the gas price to vary in correlation with Bitcoin's value. This behaviour creates uncertainty in transaction costs, often leading to increased costs when Bitcoin prices go up. This unpredictability can negatively impact user experience, as transaction fees become less stable. + +This can be solved adding a new feature that allows miners to specify and configure the minimum gas price in fiat currency. By decoupling gas prices from Bitcoin's market fluctuations, this property aims to stabilize transaction costs in terms of fiat value, thereby improving predictability. This approach not only protects users from the volatility of cryptocurrency markets but also provides a better user experiencie. + +## Specification + +We could introduce a new configuration property, `stableMinGasPrice` to specify the minimum gas price in fiat currency. Key elements of this configuration include: +1. **Enabled Flag:** Adding the `enabled` flag to disable the stable gas price feature. If this value is false, then the system should behave as it currently does, using the `miner.minGasPrice` configuration. +2. **source.method:** Defines the method to retrieve the Bitcoin price. It can be one of these 2 methods: + * `HTTP_GET`: Simple HTTP Get request to fetch the price. + * `ETH_CALL`: Call to a Smart Contract that returns the price. +3. **Minimum Stable Gas Price:** `minStableGasPrice` to specify the minimum gas price in the chosen fiat currency. +4. **Refresh Rate:** `refreshRate` to determine how often the Bitcoin price should be refreshed. + +It should look something like this: +``` +miner { + # The default gas price + minGasPrice = 4265280000000 + + stableGasPrice { + enabled = false + minStableGasPrice = 4265280000000 # 0.00000426528 USD per gas unit + refreshRate = 360 + method = HTTP_GET + httpGet { + ... + } + ethCall { + ... + } + } +``` + +When the `stableGasPrice` feature is **enabled**, we should adjust the behaviour to retrieve BTC price data according to the he cached _minStableGasPrice_ or the specified method to keep transaction costs stable in fiat currency (like USD or EUR). It first checks if there is a recent, **cached** Bitcoin price within the defined _refresh rate_ and uses this value if available. If no valid cached price exists, it fetches the latest Bitcoin price using the specified method (HTTP_GET or ETH_CALL). + +If the price retrieval fails but a cached price is still valid, the system uses the cached price. If **both** the price fetch and cached price are unavailable, it defaults to the original `minGasPrice` setting. + +## Rationale + +The mechanism would only trigger if a RSK miner configures the minimumGasPrice in fiat currency by enabling `stableGasPrice` in the configuration settings. + +# **Copyright** + +Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). \ No newline at end of file diff --git a/IPs/RSKIPxx.md b/IPs/RSKIPxx.md deleted file mode 100644 index 349a7bc8..00000000 --- a/IPs/RSKIPxx.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -rskip: TBD -title: StableMinGasPrice -description: -status: Draft -purpose: Usa -author: @rmoreliovlabs -layer: Core -complexity: 2 -created: 2024-06 ---- -# EthSwap - - -|RSKIP | TBD | -| :------------ |:-------------| -|**Title** |StableMinGasPrice| -|**Created** |JUNE-2024 | -|**Author** |@rmoreliovlabs | -|**Purpose** |Usa | -|**Layer** |Core | -|**Complexity** |2 | -|**Status** |Draft | - -# **Abstract** - -This RSKIP proposes a feature that allows RSK miners to configure the minimum gas price (MinGasPrice) in fiat currency instead of the current cryptocurrency (WEI) linked to Bitcoin. - -## Motivation - -In the current RSK network, miners have the ability to set the minimum gas price through the `miner.minGasPrice` configuration, which is denominated in WEI. This parameter is essentially linked to the Bitcoin price, causing the gas price to vary in correlation with Bitcoin's value. This behaviour creates uncertainty in transaction costs, often leading to increased costs when Bitcoin appreatiates. This unpredictability can negatively impact user experience, as transaction fees become less stable. - -This can be solved adding a new feature that allows miners to specify and configure the minimum gas price in fiat currency. By decoupling gas prices from Bitcoin's market fluctuations, this property aims to stabilize transaction costs in terms of fiat value, thereby improving predictability. This approach not only protects users from the volatility of cryptocurrency markets but also provides a better user experiencie. - diff --git a/README.md b/README.md index fa5467a0..a28132bc 100644 --- a/README.md +++ b/README.md @@ -228,6 +228,7 @@ You can find an easily browseable version of this information [here](https://ips | 415 |[Fix pegnatories address derivation from public keys](IPs/RSKIP415.md)| 30-JAN-24 | MI | Usa | Core | 1 | Adopted | | 417 |[Avoid transactions to be reverted when Bridge method calls from smart contracts return an empty response](IPs/RSKIP417.md)| 28-FEB-24 | MI | Usa | Core | 1 | Adopted | | 419 |[Powpeg Spendability Validation Protocol](IPs/RSKIP419.md)| 31-AUG-23 | JD, JZ | Sec | Core | 2 | Draft | +| 433 |[StableMinGasPrice](IPs/RSKIP433.md)| 06-JUNE-24 | RM | Usa | Core | 2 | Draft | (*) Under evaluation to be implemented in the next reference client release @@ -265,6 +266,7 @@ You can find an easily browseable version of this information [here](https://ips | SM | Shreemoy Mishra | shreemoy@iovlabs.org | | SMS | Sebastian Matias Sicardi | | | VK | Volodymyr Kravets | volodymyr@iovlabs.org | +| RM | Reynold Morel | reynold.morel@rootstocklabs.com | ## Build locally From 2bd94467a751051fcfd94debc2a2a41bf5ce1a02 Mon Sep 17 00:00:00 2001 From: Reynold Morel Date: Thu, 6 Jun 2024 18:23:04 -0400 Subject: [PATCH 3/6] Fixing typo --- IPs/RSKIP433.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IPs/RSKIP433.md b/IPs/RSKIP433.md index d766c1ca..5ae8b530 100644 --- a/IPs/RSKIP433.md +++ b/IPs/RSKIP433.md @@ -9,7 +9,7 @@ layer: Core complexity: 2 created: 2024-06 --- -# EthSwap +# StableMinGasPrice |RSKIP | 433 | From c71f5df3bfd5abd9132749cafdcf1965cd11d51b Mon Sep 17 00:00:00 2001 From: Reynold Morel Date: Fri, 7 Jun 2024 11:37:51 -0400 Subject: [PATCH 4/6] Rename RSKIP title and add backwards compatibility section --- IPs/RSKIP433.md | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/IPs/RSKIP433.md b/IPs/RSKIP433.md index 5ae8b530..52e9ffc5 100644 --- a/IPs/RSKIP433.md +++ b/IPs/RSKIP433.md @@ -1,6 +1,6 @@ --- rskip: 433 -title: StableMinGasPrice +title: Stable Minimum Gas Price description: status: Draft purpose: Usa @@ -9,12 +9,12 @@ layer: Core complexity: 2 created: 2024-06 --- -# StableMinGasPrice +# Stable Minimum Gas Price |RSKIP | 433 | | :------------ |:-------------| -|**Title** |StableMinGasPrice| +|**Title** |Stable Minimum Gas Price| |**Created** |JUNE-2024 | |**Author** |RM | |**Purpose** |Usa | @@ -52,14 +52,24 @@ miner { enabled = false minStableGasPrice = 4265280000000 # 0.00000426528 USD per gas unit refreshRate = 360 - method = HTTP_GET - httpGet { - ... - } - ethCall { - ... - } + method = HTTP_GET || ETH_CALL + + # Examples: + # method = "HTTP-GET" + # params { + # url = "https://domain.info/ticker" + # jsonPath = "/USD/buy" + # timeout = 2 seconds + # } + # + # method = "ETH_CALL" + # params { + # from: "0xcd2a3d9f938e13cd947ec05abc7fe734df8dd825", + # to: "0xcd2a3d9f938e13cd947ec05abc7fe734df8dd826", + # data: "0x8300df49" + # } } +} ``` When the `stableGasPrice` feature is **enabled**, we should adjust the behaviour to retrieve BTC price data according to the he cached _minStableGasPrice_ or the specified method to keep transaction costs stable in fiat currency (like USD or EUR). It first checks if there is a recent, **cached** Bitcoin price within the defined _refresh rate_ and uses this value if available. If no valid cached price exists, it fetches the latest Bitcoin price using the specified method (HTTP_GET or ETH_CALL). @@ -70,6 +80,10 @@ If the price retrieval fails but a cached price is still valid, the system uses The mechanism would only trigger if a RSK miner configures the minimumGasPrice in fiat currency by enabling `stableGasPrice` in the configuration settings. +## Backwards Compatibility + +This feature would be backwards compatible, as it is just a node behaviour change and it ensures that existing configurations and functionalities remain intact for users who choose not to adopt or enable the `stableGasPrice` setting. + # **Copyright** Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). \ No newline at end of file From 85dda5712f75465e14ea64b9806be195c756ae9e Mon Sep 17 00:00:00 2001 From: Reynold Morel Date: Mon, 10 Jun 2024 10:01:21 -0400 Subject: [PATCH 5/6] Fixing typo --- IPs/RSKIP433.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/IPs/RSKIP433.md b/IPs/RSKIP433.md index 52e9ffc5..be85f502 100644 --- a/IPs/RSKIP433.md +++ b/IPs/RSKIP433.md @@ -28,9 +28,9 @@ This RSKIP proposes a feature that allows RSK miners to configure the minimum ga ## Motivation -In the current RSK network, miners have the ability to set the minimum gas price through the `miner.minGasPrice` configuration, which is denominated in WEI. This parameter is essentially linked to the Bitcoin price, causing the gas price to vary in correlation with Bitcoin's value. This behaviour creates uncertainty in transaction costs, often leading to increased costs when Bitcoin prices go up. This unpredictability can negatively impact user experience, as transaction fees become less stable. +In the current RSK network, miners have the ability to set the minimum gas price through the `miner.minGasPrice` configuration, which is denominated in WEI. This parameter is essentially linked to the Bitcoin price, causing the gas price to vary in correlation with Bitcoin's value. This behavior creates uncertainty in transaction costs, often leading to increased costs when Bitcoin prices go up. This unpredictability can negatively impact user experience, as transaction fees become less stable. -This can be solved adding a new feature that allows miners to specify and configure the minimum gas price in fiat currency. By decoupling gas prices from Bitcoin's market fluctuations, this property aims to stabilize transaction costs in terms of fiat value, thereby improving predictability. This approach not only protects users from the volatility of cryptocurrency markets but also provides a better user experiencie. +This can be solved adding a new feature that allows miners to specify and configure the minimum gas price in fiat currency. By decoupling gas prices from Bitcoin's market fluctuations, this property aims to stabilize transaction costs in terms of fiat value, thereby improving predictability. This approach not only protects users from the volatility of cryptocurrency markets but also provides a better user experience. ## Specification @@ -72,7 +72,7 @@ miner { } ``` -When the `stableGasPrice` feature is **enabled**, we should adjust the behaviour to retrieve BTC price data according to the he cached _minStableGasPrice_ or the specified method to keep transaction costs stable in fiat currency (like USD or EUR). It first checks if there is a recent, **cached** Bitcoin price within the defined _refresh rate_ and uses this value if available. If no valid cached price exists, it fetches the latest Bitcoin price using the specified method (HTTP_GET or ETH_CALL). +When the `stableGasPrice` feature is **enabled**, we should adjust the behavior to retrieve BTC price data according to the he cached _minStableGasPrice_ or the specified method to keep transaction costs stable in fiat currency (like USD or EUR). It first checks if there is a recent, **cached** Bitcoin price within the defined _refresh rate_ and uses this value if available. If no valid cached price exists, it fetches the latest Bitcoin price using the specified method (HTTP_GET or ETH_CALL). If the price retrieval fails but a cached price is still valid, the system uses the cached price. If **both** the price fetch and cached price are unavailable, it defaults to the original `minGasPrice` setting. @@ -82,7 +82,7 @@ The mechanism would only trigger if a RSK miner configures the minimumGasPrice i ## Backwards Compatibility -This feature would be backwards compatible, as it is just a node behaviour change and it ensures that existing configurations and functionalities remain intact for users who choose not to adopt or enable the `stableGasPrice` setting. +This feature would be backwards compatible, as it is just a node behavior change and it ensures that existing configurations and functionalities remain intact for users who choose not to adopt or enable the `stableGasPrice` setting. # **Copyright** From 2b52a8d84cf43d873955f18d20a955be76ca8024 Mon Sep 17 00:00:00 2001 From: Reynold Morel Date: Fri, 14 Jun 2024 09:51:37 -0400 Subject: [PATCH 6/6] Fixing wording --- IPs/RSKIP433.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/IPs/RSKIP433.md b/IPs/RSKIP433.md index be85f502..4a391081 100644 --- a/IPs/RSKIP433.md +++ b/IPs/RSKIP433.md @@ -1,30 +1,30 @@ --- rskip: 433 -title: Stable Minimum Gas Price +title: Fiat Stable Minimum Gas Price description: status: Draft purpose: Usa author: RM -layer: Core +layer: Node complexity: 2 created: 2024-06 --- -# Stable Minimum Gas Price +# Fiat Stable Minimum Gas Price |RSKIP | 433 | | :------------ |:-------------| -|**Title** |Stable Minimum Gas Price| +|**Title** |Fiat Stable Minimum Gas Price| |**Created** |JUNE-2024 | |**Author** |RM | |**Purpose** |Usa | -|**Layer** |Core | +|**Layer** |Node | |**Complexity** |2 | |**Status** |Draft | # **Abstract** -This RSKIP proposes a feature that allows RSK miners to configure the minimum gas price (MinGasPrice) in fiat currency instead of the current cryptocurrency (WEI) linked to Bitcoin. +This RSKIP proposes a feature that allows Rootstock miners to configure the minimum gas price (MinGasPrice) in fiat currency instead of the current cryptocurrency (WEI) linked to Bitcoin. ## Motivation @@ -82,7 +82,7 @@ The mechanism would only trigger if a RSK miner configures the minimumGasPrice i ## Backwards Compatibility -This feature would be backwards compatible, as it is just a node behavior change and it ensures that existing configurations and functionalities remain intact for users who choose not to adopt or enable the `stableGasPrice` setting. +This feature would be backwards compatible, as it is just a node behavior change and it ensures that existing configurations and functionalities remain intact for users who choose not to adopt or enable the `stableGasPrice` setting. Therefore, this feature doesn't require consensus rules changes and, as a consequence, is not mandatory for all network nodes to adopt it. # **Copyright**