(Image source: http://tse2.mm.bing.net/th?id=OIP.3ILZkqGQVJMKTI3NFkZWhwEsDH&pid=15.1)
About delegate vesting shares (SP delegation)
As we know, there is a new featured function called SP delegation
after HF 0.18 of steem.
There are two characters in this scenario:
delegator
: The account delegating vesting sharesdelegatee
: The account receiving vesting shares
And one asset need to be dispose:
vesting_shares
: The amount of vesting shares delegated
The vesting shares are still owned by the original account, but content voting rights and bandwidth allocation are transferred to the receiving account.
Howto & Scripts
Fortunately, the official STEEM library for Python
already added the supported to SP delegation
(Note: To install Python STEEM library, you can refer my previous post:
How to claim(redeem) your rewards(Curation and Author rewards) automatically (Multiple accounts supported) by @chinadaily)
The function named: delegate_vesting_shares
which located at steem-python/steem/commit.py
Here is some info copied from that file:
def delegate_vesting_shares(self, to_account: str, vesting_shares: str, account=None):
""" Delegate SP to another account.
Args:
to_account (string): Account we are delegating shares to (delegatee).
vesting_shares (string): Amount of VESTS to delegate eg. `10000 VESTS`.
account (string): The source account (delegator). If not specified, ``default_account`` is used.
"""
For example:
I can easily delegating 10000 vesting_shares to user1 by following simple script.
from steem import Steem
steem = Steem()
steem.delegate_vesting_shares('user1', '10000 VESTS', chinadaily)
To removes the delegation is really easy too, Just delegate 0
vesting_shares to delegatee
!
For example:
from steem import Steem
steem = Steem()
steem.delegate_vesting_shares('user1', '0 VESTS', chinadaily)
Improvement
Using vesting_shares directly in our script is not intuitive.
I think the it would be better if we can use steem power to substitute for vesting_shares.
The following improved script delegate 10
STEEM POWER from chinadaily
to user1
!
from steem import Steem
from steem.converter import Converter
steem = Steem()
sp = 10
vests = '{} VESTS'.format(Converter().sp_to_vests(sp))
steem.delegate_vesting_shares('user1', vests, chinadaily)
Supplementary
Minimum VESTS to delegate
As I writing this article, the minimum VESTS to delegate is 13813.576743 VESTS
If you operate VESTS less than it, you will get an error such as:
Account must delegate a minimum of 13813.576743 VESTS
It about 7 STEEM POWER at this time.
I'm not sure how the value is calculated and if it will be changed.
But delegating more than 10 STEEM POWER should be well.
Locked in limbo after cancel
When a delegation is removed the shares are placed in limbo for a week to prevent a satoshi of VESTS from voting on the same content twice.
So, if you delegation 1000 STEEM POWER to another user, then cancel it immediately, and repeat the same operation 100 times, then you will get 100000 STEEM POWER lock in limbo for a week.
Unreasonable? I think so, but this is a fact, So please be careful operation.
That's all, Thank you.
© @chinadaily