Author Topic: Bitshares Core- Creating a Vesting / Staking operation  (Read 1950 times)

0 Members and 1 Guest are viewing this topic.

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Yes .. any asset can be used for "vesting" ...

Code: [Select]
get_prototype_operation vesting_balance_create_operation
[
  32,{
    "fee": {
      "amount": 0,
      "asset_id": "1.3.0"
    },
    "creator": "1.2.0",                                                                           
    "owner": "1.2.0",                                                                             
    "amount": {                                                                                   
      "amount": 0,                                                                                 
      "asset_id": "1.3.0"                                                                         
    },                                                                                             
    "policy": [                                                                                   
      0,{                                                                                         
        "begin_timestamp": "1970-01-01T00:00:00",                                                                     
        "vesting_cliff_seconds": 0,                                                                                   
        "vesting_duration_seconds": 0                                                                                 
      }                                                                                                               
    ]                                                                                                                 
  }                                                                                                                   

the policy 0 is cliff vesting which allows to claim vested stake after the duration .. not sure what cliff_seconds is ..

Offline Voyager_8

  • Newbie
  • *
  • Posts: 11
    • View Profile
So looking at the docs here: https://bitshares.org/doxygen/group__operations.html there is an operation defined here:

graphene::chain::vesting_balance_create_operation

It doesnt specify if this can be used on any Bitshares asset however? Is it possible to stake any UIA via this operation? I assume this is how Cryptobridge are staking BCO?

Thanks