-
Notifications
You must be signed in to change notification settings - Fork 800
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
META: Moving the Treasury Off the Relay Chain #98
Comments
At some point sure but.. Is there much traffic on the treasury? Assuming no we might focus first upon heavier stuff like elections, although maybe that's harder. We do not have a good system for selecting collators for essential parachains yet. We could discuss doing so of course, but not sure they'll all work out the same honestly. |
There's not a lot of traffic, but it still makes sense to isolate. This also moves logic into an existing parachain and can mostly be done in FRAME, while elections is a whole new parachain. Won't get into a priority argument, but I don't see how working toward this prevents working on an elections parachain as well. |
We're maybe not too worried about liveness for statemint, but what about capture? How does one become a collator? |
By reserving DOT and declaring intent to collate, on a FCFS basis. It's a system we've wanted to update and perfectly fair to open an issue to discuss that, but how does it relate to this issue? |
Ain't so easy to use DOT staking on a parachain because if adversaries could choose between being a validator or a collator then adversaries could monopolize being collators so they could capture the parachain. We'd prevent permanent capture with erasure coded state checked points, but even temporary capture makes essential parachains tricky. It's avoidable if parachains have minimal state aside from their blocks, like elections. We should consider what happens to the treasury, or even say staking, if they become unavailable for an epoch or so, due to capture. If it's fine, then we could randomly churn some nodes into being collators somehow, and ensure they could join using erasure coded check points. |
Sure, those are all fair points about parachains in general, but it's really off topic for this issue. I never said that this is higher priority than anything else, like staking/governance/etc, nor that the collator selection mechanisms are perfect (they are definitely not, and actually should be revisited). I made paritytech/cumulus#1159 for further discussion on that topic. This issue is a rather large task with open questions about Treasury design, let's keep this thread focused on that. |
@joepetrowski Don't fully understand this, you mean the Treasury says "we want to collect X amount of Y token" and parachains and individuals bid saying "I'll give you the Y tokens for this much KSM"? Another idea I mention in a section of our Kreivo common good chain proposal is to supercharge the treasury and view it like a decentralized VC that decides via governance how to "diversify its portfolio", an "investments" subsystem could define a strategy on how to progressively convert the native token reserves to other assets based on the public's opinion, perhaps the new conviction voting system could work for this? based on how much conviction people put on a specific asset the treasury could trade tokens automatically. The trading part might be tricky though, It's in the scope of a parachain like Kreivo to have a x-chain DEX but not for Statemine so trading via XCM in a set of trusted DEXes could be an option but also brings more complexity. |
Indeed. More details in the Cumulus issue linked above. |
I’m not sure the treasury should try and be a VC. That requires picking
sides / winners. In my opinion the focus for the treasury should be on
neutrality where practical.
…On Tue, 21 Jun 2022 at 12:30, joe petrowski ***@***.***> wrote:
Don't fully understand this, you mean the Treasury says "we want to
collect X amount of Y token" and parachains and individuals bid saying
"I'll give you the Y tokens for this much KSM"?
Indeed. More details in the Cumulus issue linked above.
—
Reply to this email directly, view it on GitHub
<#98>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGEJCDDYDQ26B5FTLXB7A3VQGRVVANCNFSM5S4KVIWQ>
.
You are receiving this because you were assigned.Message ID:
***@***.***>
|
@gilescope I would agree with you if the decision is to be taken arbitrarily and subjectively by a few designated individuals, but we wouldn't have to pick sides if a system follows deterministically the "will of the people" no? overtime it could become a more complex system that takes more factors into account like data coming from oracles, "KPIs"/goals set by the on-chain government, the will of a future AI overlord and what not. Aren't real world governments also investing strategically in different industries or spending public resources in programs that aid bootstrapping local companies? Similarly the list of eligible projects could be limited to early stage ones that haven't received previous funding, but that's just to say that there are many ways this investing mechanism could be implemented in practice. |
I doubt VC is a useful term here. Afaik, the treasury won't be doing what VCs actually do. It's closer to government spending i guess. I doubt the treasury could ever usefully spend money on marketing or promotion, for example. It's likely parachain projects do ask for treasury funding for software work the project feels to be common good, but the community feels to be too project specific, and thus the community asks for tokens, but.. It might make sense doing this occasionally, but imho any project who winds up in this situation might fair better with a VC who then spends not only tokens but their own time. I do however think the treasury should hold the tokens of some projects in which it invests, but more tokenized physical assets like land used for agrivoltaics or rewilding carbon credits. In principle, these might emit on-chain assets somehow, some of which require messy oracles, but some like agrivoltaics emit concrete euros held by a tokenized corporation, possible in Swiss law. In this, the treasury owning land & euros acts like a stabalizing influence on other token prices within the ecosystem. |
@burdges I agree calling the treasury a VC might not be appropriate but there's still value in the idea of tokens not always flowing in one way and allow the community demand for a project's tokens in return even if the project is completely for the common good or in a gray area of being common good but seeking its own gains. It's interesting you touch some topics that are very related to what we want to do with Kreivo/Virto Network in the future, we have this concept of land tokens minted through DOT staking that enable people establish local communities that can manage funds collected and locked in said land cells via a tax system that charges special fees to payments on products/services, the spending of the taxes might be restricted to specific things like carbon credits or anything that aids in the economic development of the local community. It would be interesting to see the relay-chain community having a saying in local policies 🤔 |
For NFTs we might be over a barrel if the treasury is trying to buy the only one. I don't think it should accept a proposal for an asset that it does not have enough of to enact the proposal. Should a proposal's bond always be in the native token of DOT/KSM or should other assets be acceptable? |
It's better if the bond is in the proposal's currency (otherwise an fx rate would be needed to convert from the quantity proposed to the dot equivalent). Should a proportion of the non-native assets be burned if they are not spent? Burning a proportion of the treasury is designed to force people into action. Treasury owned NFTs could not have a portion burned. |
As for the original topic, we do not need SPREEs for this because we're treating this new parachain code as trusted, and the upgrades work like polkadot governance, yes? |
Yeah but it's adding complication. As a step we can make it fixed or use the ratio of minimum balances.
IMO, no. The native asset is the only asset that ends up in the treasury "automatically" due to the protocol. Acquiring and holding some other asset is a deliberate use of the Treasury. |
This issue has been mentioned on Polkadot Forum. There might be relevant details there: https://forum.polkadot.network/t/a-better-treasury-system/291/4 |
This issue has been mentioned on Polkadot Forum. There might be relevant details there: |
This issue has been mentioned on Polkadot Forum. There might be relevant details there: https://forum.polkadot.network/t/statemint-update-roadmap/1200/24 |
This thread already describes clearly the vision we hope to achieve (Moving the Treasury out of the Relay Chain), but also some of the higher-level challenges which we hope to solve along the way:
There are already conversations happening around the topic of multi-asset acquisitions (DEX, TWAMMS, etc.). So I would avoid that here. But for Multi-asset holdings and multi-asset Spending, I can share the current plan I'm exploring. Treasury assets on StatemintMulti-asset holdingsAs a community, we currently have Statemint as the hub for assets, which is the primary location for issuing and holding assets, with even long-term plans to hold and transact popular stable coins/tokens directly on Statemint. This Treasury account on statemint would be spendable from the Spending Origin, which would equally be possible via referendum (Treasury spend proposals, etc.). There will be a mechanism to teleport DOT from the relay chain to the treasury on statemint at configurable intervals, e.g., every 24 hours. The details of where this logic would sit still need to be clarified, and I would appreciate ideas. Multi-asset SpendingWith the treasury on statemint, there needs to be a mechanism to spend this for the benefit of the community. After some conversations and experimenting, the roadmap is the following: Multi-asset treasury palletThe current treasury pallet is coupled tightly with the So instead, we will leverage the fairly new Pay trait , which is great because instead of coupling the treasury to fungibles (assets pallet?), fungible (balances pallet?) we can implement the Pay trait over fungibles or fungible or even just over XCM, making the treasury pallet much more flexible. The treasury spend function will be adjusted to support as asset id argument. This way, the community will create treasury-spend proposals for specific asset classes. E.g., a proposal could request 100 USDT and be paid precisely that. However, if the treasury does not have enough funds in that asset class, the transaction will fail, and the treasury pallet will retry the Payment at the next In this case, the Treasurer would be an Origin that can perform more privileged operations on behalf of the treasury and might have its own Referendum track. There's an ongoing PR: paritytech/substrate#13607 Exchange OracleThe treasury pallet requires a means to track its budget and to tell if it currently has enough room to pay out for a particular proposal. To continue supporting such a budget, we have two possibilities:
The second option appears more straightforward since having a limit for each supported pair could be an accounting nightmare, especially when factoring in the current logic for burning assets when the treasury value is unspent. For this approach, we need a means of estimating the value of other asset classes compared to the native asset class. The exchange pallet would provide the means for making these estimations. Its current design would be a simple map of asset pairs and a rate, with an extrinsic, which converts a balance in one asset class into the balance in the native asset class. The exchange pallets would be configurable via referendum, and in the future could subscribe for updates from a dex or similar mechanism and use that for its configured rates. But an option configured by referendum could be a sufficient starting point for our immediate needs. There's an ongoing PR: Multi-asset treasury over XCMThe next step will be to configure the treasury on the relay chain to operate over an implementation of the Pay trait that works over XCM. fn pay(
who: &Self::Beneficiary,
asset_kind: Self::AssetKind,
amount: Self::Balance,
) -> Result<Self::Id, ()>; The pay method would then initiate an XCM The Most of the work here is configuring everything together and testing all the operations and the expected XCM interactions. |
@tonyalaribe thank you for the proposal.
|
As part of the Common Good parachains roadmap, we'd like to move functionality from the Relay Chain into parachains. In the case of the Treasury, this move would have the dual benefit of taking some load off the Relay Chain and expanding the functionality that the Treasury can offer.
There are arguments for a few parachains to which to move the Treasury, like a governance parachain or Statemint. For the purposes of this issue, I'm going to assume Statemint, but if there are convincing arguments to put it elsewhere then let's change that.
Here are some changes, new features, and challenges that I foresee in making this happen:
Getting DOT/KSM Into the Treasury
The Treasury primarily accumulates its holdings via inflation on era change (once per era), transaction fees (every transaction), and slashes (occasionally). Since eras and slashes are still handled on the Relay Chain and people still transact on it, it still makes sense for the Treasury to maintain an account there.
It would be overkill to send messages for every transaction into the parachain. One suggested solution: add to the
on_initialize
of the Staking pallet to teleport all DOT/KSM to the Treasury on Statemint. This would be a daily (or 4x daily) transfer of the native asset of the Relay Chain.Getting DOT/KSM Out of the Treasury
Several mechanisms exist to get DOT/KSM out of the Treasury, primarily:
These pallets will need some tweaks. They are designed to accept proposals/tips in the native asset of the chain. One of the advantages of a Treasury on Statemint is that it could hold other assets. Users should be able to make requests for other assets, and governance should have the ability to manage asset holdings of the Treasury and acquire other assets.
Burning should be relatively unchanged, it will just need to check in with the Relay Chain to update
TotalIssuance
.Multi-Asset Holdings
Holdings
The Treasury should be able to hold:
Of course, governance should have the say in which assets the Treasury can hold. And of course the list can go on with e.g. NFTs registered natively on other parachains, this list is just a starting point.
Multi-Asset Spending and Acquisition
Of course, the Treasury shouldn't be limited to holding other assets, it should be able to spend them, and will need the means to acquire them.
There are a few issues to sort out:
The text was updated successfully, but these errors were encountered: