Expand description

Transfer Funds as Frozen with a Time Delayed Release

Time-Release Pallet

Provides a way to schedule a balance freeze on an account.

Summary

The time-release pallet employs a graded release approach, which thaws a specific amount of balance every period of time, until all balance is thawed.

Note: This pallet is a fork and modification of the ORML-vesting.

Release Schedule

The schedule of a release on hold is described by the data structure ReleaseSchedule. Starting from the specified block number denoted as start, the schedule operates on a periodic basis. For each period amount of blocks, a designated per_period amount of balance is unfrozen. This process continues until the specified number of periods, denoted as period_count, is reached. It’s important to highlight that in release schedules, the concept of time is measured in terms of block numbers. Accessing all ReleaseSchedule instances associated with an account is possible through querying the chain state.

Actions

The Time-Release pallet provides for:

  • Creating a transfer with a schedule for release
  • Claiming balances that are released
  • Governance updates of schedules

Interactions

Extrinsics

Name/DescriptionCallerPaymentKey EventsRuntime Added
transfer
Transfer tokens to another account with an unlock schedule
Token AccountTokensReleaseScheduleAdded24
claim
Remove the lock on tokens for the calling account when the schedule allows
Account with LockTokensClaimed24
claim_for
Remove the lock on tokens for a different account when the schedule allows
Any Token AccountTokensClaimed24
update_release_schedules
Governance action to update existing schedules
GovernanceTokensReleaseSchedulesUpdated24

See Rust Docs for more details.

State Queries

NameDescriptionQueryRuntime Added
Release ScheduleRetrieves the release schedule for an accountreleaseSchedules24

See the Rust Docs for additional state queries and details.

Re-exports

Modules

  • storage migrations
  • The pallet module in each FRAME pallet hosts the most important items needed to construct this pallet.
  • Autogenerated weights for pallet_time_release

Structs