-
Notifications
You must be signed in to change notification settings - Fork 208
Feat/subnet leasing #1582
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
base: devnet-ready
Are you sure you want to change the base?
Feat/subnet leasing #1582
Conversation
…ax number of contributors to refund on termination
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good: I left a couple of small recommendations.
Why did we mark the benchmarks as extra here? |
Because it makes the benchmarks workflow fails due to the use of parameters and it can't detect correctly that parameters are used. I did run the benchmarks on a beefy server though. It will be changed in the future after the work from @JohnReedV on the macros to autodetect this (if doable btw) |
Cool idea. Could it be extended to fulfil its destiny? There is a very desirable outcome for subnets, which is the ownership is fully decentralised. This would mean that subnets could be composed of multiple different owners, and not controlled by one entity. I think there needs to be 3 things for this to happen:
I don't believe 2 & 3 are implemented right now (forgive me if I'm wrong, I'm not proficient in rust). The feature where leases can be temporary is very nice, but in our goal for decentralisation I think 2 & 3 matter more. They don't necessarily need to be mutually exclusive though, instead shareholders could vote to form temporary new leases rather than the 'sudo owner key'. Is this within scope for the current issue, or should another issue be made? Hopefully the current implementation wouldn't prohibit 2 or 3. |
I wonder if there is some way to do stake-weighted threshold BLS multi-sigs 🤔 |
This is more of a job for the EVM layer. What we should tackle on the runtime-side is to make the subnet owner interface accessible via precompile(s) so that calls can be made to change hyper-params and read storage maps. Issue #1615 is sufficient for decentralization like this via a smart contract -based DAO. Where arbitrary calls are voted on and approved. The harder thing is fine-tuning what calls can be voted on, which would be better served by precompile perhaps... |
Description
Add the subnet leasing feature that can be used as the call passed to a crowdloan.
This enables each contributor of a crowdloan to become a shareholder of a subnet for a finite or infinite number of blocks, hence receiving a part of the subnet owner's cut when they are distributed, directly to their cold keys.
The distribution is done on each block if the subnet is leased and if there is enough liquidity in the subnet pool, if there is not enough liquidity, the dividends to the lease are accumulated for later distribution.
When the lease has passed his end block, the lease can be terminated by the beneficiary (the crowdloan creator that will target this call) to transfer the ownership of the subnet from the lease to himself.
Related Issue(s)
Type of Change
Breaking Change
If this PR introduces a breaking change, please provide a detailed description of the impact and the migration path for existing applications.
Checklist
cargo fmt
andcargo clippy
to ensure my code is formatted and linted correctlyScreenshots (if applicable)
Please include any relevant screenshots or GIFs that demonstrate the changes made.
Additional Notes
Please provide any additional information or context that may be helpful for reviewers.