Skip to content

Allow fractional relocking #122

@p-offtermatt

Description

@p-offtermatt

Right now, it's possible to just refresh an existing lock. However, users may want to lengthen the lock only for part of their tokens, and may want the other tokens to stay locked with the existing lock duration.

This need seems best served by a new parameter in RefreshLockDuration, like AmountToKeepInOldLock. If this is 0, the behaviour is as-now when refreshing locks. If it is >total_locked_in_this_lock, the lock will stay unaffected.
Otherwise, there will be two locks, the old lock with AmountToKeepInOldLock tokens left, and a new lock with the remaining tokens.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions