![]()
MIP#262702
Overview
The Money on Chain protocol previously supported leveraged positions known as BTCX, which were deactivated in February 2023 through the Technical proposal for removal of leveraged positions. However, deprecated code related to the daily inrate payment logic for these leveraged positions remains in the codebase, even though this functionality is no longer being used. This cleanup removes the obsolete code, reducing unnecessary complexity and improving code maintainability.
Proposed Changes
The deprecated code related to leveraged positions inrate payment logic will be removed from the protocol contracts. This cleanup ensures:
- Gas & Cost Efficiency: Reduces gas consumption and eliminates daily operational costs for BPRO holders
- Improved Code Quality: Cleaner, more maintainable codebase that is easier to read and understand
- Enhanced Auditability: Simplified code analysis for security auditors and reduces the attack surface by eliminating unused logic
Technical Implementation
Warning: some technical/coding knowledge is necessary to fully understand this document
This code cleanup for deprecated BTCX leveraged positions will be implemented through the changes introduced in the Remove dailyInratePayment #119 pull request, which removes unused contract-level code.
2. Additional Protocol Improvements
The following changes are independent from the code cleanup for deprecated BTCX leveraged positions and are included in this proposal as protocol maintenance and improvement tasks.
Since a governance upgrade process is already required, these changes can be executed together, reducing operational overhead and avoiding the need for additional governance proposals.
2.1 Non-critical Bug Fix: Unsupported Pegged Token Addresses in ROC Queue Transactions
Info: Although non-critical, we will fix it as part of this upgrade to avoid a separate governance proposal and reduce operational overhead.
Description
Some functions that enqueue transactions into the RIF on Chain protocol currently allow unsupported pegged token addresses to be passed as arguments. These transactions are known to fail later when pending queue execution is processed, creating unnecessary gas costs for users and delivering the false impression that the operation was supported.
Fix
The RIF on Chain queue-enqueue functions will validate that any token address passed as an argument corresponds to a peg token supported by the protocol before accepting the transaction into the queue. This change prevents unsupported pegged token transactions from being queued and avoids later execution failures and unexpected user expense.
Summary
This proposal improves the long-term maintainability and reliability of the Money on Chain protocol by:
- removing deprecated BTCX leveraged-position code and obsolete daily inrate payment logic
- reducing protocol complexity and improving auditability
- saving gas and eliminating the marginal daily operational costs for BPRO holders
- preventing unsupported pegged token transactions from being queued in the RIF on Chain queue
- avoiding later queue execution failures and unexpected user expenses
Together, these changes simplify the protocol codebase, reduce operational risk, and support better transaction handling for queued operations.
Governance Process
As with all protocol-level changes, this proposal will be submitted to a governance vote.
The upgrade will be executed only after:
- Proposal approval through governance
- Deployment of the changer contract
- Execution of the upgrade transaction
Technical Procedure
Warning: some technical/coding knowledge is necessary to fully understand this document.
The upgrade will be executed through a changer contract, which will:
- Remove deprecated BTCX leveraged-position code and obsolete daily inrate payment logic from the relevant contracts
- Add validation to queue-enqueue functions so unsupported pegged token addresses cannot be accepted as transaction arguments
Changer Contract
The changer contract to vote would be:
| Name | Address (and link to verified code in RSK blockscout explorer) |
|---|---|
HardeningII |
0x23ceA36Ad14137DFcD3b309ffdbA354588350864 |
Existing Contracts to be upgraded
The following contracts are already part of the protocol and will be upgraded for the code cleanup for deprecated BTCX leveraged positions:
| Name | Type | Address |
|---|---|---|
MocV1 |
Proxy | 0xf773...68370 |
MocV1 |
Implementation | 0xa60c...07250 |
MocV1 |
New implementation | 0x8cf0...5D226 |
MocStateV1 |
Proxy | 0xb9C4...1e257 |
MocStateV1 |
Implementation | 0x1D82...06722 |
MocStateV1 |
New implementation | 0xF65B...01186 |
MocExchangeV1 |
Proxy | 0x6aCb...49038 |
MocExchangeV1 |
Implementation | 0xFc88...B6FC1 |
MocExchangeV1 |
New implementation | 0x9Bfb...1b53C |
MocInrateV1 |
Proxy | 0xc0f9...0A3F3 |
MocInrateV1 |
Implementation | 0xe9B1...ac918 |
MocInrateV1 |
New implementation | 0x2ffc...c031A |
MocBProxManagerV1 |
Proxy | 0xC4fB...03b6c |
MocBProxManagerV1 |
Implementation | 0xeE35...a4e89 |
MocBProxManagerV1 |
New implementation | 0xa34f...Bdd5a |
The following contracts are already part of the protocol and will be upgraded for the 2.1 Non-critical Bug Fix: Unsupported Pegged Token Addresses in ROC Queue Transactions:
| Name | Type | Address |
|---|---|---|
RifBucket |
Proxy | 0xA270...aA36A |
RifBucket |
Implementation | 0x1a27...Fec54 |
RifBucket |
New implementation | 0x7D41...d3FdC |
DocBucket |
Proxy | 0x6975...84661 |
DocBucket |
Implementation | 0xF920...F5a9B |
DocBucket |
New implementation | 0x2f5b...b3b66 |