☁️
Züs
  • About Züs
  • Concepts
    • Architecture
      • Mining on the Züs Blockchain
        • Onboarding a New Miner or Sharder
        • Block Production Protocol
        • Block Finalization
        • Merkle Patricia Trees(MPT) and Recovery
        • View Change and Distributed Key Generation(DKG)
      • Payment
      • Storage
      • Token Bridge Protocol
      • Resources
    • Tokenomics
      • Staking Process
      • Block Rewards
      • Delegation
    • Store
    • Earn
    • Build
    • NFT
  • Resources
    • Whitepapers
      • Tokenomics Paper
      • Architecture Paper
      • Storage Paper
    • Patents
      • NON-FUNGIBLE TOKEN BLOCKCHAIN PROCESSING
      • FREE STORAGE PROTOCOL FOR BLOCKCHAIN PLATFORM
      • TRANSFERRING CONTENT VIA PROXY RE-ENCRYPTION
      • STREAMING CONTENT VIA BLOCKCHAIN TECHNOLOGY
      • SPLIT-KEY WALLET ACCESS BETWEEN BLOCKCHAINS
      • ENFORCING SECURITY PARAMETERS SPECIFIED BY AN OWNER ON A BLOCKCHAIN PLATFORM
      • CLIENT AUTHENTICATION USING SPLIT KEY SIGNING ON A BLOCKCHAIN PLATFORM
      • BLOCKCHAIN CONTENT PURCHASING PROTOCOL
      • BLOCKCHAIN BASED PRIVACY COMPLIANCE PLATFORM
      • SYSTEMS AND METHODS OF SELF-ADMINISTERED PROTOCOLS ON A BLOCKCHAIN PLATFORM
      • SYSTEMS AND METHODS OF AGGREGATE SIGNING OF DIGITAL SIGNATURES ON MULTIPLE MESSAGES SIMULTANEOUSLY U
      • SYSTEMS AND METHODS OF BLOCKCHAIN PLATFORM FOR AUTOMATED ASSET BASED PROVISIONING OF RESOURCES
      • SYSTEMS AND METHODS OF SELF-FORKING BLOCKCHAIN PROTOCOL
      • SYSTEMS AND METHODS OF SUSTAINABILITY PROTOCOL USING DISTRIBUTED BLOCKCHAIN APPLICATION WITH IoT SEN
      • SYSTEMS AND METHODS OF BLOCKCHAIN PLATFORM FOR DISTRIBUTED APPLICATIONS
  • API Reference
    • Endpoints
      • Block
      • Client
      • Connection
      • DNS
      • File
      • Smart Contracts
      • Blobber Stats
      • Transactions
      • Miners and Sharders
        • Stats
        • State
        • Diagnostics
        • Configuration
        • Smart Contract State
        • Smart Contract Stats
        • Chain Stats
  • Hackathon
    • Register to Hackathon
      • How to Add Members to Hackathon Team
    • Repos
    • Documentation
  • Products
    • Bolt
      • Get Started
      • Stake
      • Activity
      • Buy ZCN
      • Sell ZCN
      • Send Tokens
      • Receive Tokens
      • Settings
        • Manage Profile
        • Wallet
        • Read Pool
      • Troubleshooting
    • Vult
      • Sign Up
      • Upload File
      • Upload an Encrypted File
      • Upload a File to a Folder
      • Share a Uploaded File
      • Move a Uploaded File
      • Delete a File
      • Make File Available Offline
      • Troubleshooting
    • Atlus
      • Dashboard Overview
      • Service Providers
      • Charts
        • Market Charts
        • Network Charts
        • Storage Charts
        • Züs Explainer
      • Blockchain
      • Server Map
    • Blimp
      • Sign Up
        • Buy ZCN for Storage
      • Use Blimp as Direct Storage
      • Use Blimp as S3 Server
        • S3 Operations
      • Use Blimp for Cloud Migration
      • Manage Allocations
        • Extend Size
        • Extend Duration
        • Add Blobber
        • Replace Blobber
        • Make allocation Immutable
        • Freeze Allocation
        • Cancel Allocation
    • Chimney
      • Get Started
      • Deploy Blobber on Own Server
      • Deploy Blobber on Rented Server
      • Stake Blobber
      • Add Blobber
      • Monitor Blobbers
      • Visualize Blobber Logs
      • View Blobber Rank
    • Chalk
      • Sign Up
      • Create NFT Collection
        • Buy ZCN for NFT via ERC token
        • Buy ZCN for NFT via Credit card
      • Explore NFT Collections
      • My NFTs
      • Profile
        • Withdraw Earnings
        • Manage Collections
  • Guides
    • Zus GO SDK
    • Zus JS SDK
    • Zbox CLI
      • Repo
      • Get Started
      • Creating and Managing Allocations
      • Uploading and Managing Files
      • Lock and Unlock Tokens
      • Tips and Troubleshooting
    • Zwallet CLI
      • Repo
      • Get Started
      • Zwallet Operations
      • Staking on miners and sharders
      • Burn and Mint Tokens using Zwallet
      • Troubleshooting
    • Add a Blobber
      • Repo
      • Getting Started
    • Add a Miner/Sharder
      • Repo
      • Getting Started
    • Setup a Blockchain
      • Repo
      • Quickstart
        • Understand the Script
      • Step 1: Set up the project
      • Step 2: Setup the network for Züs components
      • Step 3: Initialize and Build the Züs components
      • Step 4: Start Sharder and Miner Containers
      • Step 5 : Create a wallet using zwalletcli
      • Step 6: Starting the blobber containers
      • Step 7: Validate Züs deployment
      • Step 8: Creating an Allocation on Blobber
      • Restarting Sharder and Miner Containers with CleanDB.
      • Additional Tips and Troubleshooting
    • Glossary
  • Support
    • Help Center
      • Community
      • Issues on Github
      • Contact Us
