You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently freeze (Issue #71) applies to an entire position. Add a partial freeze mechanism where the admin can freeze a specific token amount within a position — the frozen portion cannot be unstaked while the unfrozen portion remains freely accessible.
Acceptance Criteria
FrozenAmount(Address) persistent storage: i128 amount frozen within user's position
partial_freeze(admin, user: Address, amount: i128) — freezes amount of user's position
Summary
Currently freeze (Issue #71) applies to an entire position. Add a partial freeze mechanism where the admin can freeze a specific token amount within a position — the frozen portion cannot be unstaked while the unfrozen portion remains freely accessible.
Acceptance Criteria
FrozenAmount(Address)persistent storage:i128amount frozen within user's positionpartial_freeze(admin, user: Address, amount: i128)— freezesamountof user's positionpartial_unfreeze(admin, user: Address, amount: i128)— releases frozen amountget_frozen_amount(user: Address) -> i128read-only queryget_available_amount(user: Address) -> i128=position.amount - frozen_amountunstakeonly allows withdrawal up toavailable_amount— revert withAmountFrozenif exceeding availablepartial_frozenevent:(user, frozen_amount, total_position, ledger)FreezeExceedsPositionNotes