🛠️
Technical Documentation
  • Introduction
    • About Empeiria
  • Empe Blockchain
    • Overview
    • Chain Architecture
      • Auth
      • Authz
      • Bank
      • Distribution
      • Governance
      • Staking
      • IBC
      • DidDoc
      • Vesting
      • Minter
      • Stablefee
      • LinkedResources
  • EVDI
    • EVDI Architecture
    • Self-Sovereign Identity
      • Technical Foundations
      • Roles in the SSI framework
      • Protocols and Standards
  • User Guide
    • Empe DID Wallet
      • Intro
      • Download and first launch
      • Create or import did
      • Main screen overview
      • How to claim credential from issuer
      • How to use credential with verifier
      • Settings and other options
    • Keplr Wallet and Blockchain Operations
      • How to Connect Keplr Wallet
    • Ping Pub operation
    • Staking Tokens Guide
    • Voting on Governance Proposals Guide
    • Sending Tokens Guide
  • Developer Guide
    • Tutorial: Credential Issuance & Verification
      • Overview
      • Understanding Key Concepts
      • Project Setup
      • Deploying the Issuer
      • Uploading the Credential Schema
      • Issuing Credentials
      • Frontend for Credential Issuance
      • Testing Credential Issuance
      • Deploying the Verifier
      • Setting Up the Verification Flow
      • Creating a Verification Endpoint
      • Creating a Protected Dashboard
      • Testing the Verification Flow
      • Summary & Next Steps
    • One-click deployment
      • Introduction
      • Registration
      • Login
      • Creating an Issuer
      • Issuer Data Description
      • Creating a Verifier
      • Verifier Data Description
    • Verifier
      • Terminology and Concepts
      • Architecture Overview
      • Core Responsibilities
      • Query Language
      • Frontend Integration
      • Client Configuration
      • Security Considerations
      • Error Handling and Troubleshooting
      • Future Enhancements
      • References and Standards
      • FAQ
    • Issuer
      • Terminology and Concepts
      • Architecture Overview
      • Core Responsibilities
      • DID Document Management
      • Schemas Management
      • Issuing Credentials
      • Interacting with Wallets
      • Security Considerations
      • Error Handling and Troubleshooting
      • Future Enhancements
      • References and Standards
      • FAQ
    • Wallet SDK (Coming soon)
    • Introduction to cosmwasm
  • Validator Guide
    • Important links
    • Validators Guide
      • New validator
      • Hardware requirements
      • Required software installation
      • Go installation
      • Install prebuild binary
      • Install binary from source code (option B)
      • Configure a node
      • Cosmovisor setup
      • Sync with state-sync
      • Full state sync from archive snapshot
      • Latest snapshot
      • Run a Validator
      • Migration to v0.2.2
      • Migration to v0.3.0
      • Migration to v0.4.0
    • FAQ
  • Airdrop
    • On-Chain Testnet Airdrop
    • Faucet Guide: How to Claim Testnet Tokens?
  • Appendix
    • Glossary
Powered by GitBook
On this page
  • Abstract
  • Contents
  • Messages
  • Create Vesting Account
  • Split vesting accounts
  • Client
  • Events
  1. Empe Blockchain
  2. Chain Architecture

Vesting

PreviousDidDocNextMinter

Last updated 2 days ago

This module was highly inspired by the

Abstract

The vesting module provides functionality for creating and managing vesting accounts within the blockchain. Vesting accounts are special accounts that release tokens over a specified period, ensuring a controlled distribution of tokens. This module allows token holders to create new vesting accounts, split existing vesting accounts, and manage the vesting process through a set of defined messages and events. The MsgCreateVestingAccount message allows any token holder to create a new continuous vesting account and transfer tokens to it. The MsgSplitVestingAccount message enables existing vesting accounts to split their locked tokens into a new vesting account, preserving the total number of tokens, vesting times, and token release speed.

Contents

Messages

Create Vesting Account

Creates a new continuous vesting account and sends token from the creator account.

MsgCreateVestingAccount can be submitted by any token holder via aMsgCreateVestingAccount transaction.

type MsgCreateVestingAccount struct {
	FromAddress string
	ToAddress   string
	Amount      sdk.Coins
	StartTime   int64
	EndTime     int64
}

Params:

Param
Description

FromAddress

Vesting pool owner address

ToAddress

New continuous vesting account address

Amount

Amount to lock in vesting account

StartTime

Vesting start time - unix

EndTime

Vesting end time - unix

State modifications:

  • Validates if FromAddress has enough tokens.

  • Creates a new continuous vesting account with address equal to ToAddress and time params according to provided data

  • Sends tokens from FromAddress account to ToAddress

Split vesting accounts

Split tokens that are locked in vesting to a new vesting account. Total number of tokens in vesting, vesting times and token release speed are preserved. This mechanism can also be called as a "vesting cession".

The MsgSplitVestingAccount can be submitted by any vesting account via a MsgSplitVestingAccount transaction.

type MsgSplitVestingAccount struct {
	FromAddress string
	ToAddress   string
	Amount      sdk.Coins
	StartTime   int64
	EndTime     int64
}

Params:

Param
Description

FromAddress

Vesting pool owner address

ToAddress

New continuous vesting account address

Amount

Amount of locked vesting to split

StartTime

Vesting start time - unix

EndTime

Vesting end time - unix

State modifications:

  • Validates if FromAddress has enough locked tokens in the vesting

  • Validates if the start time of the new vesting account is after the start time of the original vesting account

  • Validates if the end time of the new vesting account is after the end time of the original vesting account

  • Creates new continuous vesting account with address equal to ToAddress and time parameters set to:

    • start time is set to the provided start time

    • end time is set to the provided end time

  • Sends locked vesting from FromAddress account to ToAddress

Client

The x/vesting module provides CLI commands to interact with it:

  • create-vesting-account [to-address] [amount] [start-time] [end-time]

  • split-vesting-account [to-address] [amount] [start-time] [end-time]

Users must provide:

  • Valid to-address.

  • amount of coins (e.g. 1000uempe).

  • start-time and end-time as UNIX timestamps.

Example:

emped tx vesting create-vesting-account empe1xyz... 1000uempe 1672531200 1704067200 --from mykey

This creates a vesting account starting at UNIX time 1672531200 and ending at 1704067200.

Events

MsgCreateVestingAccount

Type
Attribute Key
Attribute Value

EventNewVestingAccount

address

{new_vesting_account_address}

message

action

/chain4energy.c4echain.vesting.MsgCreateVestingAccount

message

sender

{sender_address}

transfer

recipient

{module_account}

transfer

sender

{creator}

transfer

amount

{amount}

MsgSplitVestingAccount

Type
Attribute Key
Attribute Value

EventVestingSplit

source

{from_account_address}

EventVestingSplit

destination

{to_account_address}

EventNewVestingAccount

address

{new_vesting_account_address}

message

action

/chain4energy.c4echain.vesting.MsgSplitVestingAccount

message

sender

{sender_address}

transfer

recipient

{module_account}

transfer

sender

{creator}

transfer

amount

{amount}

Chain4Energy cfevesting module
Messages
Events