Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vision: Storage Deposits to be Ergonomic and Automatic #328

Open
shawntabrizi opened this issue Mar 24, 2021 · 2 comments
Open

Vision: Storage Deposits to be Ergonomic and Automatic #328

shawntabrizi opened this issue Mar 24, 2021 · 2 comments
Labels
I5-enhancement An additional feature request. T1-FRAME This PR/Issue is related to core FRAME, the framework.

Comments

@shawntabrizi
Copy link
Member

shawntabrizi commented Mar 24, 2021

A repeating pattern within FRAME is to take a deposit from the user for any storage they place on chain. This provides an economic incentive for having a user clean up that data when it is no longer needed, and before the user's account is deleted.

However, currently, all of the mechanics of managing these storage deposits are custom and manual.

We want to create a system where:

  • Storing data on behalf of a user automatically takes a fee from that user
    • Handles situations where the user may not have enough fees and errors gracefully
    • Automatically adjusts the fee needed based on the item being stored
  • Allows a user to more easily track what fees are currently being reserved (named reserves may help)
  • Allow a user to more easily clean up unwanted storage if they want to exit the system
  • More easily update deposits from users as the deposit prices may change over time
  • Potentially introduce a storage rent mechanic for specific storage items where we want to ensure they are cleaned up over a certain period of time
@stale
Copy link

stale bot commented Jul 7, 2021

Hey, is anyone still working on this? Due to the inactivity this issue has been automatically marked as stale. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the A5-stale label Jul 7, 2021
@kianenigma kianenigma changed the title Refactor Storage Deposits to be Ergonomic and Automatic Vision: Storage Deposits to be Ergonomic and Automatic Mar 10, 2023
@juangirini juangirini transferred this issue from paritytech/substrate Aug 24, 2023
@the-right-joyce the-right-joyce added I5-enhancement An additional feature request. T1-FRAME This PR/Issue is related to core FRAME, the framework. and removed J0-enhancement labels Aug 25, 2023
claravanstaden pushed a commit to Snowfork/polkadot-sdk that referenced this issue Dec 8, 2023
…ech#328)

* Benchmarks for incentivized channel

* Make Verifier::verify constant time

* Add WeightInfo trait, generate weights

* Merge and update benchmarks
@kianenigma
Copy link
Contributor

All ideas named here are great; Some are things that we are tracking elsewhere too, such as #5591.

A rephrase:

  • Integrate Consideration into FRAME storage types. Any storage map that keyed by account id would then charge deposit from that key based on the value.
  • Idea: The Consideration can be configured to be somewhere on the spectrum of rent <> deposit. You might prefer paying more "rent" (a recurring payment, or else your storage might be freed) vs. a larger one-time deposit
  • The deposit amount would be automatically exposed via a Implement pallet view function queries #4722
  • Outcome:
    • Pallet developers don't have to deal with deposits anymore
    • DApp developers have a standard way to know how much deposit a dispatch might collect, and show it to users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I5-enhancement An additional feature request. T1-FRAME This PR/Issue is related to core FRAME, the framework.
Projects
Status: Draft
Status: Backlog
Development

No branches or pull requests

4 participants