Migration to OKU Trade and adjustments to block duration parameters

Introduction

As part of our ongoing efforts to improve the efficiency, stability, and user experience of the protocol, we present the following proposals aimed at addressing identified system issues and optimizing key processes in light of recent network changes. These enhancements are designed to strengthen user perception of usability and adapt the protocol’s operations to the new block generation conditions.

Proposals

  1. Migration from TEX to OKU Trade in MOC Flow
    Description:
    We propose discontinuing TEX in MOC Flow and transitioning to the OKU Trade platform.
    Justification:
  • OKU Trade offers a more robust solution better suited to the current needs of the protocol.
  • This change aims to optimize user experience and ensure MOC Flow operates more efficiently and reliably.
  1. Solution for the ROC Queue (Rif On Chain)
    Problem identification:
  • Edge cases were identified within the Flux Capacitor that caused prolonged blockages in the ROC Queue, negatively impacting the platform’s usability perception.
    Proposed Solution:
  • Implement a solution in the ROC Queue logic to prevent future blockages and improve system stability.
  1. Adjustments to block duration parameters due to increased block frequency
    context:
  • Since October, the average number of blocks generated per day has significantly increased due to a reduction in the average block duration to less than ~22 seconds (compared to the previous ~30 seconds).
  • This situation necessitates modifying certain parameters to maintain system efficiency.
    Proposed adjustment:
  • Redefine the calculation of EMA, which was previously performed every ~2,880 blocks per day, to execute every ~3,927 blocks per day now.
  • This adjustment ensures daily processes align with the new block generation rate.
    Reference:
  • More details and block statistics can be found at: Rootstock Blockscout Stats.

Benefits of the change

  1. Improved user experience:
  • The transition to OKU Trade will simplify processes, offering a more intuitive and seamless interaction.
  1. Enhanced operational stability:
  • Upgrading the ROC Queue to eliminate prolonged blockages will ensure consistent and reliable performance.
  1. Adaptability to network changes:
  • Adjusting block duration-related parameters, such as the EMA calculation, will allow the protocol to operate efficiently under the new block generation conditions.
  1. Protocol optimization:
  • With a more efficient MOC Flow and adjusted parameters, the protocol will become more competitive and robust in meeting the ecosystem’s current demands.

Technical procedure to achieve these changes

:warning: Warning: some technical/coding knowledge is necessary to fully understand this document.

In order to make all these changes, a Change Contract must be put to a vote in the governance system and after the community reaches consensus, the changes will be executed.

This Change Contract will put these new previously deployed components to work.

Contract Name Type Address ¹
ReverseAuctionUniswapToken ReverseAuction MOC2BTC-1 Proxy 0x73…17f3
ReverseAuctionUniswapToken ReverseAuction MOC2BTC-1 Impl. 0xdF…E8e9 ²
ReverseAuctionUniswapToken ReverseAuction MOC2BTC-2 Proxy 0xbe…393D
ReverseAuctionUniswapToken ReverseAuction MOC2BTC-2 Impl. 0xdF…E8e9 ²
ReverseAuctionUniswapToken ReverseAuction BTC2MOC Proxy 0xc8…D508
ReverseAuctionUniswapToken ReverseAuction BTC2MOC Impl. 0xdF…E8e9 ²
ReverseAuctionUniswapToken ReverseAuction RIF2BTC Proxy 0x35…F1E0
ReverseAuctionUniswapToken ReverseAuction RIF2BTC Impl. 0xdF…E8e9 ²
ReverseAuctionUniswapToken ReverseAuction BTC2RIF Proxy 0x2A…5b2f
ReverseAuctionUniswapToken ReverseAuction BTC2RIF Impl. 0xdF…E8e9 ²
Unwrapper Unwrapper Simple 0x95…188D
UniswapV3OracleUSD mocFeeTokenPriceProvider Simple 0x15…A41b
PriceProviderDiv rocFeeTokenPriceProvider Simple 0x4f…230f
CommissionSplitterV2 mocCommissionSplitterV2 Proxy 0x60…6E47
CommissionSplitterV2 mocCommissionSplitterV2 Impl. 0x3D…9BeB
CommissionSplitterV3 mocCommissionSplitterV3 Proxy 0x11…B0fD
CommissionSplitterV3 mocCommissionSplitterV3 Impl. 0x16…a019
CommissionSplitter rocCommissionSplitterV2 Proxy 0x9C…5851
CommissionSplitter rocCommissionSplitterV2 Impl. 0x4c…31C5
CommissionSplitter rocCommissionSplitterV3 Proxy 0x6C…f948
CommissionSplitter rocCommissionSplitterV3 Impl. 0x53…adD1
MocQueue (for ROC) newQueueImpl (for ROC) Impl. 0xeA…f4aD

¹ The contract address links point to the verified codes in the RSK explorer.
² The address of all reverse auction implementations are the same because they share the same logic.

List of the simplified steps carried out by the Change Contract

  1. Remove the threshold from all old ReverseAuctions.
  2. Remove the threshold from old Unwrapper.
  3. Fix the output of reverse auction BTC2RIF.
  4. Change the old outputs for the new ones in the Buffers.
  5. Add the new reverse auctions to the registry.
  6. Remove the old reverse auctions from the registry.
  7. Change queue implementation.
  8. Update ROC Stable V2 setups.
  9. Update MOC Stable V1 setups.
  10. Set the coiner mint block interval.
  11. Set the supporters period using impersonate method.
  12. Update MOC Stable V1 block span.
  13. Update ROC Stable V2 block span.

The changer contract to vote would be:

Name Address ¹
FixForOKUQueueBlockTimeChange 0xA4821a85fFeb3f2F51dBCE7bae894E7b8121838A

¹ The contract address links point to the verified codes in the RSK explorer.

The parameters loaded in the change contract

Registry portocol registry address

All old reverse auctions addresses

All new reverse auctions addresses

Old unwrapper address

New reverse auction BTC2RIF address

ROC Stable V2 mocRif address

Buffers addresses that need to modify their outputs

Old buffers exits

New buffers exits

Queue proxy contract

New queue implementation contract

New ROC Fee Token price provider address

New splitter for MoCFee collector in ROC

New splitter for TCInterest in ROC

MocInrate contract

MocState contract

Moc Commission Splitter V2 contract

Moc Commission Splitter V3 contract

New MOC Fee Token price provider address

Coiner address

Supporters address

MocSettlement contract

A month in blocks

  • aMonthInBlocks: 119536

A week in blocks

  • aWeekInBlocks: 27489

A day in blocks

  • aDayInBlocks: 3927

Updated MOC Flow diagram

4 Likes

:mega: Call to MOC holders: This proposal is being voted on. How to vote Tutorial. Use the new voting site.

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

:mega: The voting process is over:

  • 22.52% 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

TX ID: 0xa0a9a309b05605ab961fa0fa96a0018c016ee37d32de2b928ad7332db6a194fe

Addendum

Since the implementation of these changes we have seen changes and adjustments that need to be made.

  1. Change the Unisawp/Oku BTC/RIF pool to be used for one with greater liquidity ¹.
  2. Fix BTC to MOC reverse auction to also accept basecoin and not just wrBTC.
  3. Modify the time weighted average price of the Fee Token Price Providers from 1800s to 120s to be more in line with the activity level.
  4. Fix address output of the commission splitters

¹ We have seen that liquidity has migrated to a new pool.

Technical procedure to achieve these changes

:warning: Warning: some technical/coding knowledge is necessary to fully understand this document.

In order to make all these changes, a Change Contract must be put to a vote in the governance system and after the community reaches consensus, the changes will be executed.

The changer contract to vote would be:

Name Address ¹
FixReverseAuctionProposal.sol 0xE326C14ee61C343f701846e17D0d41eBd16aeBf9

¹ The contract address links point to the verified codes in the RSK explorer.

:mega: Call to MOC holders: This proposal is being voted on. How to vote Tutorial. Use the new voting site.

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