Skip to content

Instantly share code, notes, and snippets.

@tbruyelle
Last active March 18, 2025 20:58
Show Gist options
  • Save tbruyelle/fbbfa54184608622fcbb2dbdc20799f0 to your computer and use it in GitHub Desktop.
Save tbruyelle/fbbfa54184608622fcbb2dbdc20799f0 to your computer and use it in GitHub Desktop.
Dynamic deposit signaling proposal submission
{
"deposit": "512000000uatone",
"metadata": "https://common.xyz/atomone/discussion/27055-signaling-proposal-to-make-proposal-deposits-dynamic",
"summary": "This signaling proposal aims to gather community feedback on updating the `x/gov` module to implement a dynamic proposal deposit mechanism. This feature would replace the current static `MinDeposit` and `MinInitialDeposit` values with an adaptive system that automatically adjusts deposits based on governance activity. If approved, this feature will be included in a future AtomOne software upgrade.\n\n# Motivation\n\n### Addressing Governance Spam\n\nMany Cosmos-based chains suffer from governance spam, where users submit low-cost proposals containing misleading information or scams. While frontend filtering and initial deposit requirements exist, dynamically adjusting `MinInitialDeposit` in response to governance activity can provide a more robust solution.\n\n### Preventing Proposal Overload\n\nAn excessive number of active governance proposals can overwhelm stakers, leading to reduced voter participation and governance inefficiencies. The proposed mechanism ensures that governance remains focused by dynamically increasing the deposit requirements when too many proposals are active.\n\n### Reducing Manual Adjustments\n\nCurrently, adjusting `MinDeposit` requires governance intervention, making it difficult to respond quickly to changes in proposal volume. A self-regulating deposit mechanism eliminates the need for frequent governance proposals to modify deposit parameters.\n\n# Implementation\n\nThe `x/gov` module will be updated to replace the fixed `MinDeposit` and `MinInitialDeposit` parameters with dynamic (independently updated) values determined by the following formula:\n \n$$\nD_{t+1} = \\max(D_{\\min}, D_t \\times (1+ sign(n_t - N) \\times \\alpha \\times \\sqrt[k]{| n_t - N |}))\n$$\n\n$$\n\\alpha = \\begin{cases} \\alpha_{up} \u0026 n_t \\gt N \\\\\n\\alpha_{down} \u0026 n_t \\leq N\n\\end{cases}\n$$\n\n$$\nsign(n_t - N) = \\begin{cases} 1 \u0026 n_t \\geq N \\\\\n-1 \u0026 n_t \\lt N\n\\end{cases}\n$$\n\n$$k \\in {1, 2, 3, ...}$$\n$$0 \\lt \\alpha_{down} \\lt 1$$\n$$0 \\lt \\alpha_{up} \\lt 1$$\n$$\\alpha_{down} \\lt \\alpha_{up}$$\n\n[See formula in the ADR](https://github.com/atomone-hub/atomone/blob/8561b1e839bf5ac1b27d83b753f89772192502b7/docs/architecture/adr-003-governance-proposal-deposit-auto-throttler.md#decision)\n\nThe mechanism updates dynamically:\n\n- When proposals enter or exit the voting/deposit period.\n- At regular time intervals (ticks), allowing deposits to gradually adjust even when proposal counts remain stable.\n\n### Key Module Changes\n\n1. **Deprecation of Fixed Deposit Values**\n\t- `MinDeposit` and `MinInitialDepositRatio` will be deprecated. Attempting to set these parameters in the `x/gov` module will result in an error.\n2. **New Dynamic Deposit Parameters:**\nThe following parameters will be available to fine tune both `MinDeposit` and `MinInitialDeposit`, with each deposit type having their separate collection:\n\t- `floor_value`: Minimum possible deposit requirement.\n\t- `update_period`: Time interval for recalculating deposit requirements.\n\t- `target_active_proposals`: The ideal number of active proposals the system aims to maintain.\n\t- `increase_ratio` / `decrease_ratio`: Defines how fast deposits adjust.\n\t- `sensitivity_target_distance`: Controls the steepness of deposit adjustments based on deviations from the target.\n\n3. **Lazily Computed Deposits:**\n\t- The deposit values are only updated when needed (when proposals change state), and computed lazily for time-based updates rather than continuously updating the value in the blockchain state.\n\n# Testing and Testnet\n\nThe dynamic deposit feature has been rigorously tested via unit and end-to-end tests.\n\nThe AtomOne public testnet will undergo a coordinated upgrade that mirrors the potential future v2 upgrade of AtomOne and will include the dynamic deposit feature, allowing more testing before mainnet deployment.\n\n# Potential risks\n\n### Increased Complexity\n\nAutomating deposit adjustments adds computational complexity. However, lazy evaluation ensures efficient updates without unnecessary overhead.\n\n## User Experience Challenges\n\nUsers may find it harder to predict the deposit amount required for a proposal. This can be mitigated with clear client-side tools that display real-time deposit requirements estimates.\n\n# Audit\n\nAn audit covering the entire AtomOne codebase and the x/gov module including the dynamic deposit has started in February 2025 and has been recently completed as of today (March 12th), with no findings. More details, including the full audit report, will be released prior to the potential software upgrade proposal that would deploy this functionality on the AtomOne chain.\n\n# Upgrade process\n\nThe implementation of the dynamic deposit is contingent upon the successful completion of a third-party audit and thorough validation of its functionality. Once these conditions are met, we anticipate releasing this feature as part of AtomOne v2. The v2 upgrade will be initiated through an upgrade governance proposal, which is tentatively scheduled for submission in Q1 2025, pending results from the ongoing audit for more clarity on final timelines.\n\nUpgrade instructions for validators are documented [here](https://github.com/atomone-hub/atomone/blob/main/UPGRADING.md).\n\n# Codebase\n\n- [https://github.com/atomone-hub/atomone/blob/main/docs/architecture/adr-003-governance-proposal-deposit-auto-throttler.md](https://github.com/atomone-hub/atomone/blob/8561b1e839bf5ac1b27d83b753f89772192502b7/docs/architecture/adr-003-governance-proposal-deposit-auto-throttler.md)\n- [https://github.com/atomone-hub/atomone/pull/69](https://github.com/atomone-hub/atomone/pull/69)\n- [https://github.com/atomone-hub/atomone/pull/65](https://github.com/atomone-hub/atomone/pull/65)\n- [Upgrade instructions](https://github.com/atomone-hub/atomone/blob/main/UPGRADING.md)\n\n# Voting options\n\n- Yes: You are in favor of introducing a dynamic deposit for governance proposals\n- No: You are agains having a dynamic proposal deposits\n- ABSTAIN - You wish to contribute to the quorum but you formally decline to vote either for or against the proposal.\n",
"title": "Signaling proposal to make proposal deposits dynamic"
}
atomoned tx gov submit-proposal dynamic-dep-signaling-prop.json --from XXX --fees 2000uatone --gas auto
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment