STEEM POWER retention ratio of top 50 witnesses

by joviansummer original STEEMIT post: https://steemit.com/blog/@joviansummer/steem-power-retention-ratio-of-top-50-witnesses Hello, this is @joviansummer(witness: @jswit). Some time ago there was a bit of discussion on discord witness chanel about witnesses' power-down/cashing-out. So out of curiosity I just checked current ratio of witnesses' own STEEM POWER(VESTS) and all-time producer reward(VESTS). The ratio is calculated by the following simple formula: ratio(%) = account's own SP(MV) / all-time producer reward SP(MV) * 100% Ratio value less than 100% indicates power-down. If witness does additional power-up or gets other types of reward(e.g., curation reward), the ratio may exceed 100%. This does not take witness' other accounts into consideration. All-time producer reward data is from @steemchiller's SDS API. Here is the result: rank account own_sp prod_sp ratio 1 justyy 2188.411MV 1284.2MV 170.41% 2 steemchiller 982.134MV 124...

파이썬(steem-python)에서 현재의 보팅 파워 계산

by joviansummer
original STEEMIT post: https://steemit.com/blog/@joviansummer/steem-python


steem-python으로 현재의 SBD 보유량과 보팅 파워(voting power)를 계산하는 예시를 잘 정리해 둔 글이 있어서 메모해 둡니다.

@numberjocky - How to Retrieve Steem and SBD Balance and Voting Power of Your Account Using Python https://steemit.com/steemit/@numberjocky/how-to-retrieve-steem-and-sbd-balance-and-voting-power-of-your-account-using-python

현재의 보팅 파워를 구하는 코드는 아래와 같이 작성해 볼 수 있겠습니다. 마지막으로 보팅을 했던 시간과 현재 시간의 차이, 그리고 마지막으로 보팅했던 시점의 보팅 파워를 이용해서 계산이 이루어집니다. 시간은 UTC(GMT) 기준입니다.

import datetime
from steem import Steem

# 대상 ID: joviansummer
steem_id = 'joviansummer'

s = Steem()
user_acc = s.get_account(steem_id)

# 현재 시간(UTC)
time_now = datetime.datetime.utcnow()
# 마지막으로 보팅한 시점의 보팅 파워
v_power_last = user_acc['voting_power']/100
# 마지막으로 보팅한 시간
last_v_time = datetime.datetime.strptime(user_acc['last_vote_time'], '%Y-%m-%dT%H:%M:%S')
# 시간차 계산
time_delta = time_now - last_v_time
# 보팅 파워 계산
v_power_now = time_delta.seconds * 20/86400 + v_power_last

# 계산값이 100보다 클 경우 100으로 설정
if v_power_now > 100:
    v_power_now = 100

print("보팅 파워: ", v_power_now, "%")

steem-python에 관한 정보는 아래의 링크에 있습니다.

steem-python https://steem.readthedocs.io/en/latest/index.html

Comments

Popular posts from this blog

스티미언의 영향력 지수 계산

jsup/avle code update - you don't have to write post everyday

jsup/avle 보팅 코드 갱신 - 1일1포스팅 강박에서 벗어나기