Skip to content

[draft] MIP-44: NB-FFS Governed Gas Pool - #44

Open
l-monninger wants to merge 2 commits into
mainfrom
l-monninger/ab-ffs-governed-gas-pool
Open

[draft] MIP-44: NB-FFS Governed Gas Pool#44
l-monninger wants to merge 2 commits into
mainfrom
l-monninger/ab-ffs-governed-gas-pool

Conversation

@l-monninger

@l-monninger l-monninger commented Nov 5, 2024

Copy link
Copy Markdown
Contributor

Summary

MIP-44

@l-monninger
l-monninger requested a review from apenzk as a code owner November 5, 2024 08:33
@l-monninger l-monninger changed the title MIP-43: AB-FFS Governed Gas Pool MIP-44: AB-FFS Governed Gas Pool Nov 5, 2024
@0xmovses
0xmovses self-requested a review November 5, 2024 14:57

@0xmovses 0xmovses left a comment

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.

I'll be following up with a PR that will merge into this MIP PR #44. I'll be working on,

  • Updates required to aptos_governance.move in order for us to use it.
  • Ref Implementation for creating the Governed Gas Pool
  • Ref Implementation for network upgrade scripts.

Comment thread MIP/mip-n/README.md Outdated
@@ -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-42: Governed Gas Pool

This is no longer coupled with AB or AB-FFS

Comment thread MIP/mip-n/README.md
@@ -0,0 +1,53 @@
# MIP-42: AB-FFS Governed Gas Pool
- **Description**: Introduces a governed gas pool for AB-FFS 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)

Comment thread MIP/mip-n/README.md
## 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.

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(##).

Comment thread MIP/mip-n/README.md Outdated
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.

## 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 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.

Comment thread MIP/mip-n/README.md

1. Gas used on the L2 MUST be deposited into the Governed Gas Pool.
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.

Comment thread MIP/mip-n/README.md Outdated
@@ -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

Comment thread MIP/mip-n/README.md Outdated
@@ -0,0 +1,53 @@
# MIP-42: AB-FFS Governed Gas Pool
- **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.

Comment thread MIP/mip-n/README.md
- **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.

Comment thread MIP/mip-n/README.md Outdated
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.

## 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.

Comment thread MIP/mip-n/README.md
## 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

Comment thread MIP/mip-n/README.md

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.

Comment thread MIP/mip-n/README.md

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.

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?

Comment thread MIP/mip-n/README.md

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.

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.

Comment thread MIP/mip-n/README.md
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.

### 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

@0xmovses
0xmovses self-requested a review November 6, 2024 07:37
Comment thread MIP/mip-n/README.md
@apenzk apenzk changed the title MIP-44: AB-FFS Governed Gas Pool [draft] MIP-44: AB-FFS Governed Gas Pool Nov 6, 2024
@apenzk apenzk changed the title [draft] MIP-44: AB-FFS Governed Gas Pool [draft] MIP-44: NB-FFS Governed Gas Pool Nov 22, 2024
@apenzk apenzk added bridge and removed bridge labels Nov 25, 2024
@franck44 franck44 added check_for_outdated Draft MD/MIP A new/draft MD/MIP Needs changes Requires attention & changes labels Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

check_for_outdated Draft MD/MIP A new/draft MD/MIP Needs changes Requires attention & changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants