-
Notifications
You must be signed in to change notification settings - Fork 663
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
PoX Updates: stack-unlock
#2534
Comments
@kantai as per our convo in discord: I was wondering if this method would take any input (ie tokens to unlock). It seems like it would be preferable to have that. With the need for developers to set the number of tokens to unlock, we'd also require exposing the excess tokens via API. Ideally, this state would be available for the principal (tokens available, tokens locked, token in excess). |
Hey @kantai, I love this update, but I'd like to suggest a slightly bigger change that should improve the stacking UX even more. You can read the proposal on the forum here: https://forum.stacks.org/t/proposed-sip-improve-stacking-ux/13255 |
Thinking through this, I believe the semantics of this need to be such that the early unlock is just moving the "unlock-height" earlier, to be at most the end of the current cycle. Let me try to explain the challenge:
It may seem like this wouldn't be possible, but it definitely is! Consider the following scenario:
And then prepare phase "start" is B3, so the blocks during the prepare phase all descend from B1, and B2 is in the "canonical" chain but B1 would be selected as the PoX anchor (because enough forks disagreed with B2). Maybe if an "auto-unlock" was applied, then this wouldn't be as much of an issue, though I'm not actually positive that's true: a PoX anchor could theoretically stretch far enough back in time. Auto-unlocks have the further complication that they still need to be applied across all forks (because PoX is evaluated in the "sortition" chain). |
EDIT: Disregard what's below. I think I see the problem now -- there's a window of time between when Alice's If so, then yeah -- I think token unlocks will need to happen at a reward cycle boundary, as part of the anchor block selection. It must never be possible for Alice to get her tokens back in the same history as one in which the system later locks them up as they were in a state prior to her unlock request.
I don't think that complication is specific to auto-unlocks -- I think any token lock state mutation must occur when the anchor block is chosen and the reward set is calculated and stored. This would mean that a
|
There isn't currently a PR for this feature, right? I think the current PoX unlock PR (#3260) is only for auto-unlocking and not an explicit function |
Correct. This PR automatically unlocks STX that aren't being used to earn reward addresses. Users do not need to take any action to get their STX back early. |
Yep -- the PR implements auto-unlock rather than the explicit method invocation in this proposal. |
Yup! |
As part of updating PoX in Stacks 2.1, the PoX contract should implement:
In order to allow Stackers who failed to obtain a slot to unlock their lock-ups early.
The text was updated successfully, but these errors were encountered: