Summary
This proposal aims to increase the maximum number of open perp positions per Credit Account from the current limit of 4 to a new limit of 10. This change will be implemented via a configuration update in the perps contract.
Motivation
Increasing the maximum number of allowed positions will provide users with greater flexibility in their trading strategies, allowing for more diverse portfolio management and risk distribution across multiple positions. This enhancement aligns with our goal of offering a comprehensive perpetual trading experience while maintaining system stability.
Implementation
This is a signaling proposal. If passed, the Builder Multisig will execute the following message against the perps contract:
{
"update_config": {
"updates": {
"max_positions": 10
}
}
}
Technical Analysis
Gas usage tests conducted on the Devnet environment with pinned contracts have demonstrated the feasibility of this increase with acceptable gas consumption patterns:
- First perp position: ~1.7M gas
- Second perp position: ~1.9M gas
- Subsequent positions (3rd-9th): ~2.0-2.5M gas
- Tenth perp position: ~2.6M gas
Liquidation operations remain efficient even with increased positions:
- Liquidation (after 10 perps): ~3.7M gas
- Liquidation (after 4 perps): ~2.7M gas
Risks
-
Increased Gas Consumption: While gas usage increases with the number of positions, the implementation of pinned contracts significantly mitigates this risk. Gas costs scale in a controlled manner, with approximately a 37% increase in liquidation gas costs when going from 4 to 10 positions.
-
System Load: More positions per Credit Account could potentially increase the computational load during peak trading periods. However, our technical analysis indicates the system can handle this increased load efficiently.
-
Network Gas Capacity: It’s worth noting that Neutron has approved a proposal (A62) to increase the gas block limit from 30,000,000 to 330,000,000, which will further accommodate the increased gas requirements resulting from this change.
-
Unforeseen Technical Risks: While the perps contract code has undergone thorough auditing, as with any smart contract modification, there may still be unforeseen risks or edge cases that were not identified during testing and auditing processes.
Copyright
Copyright and related rights waived via CC0.
Disclaimers/Disclosures
This proposal is being made by Mars Protocol Foundation, a Cayman Islands foundation company. Mars Protocol Foundation engages in research and development of the Mars Protocol. Mars Protocol Foundation and certain of its service providers and managers own MARS tokens and have financial interests related to this proposal. The aforementioned persons or their affiliates may also have financial interests in complementary or competing projects or ecosystems, entities or tokens, including NTRN. These statements are intended to disclose relevant facts and to help identify potential conflicts of interest, and should not be misconstrued as a complete description of all relevant interests or conflicts of interests; nor should they be construed as a recommendation to purchase or acquire any token or security.
This proposal is also subject to and qualified by the Mars Disclaimers/Disclosures. Mars Protocol Foundation may lack access to all relevant facts or may have failed to give appropriate weighting to available facts. Mars Protocol Foundation is not making any representation, warranty or guarantee regarding the accuracy or completeness of the statements herein, and Mars Protocol Foundation shall have no liability in the event of losses or damages ensuing from approval or rejection or other handling of the proposal. Each user and voter should undertake their own research and make their own independent interpretation and analysis of all relevant facts and issues to arrive at their own personal determinations of how to vote on the proposal.