Powered by GitBook
On this page
  • Challenge pool information
  • Create Read Pool
  • Collect rewards
  • Read pool info
  • Lock tokens into read pool
  • Unlock tokens from read pool
  • Storage SC configurations
  • Stake pool info
  • Lock tokens into stake pool
  • Unlock tokens from stake pool
  • Stake pools info of user
  • Write pool info
  • Lock tokens into write pool
  • Unlock tokens from write pool
  1. Guides
  2. Zbox CLI

Lock and Unlock Tokens

PreviousUploading and Managing FilesNextTips and Troubleshooting

Last updated 1 year ago

Challenge pool information

Use cp-info command to get the challenge pool brief information.

Parameter
Required
Description
default
Valid values

allocation

yes

allocation id

string

json

no

print result in json format

false

boolean

Example:

./zbox cp-info --allocation 8695b9e7f986d4a447b64de020ba86f53b3b5e2c442abceb6cd65742702067dc

Response:

POOL ID: 6dba10422e368813802877a85039d3985d96760ed844092319743fb3a76712d7:challengepool:8695b9e7f986d4a447b64de020ba86f53b3b5e2c442abceb6cd65742702067dc
    BALANCE    |             START             |            EXPIRE             | FINIALIZED
+--------------+-------------------------------+-------------------------------+------------+
  0.0000002796 | 2021-04-17 00:27:23 +0700 +07 | 2021-05-24 00:29:23 +0700 +07 | false

Balance is the current challenge pool balance. Start,Expire time and the finalization are allocations related.

Create Read Pool

Use rp-create to create a read pool, rp-create has no parameters.

./zbox rp-create

Collect rewards

Use collect-reward to transfer reward tokens from a stake pool in which you have invested to your wallet.

You earn rewards for: Blobbers

  • File space used by allocation owners and associates.

  • A min lock demand for each allocation.

  • Block rewards. Each block a reward gets paid out to blobber stakeholders in the form of a random lottery. Validators

  • Payment for validating blobber challenge responses.

The stake pool keeps an account for all stakeholders to maintain accrued rewards. These rewards can be accessed using this collect-reward command.

Parameter
Required
Description
default
Valid values

provider_type

no

blobber or validator

blobber

string

./zbox collect-reward --provider_type blobber

Read pool info

Use rp-info to get read pool information.

Parameter
Required
Description
default
Valid values

json

no

print result in json format

false

boolean

./zbox rp-info

Lock tokens into read pool

Lock some tokens in read pool. ReadPool is not linked to specific allocations anymore. Each wallet has a singular, non-expiring, untethered ReadPool. Locked tokens in ReadPool can be unlocked at any time and returned to the original wallet balance.

  • If the user does not have a pre-existing read pool, then the smart-contract creates one.

Locked tokens can be used to pay for read access to file(s) stored with different allocations. To use these tokens the user must be the allocation owner, collaborator or have an auth ticket.

