-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[Feature]: Stream funds from community pool #17267
Comments
I think there are two parts to this work, first community pool being pulled out of distribution, then either allowing native streaming from that module or allowing streaming plugins to allow people to plugin custom streaming logic from vms or native go code. |
The thing is I'd really like this natively in the SDK so all chains have the ability to do things like make a stream to pay for IBC relaying for instance. |
My initial stab at this -- ref: #12831 |
ref: #10811 |
With the new module design, where distribution is distinct from the community pool, the above architecture should be modified slightly. I suggest creating a middleware which has the same functionality. It should take a map of addresses and corresponding percentage weights that sum to 100%. The middleware can be placed between the distribution module and the community pool module. This allows us to direct the flow of funds coming from distribution, either to the community pool or some number of other addresses. The community pool address is just one of the addresses in the map. The middleware must validate that the community pool address is present in the map. A second instance of the middleware can be placed after the community pool. Similar to the previous instantiation, it can redirect funds away from the community pool into any number other addresses. The percentage weights correspond to a percentage of the total funds available in the CP at that height. Note that community pool address should still be present in the map and the corresponding percentage represents the percentage of funds that will remain in the CP at that height. To updating the middleware parameter a user must submit a governance proposal with the following:
|
this defeats the need for a community pool module imo. Id rather we keep it in the community pool module and simplify the distribution module not make it more complex. |
+1, why can't it be done in a Begin/EndBlocker in the community pool module? |
definitely, that's the track I've been in. But still wandering with some other thoughts. This conversation would really help me sort out my thoughts. |
This is a great idea and much needed feature. I have couple of inputs to simplify/extend this further. Lets have budget type with following details
This allows users/proposers to put these details in the governance community-spending proposal. We can even use this for distributing USD value instead of just ATOMs by applying price calculation logic when the DENOM is USD. We can also just have something like:
I think we can still improve this a bit. Open for feedback/comments |
I like the tranches feature a lot! USD denominations creates a dependency on an external price oracle, which seems out of scope for now. Also think 3rd party services will be better suited for more complex functionality that requires exchange rates. |
Summary
Allow governance to set a parameter that will periodically move funds from the community pool into one or more specified accounts.
Problem Definition
Chains may want to use community pool funds to pay for ongoing commercial services or public goods. Examples include relayer service contracts or core software development. As an alternative to one-off community spend proposals chains should be able to create a continuous funding stream (which may be changed or terminated at any time).
Proposal
Params
store a
budget
map with the following structure:This map can be modified with a custom message voted on by gov. Upon proposal submission the following checks are performed to ensure the message is well-formed:
1. All account addresses exist
2. The sum of all stream amounts equals exactly 1
The budget is also stored as an
epoch_balance
tracking object, the use of which is described belowEndBlocker
At
epoch n
a function is called that performs the following:epoch_balance
fromepoch n-1
from the corresponding values inepoch n
budget
map and the amount is transferred from the community pool to the corresponding addressepoch_balance
fromepoch n
replaces the previous object, persisting for the next epochnote: this is a simple unobtrusive implementation, however I'm open to various alternatives
@keefertaylor said he'd be happy to take this
The text was updated successfully, but these errors were encountered: