Skip to content
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

Is this a viable solution for partial unbond of Superfluid locks? #3830

Closed
t4sk opened this issue Dec 22, 2022 · 4 comments
Closed

Is this a viable solution for partial unbond of Superfluid locks? #3830

t4sk opened this issue Dec 22, 2022 · 4 comments

Comments

@t4sk
Copy link
Contributor

t4sk commented Dec 22, 2022

Normal locks can partial unbond, but superfluid locks can't. Will this be a viable solution for partial unbond of superfluid locks?

Modifies the function BeginUnlock

  • BeginUnlock will call a hook to super fluid if synthetic lock exists
  • Superfluid hook will execute code to split synthetic lock into 2 (locking and unlocking)
    func (k Keeper) BeginUnlock(ctx sdk.Context, lockID uint64, coins sdk.Coins) error {
    // prohibit BeginUnlock if synthetic locks are referring to this
    // TODO: In the future, make synthetic locks only get partial restrictions on the main lock.
    lock, err := k.GetLockByID(ctx, lockID)
    if err != nil {
    return err
    }
    if k.HasAnySyntheticLockups(ctx, lock.ID) {
    return fmt.Errorf("cannot BeginUnlocking a lock with synthetic lockup")
    }
    return k.beginUnlock(ctx, *lock, coins)
    }

osmosis-pr

@ValarDragon
Copy link
Member

This looks great! Would love for this to get in

@stackman27
Copy link
Contributor

Would love to have partialUndelegation and partial unBonding if possible

@MbBrainz
Copy link

MbBrainz commented Jan 9, 2023

Any update on this issue and its priority?

@t4sk
Copy link
Contributor Author

t4sk commented Jan 10, 2023

WIP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

5 participants