Enhancing Transaction Cost Management for Users with Ethereum-based Gas Price Settings

Dear MoneyOnChain community and team,

I hope this message finds you well. First off, I would like to express my deep gratitude for the effort and dedication poured into creating and continually improving MoneyOnChain, a platform that undoubtedly is making a significant contribution to the decentralized finance ecosystem.

Today, I come forward with a suggestion that I believe could benefit many of our users, and in turn, strengthen the perception of MoneyOnChain as a platform focused on the user and their needs.

As you well know, MoneyOnChain operates on the RSK network, which has its own gas price scheme, distinct from Ethereum’s. However, some users, particularly those who also use Ethereum, might have their wallets set up with Ethereum’s gas price, which can lead to confusion and unnecessarily high transaction costs on our platform.

Therefore, my proposal is as follows: Implement a transaction cost threshold based on RSK network parameters for MoneyOnChain transactions.

This would mean that if a proposed transaction exceeds this cost threshold, the platform would automatically reject it. In this way, we could protect users from inadvertently incurring excessive costs due to an incorrect gas price setup. I believe this measure would add an extra layer of safety and transparency for our users.

I am aware that this suggestion might involve technical changes and adjustments to MoneyOnChain’s infrastructure, and therefore I appreciate any feedback you can provide. Despite the potential challenges, I believe this improvement could make a significant difference in the user experience, helping us maintain our reputation as a leading platform in the decentralized finance sector.

Thank you very much for taking the time to consider this proposal. I am eager to read your responses and continue this discussion in search of continuous improvement for our beloved platform.

Best regards,


This sounds interesting. If the number if big enough, this wont interfere with normal operation of the protocol

Thank you!


I agree! As a newbie in the RSK and MoC community I must confess that I think that I was a victim of this issue when using metamask very recently.



Technical proposal for Enhancing Transaction Cost Management for Users with Ethereum-based Gas Price Settings

For the proposal in Enhancing Transaction Cost Management for Users with Ethereum-based Gas Price Setting it will require a smart contract upgrade, ensuring that transactions with gas prices exceeding a defined threshold are automatically rejected.

To implement this enhancement, the propose will introduce a modifier in each operation that validates the gas price and rejects the transaction if it exceeds the threshold. By incorporating this modifier, we can effectively prevent transactions with excessive gas prices from being processed.

To ensure comprehensive coverage, it is necessary to apply this modifier for the redeem and mint operations of every token in the protocol.

In order to implement this modification, a smart contract upgrade through vote will be necessary. This upgrade will enable the integration of the gas price threshold validation logic within the existing codebase of the Money On Chain and Rif On Chain protocol.

To maintain the integrity and usability of the protocol, it is crucial to allow modification of the gas price threshold. However, this modification should only be able to be made by the address with the authority to pause the protocol, This restriction will ensure that any changes made to the threshold are carried out through authorization via governance.

Assuming that users will operate with the gas price reported by the RSK network node, to set the initial threshold the suggestions is take the historical maximum of the last year plus 1 wei. That gives a value of 0.0658 Gwei.

Proposed modifications to the contracts

:warning: Some technical/coding knowledge is necessary to fully understand this section of the document

This modifier (isValidGasPrice()) would be added in contract MoC.sol

And it would apply to all functions. We take as an example mintDocVendors()

:information_source: Modifications to contract Stopper.sol will also be necessary (can be seen here).


:heavy_check_mark: The new implementation of the Moc.sol contract that is already deployed in mainet would be these:

For Address of Moc.sol contract new implementation
Money On Chain 0x54D9b8eB88F2E193C427b5134368f2DFaEd8B979
Rif On Chain 0xbe903D6E77aE2Da5C9fb7F6518211495f67D30bd

:heavy_check_mark: The new implementation of the Stopper.sol contract that is already deployed in mainet would be this:

:heavy_check_mark: The modifications will be carried out in both protocols at the same time (Money On Chain and Rif On Chain) with the same change contract.

:heavy_check_mark: The change contract to make the implementations change that is also already deployed in mainet would be this 0x9088fd1dA8aa13dfa6Fc665F449790bE5a799341

:heavy_check_mark: This is the change contract that will be submitted to a vote.

:heavy_check_mark: This is the pull request (#114) to add these changes to the repository in Money On Chain.

:heavy_check_mark: This is the pull request (#52) to add these changes to the repository in Rif On Chain.

:heavy_check_mark: The current implementation of the Moc.sol contract in mainet are:

For Address of Moc.sol contract current implementation
Money On Chain 0x2Ef12b6488600D46bB271a6eA5Ba08dD980E60c5
Rif On Chain 0xc75a3a1e829df4a8b8944c1ae213ce527bc63a2d

:heavy_check_mark: The Moc.sol proxy contract in mainet are:

For Address of Moc.sol contract proxy
Money On Chain 0xf773B590aF754D597770937Fa8ea7AbDf2668370
Rif On Chain 0xCfF3fcaeC2352C672C38d77cb1a064B7D50ce7e1

:heavy_check_mark: The Upgrade Delegator in mainet is 0x5cE577f6Ec969CE9a282838D350206C52A6F338C

:heavy_check_mark: The Governor in mainet is 0x3b8853DF65AfBd94853E6D77ee0Ab5590F41bB08


:mega: Call to MOC holders: This proposal is being voted on. How to vote Tutorial.

:mega: Llamado a los MOC holders: Esta propuesta se está votando. Tutorial de cómo votar.

What if RSK suddenly becomes highly demanded and the network fee needs to be risen to write the transaction? This change might become a limitation to use the protocol.

And what if somebody used an innecessarily high fee within the last year? That fee plus 1 gwei would not be a limit at all for the purpose described above.

Many undesired consecuences could derive from this change that, in my opinion, is quite superfluous.

Eventually, you could try this change on the webapp. But why mess around with the contracts?

Maybe IOV Labs guys could call the Metamask team and suggest them to set a default gas value for RSK network.

I don´t like this idea.

The audit report made by the IOV Labs team is shared below.

What you are describing are possible theoretical scenarios however we reviewed 2 years of transactions and we did not find any evidence of that situation happening in the past.

There are reports of new users paying a lot of gas due a misconfiguration in metamask.

In my opinion, those users should fix their configuration or continue paying high fees if they don´t care. Messing with that will open attack vectors to MOC which are not open at the present time.

This report only analyzes the implementation methot but does nor evaluate the implications at other levels.

If it’s not broken, don’t try to fix it.

1 Like

:mega: The voting process is over:

  • 27.77 of the MOC tokens total supply participated in the vote.
  • 100% of the participants voted in favor.
  • No one voted against the proposal.
  • The change was successfully implemented.
1 Like