-
Notifications
You must be signed in to change notification settings - Fork 707
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
Allow early refund of slot deposit #1749
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ank4n
commented
Sep 29, 2023
|
||
// If this is less than what we were holding for this leaser's now-ended lease, | ||
// then unreserve it. | ||
if let Some(rebate) = ended_lease.1.checked_sub(&now_held) { | ||
let current_hold = ended_lease.1; | ||
// Fixme(ank4n): check reserved balance from state instead of deposit. We might |
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.
Fungibles would fix this but probably shouldn't migrate in this PR
gpestana
approved these changes
Nov 22, 2023
I guess its too late to be useful anymore? @SBalaguer Closing this PR. |
serban300
added a commit
to serban300/polkadot-sdk
that referenced
this pull request
Mar 26, 2024
serban300
added a commit
to serban300/polkadot-sdk
that referenced
this pull request
Mar 27, 2024
serban300
added a commit
to serban300/polkadot-sdk
that referenced
this pull request
Apr 8, 2024
serban300
added a commit
to serban300/polkadot-sdk
that referenced
this pull request
Apr 8, 2024
serban300
added a commit
to serban300/polkadot-sdk
that referenced
this pull request
Apr 8, 2024
serban300
added a commit
to serban300/polkadot-sdk
that referenced
this pull request
Apr 8, 2024
serban300
added a commit
to serban300/polkadot-sdk
that referenced
this pull request
Apr 8, 2024
serban300
added a commit
to serban300/polkadot-sdk
that referenced
this pull request
Apr 9, 2024
serban300
added a commit
to serban300/polkadot-sdk
that referenced
this pull request
Apr 9, 2024
serban300
added a commit
to serban300/polkadot-sdk
that referenced
this pull request
Apr 9, 2024
serban300
added a commit
to serban300/polkadot-sdk
that referenced
this pull request
Apr 9, 2024
serban300
added a commit
to serban300/polkadot-sdk
that referenced
this pull request
Apr 9, 2024
serban300
added a commit
to serban300/polkadot-sdk
that referenced
this pull request
Apr 9, 2024
serban300
added a commit
to serban300/polkadot-sdk
that referenced
this pull request
Apr 10, 2024
serban300
added a commit
to serban300/polkadot-sdk
that referenced
this pull request
Apr 10, 2024
This was referenced Jun 5, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
closes #877
context: https://hackmd.io/4OLfULI6RtaPdE-L_hur4g
Changes since last approach (Updated on 19th Nov):
Instead of having a config value that determines how early refund can be applied before the slot expiry, now early refund can only be applied anytime during the last LP of the lease. Parachains should have at minimum
MinLeasePeriodsForEarlyRefund
LPs in their current lease to be able to refund early.Summary
This change would allow a parachain to refund their slot deposit during their last lease period, given that they leased out minimum of
MinLeasePeriodsForEarlyRefund
in the last auction. For parachains who won the lease with a crowdloan, they could then refund crowdloan funds to contributors, and dissolve the crowdloan. This gives them opportunity to either start a new crowdloan or bid directly with their released funds.If
MinLeasePeriodsForEarlyRefund
is set to0
, a slot deposit can never be refunded before it expires.Changes
MinLeasePeriodsForEarlyRefund
: Determines how many minimum lease periods a leaser in their latest lease to be eligible for early refund. This value should always be greater than 0. If set to 0,early_lease_refund
is disabled.early_lease_refund
: Only para or para manager can call this or can be executed via governance with Lease Admin origin track. It allows a parachain to unreserve their lease deposit during the last lease period of their full lease. This will unreserve the deposit of the slot but would not downgrade the parachain yet. Parachain would be downgraded as it happens today if at the start of the next lease period it does not have any new leases remaining or left alone if a new lease has become available and update the fund reserved to match the new requirement.LeaseInfo
: Keeps track of how much funds is reserved as well as period count of the latest lease for a leaser.early_lease_refund
can be followed by the callsrefund
anddissolve
on the crowdloan pallet for the para_id which will remove the crowdloan and allow the parachain to create a new crowdloan for the same para_id.TODO
early_lease_refund
is not called. This ensures we do not impact any existing flows.early_lease_refund
.early_lease_refund
).early_lease_refund
.