Parameter
Required
Description
default
Valid values

fee

transaction fee

0

int

tokens

yes

tokens to lock

int

./zbox rp-lock --tokens 1

Unlock tokens from read pool

Use rp-unlock to unlock tokens from `read pool by ownership.

Parameter
Required
Description
default
Valid values

fee

no

transaction fee

0

float

Unlocked tokens get returned to the original wallet balance.

Storage SC configurations

Show storage SC configuration.

Parameter
Required
Description
default
Valid values

allocation

yes

allocation id

string

json

no

print result in json format

false

boolean

./zbox sc-config

Stake pool info

Use sp-info to get your stake pool information and settings.

Parameter
Required
Description
default
Valid values

blobber_id

yes

current client

string

json

no

print result in json format

false

boolean

./zbox sp-info --blobber_id <blobber_id>

Lock tokens into stake pool

Lock creates delegate pool for current client and a given provider (blobber or validator). The tokens locked for the provider stake can be unlocked any time, excluding times when the tokens held by opened offers. These tokens will earn rewards depending on the actions of the linked provider.

sp-lock returns the id of the new stake pool, this will be needed to reference to stake pool later.

Parameter
Required
Description
default
Valid values

blobber_id

id of blobber

n/a

string

validator_id

id of validator

n/a

string

fee

no

transaction fee

0

float

tokens

yes

tokens to lock

float

To stake tokens for blobbers:

./zbox sp-lock --blobber_id <blobber_id> --tokens 1.0

To stake tokens for validators:

./zbox sp-lock --validator_id <validator_id> --tokens 1.0

Unlock tokens from stake pool

Unlock a stake pool by pool owner. If the stake pool cannot be unlocked as it would leave insufficient funds for opened offers, then sp-unlock tags the stake pool to be unlocked later. This tag prevents the stake pool affecting blobber allocation for any new allocations.

Parameter
Required
Description
default
Valid values

blobber_id

id of blobber

n/a

string

validator_id

id of validator

n/a

string

fee

no

transaction fee

0

float

To unstake blobber tokens:

./zbox sp-unlock --blobber_id <blobber_id>

To unstake validator tokens:

./zbox sp-unlock --validator_id <validator_id> --pool_id <pool_id>

Stake pools info of user

Get information about all stake pools of current user.

Parameter
Required
Description
default
Valid values

json

no

print result in json format

false

boolean

./zbox sp-user-info

Write pool info

Write pool information. Use allocation id to filter results to a singe allocation.

Parameter
Required
Description
default
Valid values

allocation id

no

allocation id

string

json

no

print result in json format

false

boolean

For all write pools.

./zbox wp-info

Filtering by allocation.

./zbox wp-info --allocation <allocation_id>

Lock tokens into write pool

wp-lock can be used to lock tokens in a write pool associated with an allocation. All tokens will be divided between allocation blobbers depending on their write price.

  • Uses two different formats, you can either define a specific blobber to lock all tokens, or spread across all the allocations blobbers automatically.

  • If the user does not have a pre-existing read pool, then the smart-contract creates one.

Anyone can lock tokens with a write pool attached an allocation. These tokens can be used to pay for the allocation updates and min lock demand as needed. Any tokens moved into the challenge pool to underwrite blobbers' min lock demands return to the allocation's owner on closing the allocation.

Parameter
Required
Description
default
Valid values

allocation id

no

allocation id

string

blobber

no

blobber id

string

duration

yes

duration for which to lock tokens

duration

fee

no

transaction fee

0

float

tokens

yes

number of tokens to lock

float

./zbox wp-lock --allocation <allocation_id> --duration 40m --tokens 1

Unlock tokens from write pool

wp-unlock unlocks an expired write pool. An expired write pool, associated with an allocation, can be locked until allocation finalization even if it's expired. It possible in cases where related blobber doesn't give their min lock demands. The finalization will pay the demand and unlock the pool.

Parameter
Required
Description
default
Valid values

fee

no

transaction fee

0

float

./zbox wp-unlock

id of blobber. Can be retrieved using command.

Lock and Unlock Tokens
Challenge pool information
Create read pool
Collect rewards
Read pool info
Lock tokens into read pool
Unlock tokens from read pool
Storage SC configurations
Stake pool info
Lock tokens into stake pool
Unlock tokens from stake pool
Stake pools info of user
Write pool info
Lock tokens into write pool
Unlock tokens from write pool
List Blobbers