Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions MIP/mip-n/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# MIP-42: AB-FFS Governed Gas Pool

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# MIP-42: AB-FFS Governed Gas Pool
# MIP-44: Governed Gas Pool

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extends beyond swap-bridge-swap FFS

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# MIP-42: AB-FFS Governed Gas Pool
# MIP-42: Governed Gas Pool

This is no longer coupled with AB or AB-FFS

- **Description**: Introduces a governed gas pool for AB-FFS which allows for initial period wherein used gas is not recirculated.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- **Description**: Introduces a governed gas pool for AB-FFS which allows for initial period wherein used gas is not recirculated.
- **Description**: Introduces a governed gas pool on L2 which allows for initial period wherein used gas is not recirculated.

- **Authors**: [Liam Monninger](mailto:liam@movementlabs.xyz)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- **Authors**: [Liam Monninger](mailto:liam@movementlabs.xyz)
- **Authors**: [Liam Monninger, Richard Melkonian](mailto:liam@movementlabs.xyz, mailto:richard@movementlabs.xyz)

- **Reviewer**: Andreas Penzkofer
- **Desiderata**: [MD-38](https://github.com/movementlabsxyz/MIP/pull/38)

## Abstract
We propose a governed gas pool both as provisional and potentially permanent solution to the supply problem described in [MD-38](https://github.com/movementlabsxyz/MIP/pull/38). This solution consists of depositing funds into a pool on the L2, and holding votes against actions for the recirculation of said funds.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
We propose a governed gas pool both as provisional and potentially permanent solution to the supply problem described in [MD-38](https://github.com/movementlabsxyz/MIP/pull/38). This solution consists of depositing funds into a pool on the L2, and holding votes against actions for the recirculation of said funds.
We propose a governed gas pool both as provisional and potentially permanent solution to the supply problem described in [MD-38](https://github.com/movementlabsxyz/MIP/pull/38). This solution consists of depositing `$L2MOVE` funds into a pool on the L2, and holding votes against actions for the recirculation of said funds.


The concept of a governed gas pool can be applied generally to manage migrations between systems. For example, the governed gas pool could be used to transition from the "Trickle-back" mechanism referenced in [MD-38](https://github.com/movementlabsxyz/MIP/pull/38) to [MIP-42](https://github.com/movementlabsxyz/MIP/pull/42), as is used as an example amongst others herein.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The concept of a governed gas pool can be applied generally to manage migrations between systems. For example, the governed gas pool could be used to transition from the "Trickle-back" mechanism referenced in [MD-38](https://github.com/movementlabsxyz/MIP/pull/38) to [MIP-42](https://github.com/movementlabsxyz/MIP/pull/42), as is used as an example amongst others herein.
The concept of a governed gas pool can be applied generally to manage migrations between systems. For example, the governed gas pool could be used to transition from the "Trickle-back" mechanism referenced in [MD-38](https://github.com/movementlabsxyz/MIP/pull/38) to [MIP-42](https://github.com/movementlabsxyz/MIP/pull/42), as is used as an example amongst others herein. As demonstrated in the diagram, the governed gas pool can be used to provide liquidity for a variety of protocol operations, liquidity of L1 Rewards, Trickle Back liquidity or grants. To use the funds for any of these activities a proposal would have to pass and a network upgrade or migration would also have to occur after governance approves the proposal. It is recommended to read generally around [aptos-governance](https://aptos.web3doc.top/concepts/governance/) and how it is implemented. Because of its tie to aptos-staking (which we do not use), we will be required to make modifications to `aptos_governance.move`. Changes for this are suggested and laid in MIP(##).


## Motivation
The AB-FFS under fixed supply presents several challenges presented in [MD-38](https://github.com/movementlabsxyz/MIP/pull/38). This MIP seeks to address the question of where used gas funds should be deposited with a simple and flexible solution. By simply depositing funds into a pool and holding votes against actions for the recirculation of said funds, we can create a system that can provide a short-term solution to the supply problem and generalize to other systems.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The AB-FFS under fixed supply presents several challenges presented in [MD-38](https://github.com/movementlabsxyz/MIP/pull/38). This MIP seeks to address the question of where used gas funds should be deposited with a simple and flexible solution. By simply depositing funds into a pool and holding votes against actions for the recirculation of said funds, we can create a system that can provide a short-term solution to the supply problem and generalize to other systems.
The requirement for fixed supply presents several challenges and where the challenges dependent on the selected design, see Appendix A1 in [MD-38](https://github.com/movementlabsxyz/MIP/pull/38). One particular concern is that if fees are burnt they would decrease the supply. Hence fees, should be collected instead.
This MIP seeks to address the question of where used gas funds should be deposited with a simple and flexible solution. By simply depositing funds into a pool and holding votes against actions for the recirculation of said funds, we can create a system that can provide a short-term solution to the supply problem and generalize to other systems.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The AB-FFS under fixed supply presents several challenges presented in [MD-38](https://github.com/movementlabsxyz/MIP/pull/38). This MIP seeks to address the question of where used gas funds should be deposited with a simple and flexible solution. By simply depositing funds into a pool and holding votes against actions for the recirculation of said funds, we can create a system that can provide a short-term solution to the supply problem and generalize to other systems.
The AB-FFS under fixed supply presents several challenges presented in [MD-38](https://github.com/movementlabsxyz/MIP/pull/38). This MIP seeks to address the question of where used gas funds should be deposited with a simple and flexible solution. By simply depositing funds into a pool and holding votes against actions for the recirculation of said funds, we can create a system that can provide a solution to the supply problem and generalize to other systems.


## Specification
![Governed Gas Pool](governed-gas-pool.png)

1. Gas used on the L2 MUST be deposited into the Governed Gas Pool.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Governed Gas Pool is a new term. its definition should be added to the Glossary and this MD should be referenced from Glossary, see
#45

2. The Governed Gas Pool MUST disperse deposited funds according to a proposal made by Proposers which is enacted by a vote of Executors.
3. The Governed Gas Pool SHOULD define a maximum emissions rate for the pool s.t. the governing body cannot engage in Byzantine or other malicious behavior.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
3. The Governed Gas Pool SHOULD define a maximum emissions rate for the pool s.t. the governing body cannot engage in Byzantine or other malicious behavior.
3. The Governed Gas Pool SHOULD define a maximum emissions rate for the pool s.t. the governing body cannot engage in Byzantine or other malicious behavior.
4. Governance MUST be implemented using the [aptos_governance](https://github.com/movementlabsxyz/aptos-core/blob/andyjsbell/atomic-bridge/aptos-move/framework/aptos-framework/sources/aptos_governance.move) module provided by aptos core.
5. Any necessary upgrades or migrations required to `aptos_framework` MUST be included within a proposal and voted upon by the governing body.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Governed gas pool is not specific to Aptos that would be a separate MIP.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, in that case I'll put the reference implementation there also, as the ref implementation I wrote assumes usage of aptos_governance.move.


### Proposers and Executors
The Governed Gas Pool will have two roles: Proposers and Executors. Proposers will be able to propose actions for the pool, and Executors will be able to vote on these actions.

The rationale behind these two separate roles is to encapsulate the decision-making process. This separation of concerns can allow off-chain services which are less-secure to propose actions which do not immediately affect the pool. Executors, who are more secure, can then vote on these actions.

### Actions
1. For simplicity, we suggest that all synchronous and atomic actions performed by the pool SHOULD be formulated as dispersals from the pool into other accounts.

2. For security, we propose the constraint that all of these dispersals SHOULD be $O(1)$.

For example, the pool can securely--without risk of gas attack--disperse into [MIP-42](https://github.com/movementlabsxyz/MIP/pull/42) withholdings if said action only involves depositing funds into the account controlling that account. In the case that this action were linear in the size of the approved liquidity providers, for example, gas pool proposals good be subject to gas attacks which would prevent critical actions for recirculating funds to take place at the appropriate time.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is liquidity providers job? liquidity providers are not yet defined in this document

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only alluded to in the diagram, but the governed gas pool could disperse to liquidity providers elsewhere in the network.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx. but the role of the liquidity providers is still not defined nor clear.


3. When considering mechanisms which are not synchronous and atomic, we propose that the Governed Gas Pool SHOULD only be considered responsible for the security of the synchronous and atomic step constituting the initial dispersal.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not clear. please elaborate in the above line

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the example below not clarify?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so why "synchronous". what does synchronous mean in this context. can synchronous be removed?


For example, the "Trickle-back" mechanism referenced in [MD-38](https://github.com/movementlabsxyz/MIP/pull/38) could be performed with an initial dispersal into the bridge pool. However, the ultimate effect of those funds returning to L1 settlement rewards would not be guaranteed once set dispersal occurs. Thus, when analyzing the security of the "Trickle-back" mechanism, one would consider the actions of the Governed Gas Pool as secure insofar as the dispersal into the bridge pool is secure. The remainder of the mechanism would be considered separately.

@apenzk apenzk Nov 5, 2024

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
For example, the "Trickle-back" mechanism referenced in [MD-38](https://github.com/movementlabsxyz/MIP/pull/38) could be performed with an initial dispersal into the bridge pool. However, the ultimate effect of those funds returning to L1 settlement rewards would not be guaranteed once set dispersal occurs. Thus, when analyzing the security of the "Trickle-back" mechanism, one would consider the actions of the Governed Gas Pool as secure insofar as the dispersal into the bridge pool is secure. The remainder of the mechanism would be considered separately.
For example, the "Trickle-back" mechanism referenced in [MD-38](https://github.com/movementlabsxyz/MIP/pull/38) could be performed with an initial dispersal through the bridge (or into the L2 Native Bridge DEX in case of the swap-bridge-swap solution). However, the ultimate effect of those funds returning to L1 settlement rewards would not be guaranteed once set dispersal occurs. Thus, when analyzing the security of the "Trickle-back" mechanism, one would consider the actions of the Governed Gas Pool as secure insofar as the dispersal into the bridge pool is secure. The remainder of the mechanism would be considered separately.


### Recommendations for Governance of the Governed Gas Pool
We provide a series of recommendations for the governance of the Governed Gas Pool to account for common phenomena in this system. More detailed proposals, however, such be set forth in MIPs governing a specific Governed Gas Pool implementation.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes


### Migrating via the Governed Gas Pool
The Governed Gas Pool can be used to manage migrations between systems. For example, the Governed Gas Pool could be used to transition from the "Trickle-back" mechanism referenced in [MD-38](https://github.com/movementlabsxyz/MIP/pull/38) and [MIP-42](https://github.com/movementlabsxyz/MIP/pull/42)

## Reference Implementation

Comment thread
0xmovses marked this conversation as resolved.

## Verification


## Errata


## Appendix
Binary file added MIP/mip-n/governed-gas-pool.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.