Launching Proposals on SPORTS

in Sports Talk Social3 years ago (edited)
account = "sports-gov"

nodelist = NodeList()
nodelist.update_nodes()
nodes = nodelist.get_nodes(hive=True)
hive = Hive(node=nodes)


def transfer_token(to, amount, symbol, memo, account):
    he_wallet = Wallet(account, blockchain_instance=hive)
    transfer_tx = he_wallet.transfer(to, amount, symbol, memo)
    time.sleep(1)
    c = Comment(loaded_post, steem_instance=hive)
    c.reply(str(transfer_tx), "stake_tx", account)


transfer_token("sportsprojects", 1, "SPORTS", "Please fund this account with 24,960,203 SPORTS and send 3,952,615 SPORTS to @patrickulrich.", account)

!end

We are very happy to announce that we've prepared a partnership with the ARCHON tribe to deploy their governance layerware for the SPORTS ecosystem. Pending the approval of this proposal, we will be able to operate our community without relying on any one individual's sole decision making and instead use our shared consensus to run and grow the community through the use of governance proposals.

image.png

Anyone will be able to propose 'code snippets' (as seen above) via a SportsTalkSocial.com post that, once approved by stakeholder vote, will be activated and ran by the @sports-gov account. These snippets can run anything from Hive Engine token transfers to witness votes for community held accounts. This will open the opportunities for what we can do to the imagination of our community. You can learn more about the originally developed system by reading @taskmanager's code snippet release.


How proposals works

I was preparing a guide for how to interact with the different code snippets that are available but @archonapp already published a great guide that I've used below and replaced their snippets relating to ARCHON with SPORTS. You can view their original publication here.

sportstalkbreak.png

HEADER CODE

account = "sports-gov"


nodelist = NodeList()
nodelist.update_nodes()
nodes = nodelist.get_nodes(hive=True)
hive = Hive(node=nodes)

Code Snippet Functions

1-2: Sell/Buy Hive-Engine Token

def sell_token(symbol, amount, price, account):
    he_market = Market(blockchain_instance=hive)
    market_trans = he_market.sell(account, amount, symbol, price)
    c = Comment(loaded_post, steem_instance=hive)
    c.reply(str(market_trans), "market_tx", account)


def buy_token(symbol, amount, price, account):
    he_market = Market(blockchain_instance=hive)
    market_trans = he_market.buy(account, amount, symbol, price)
    c = Comment(loaded_post, steem_instance=hive)
    c.reply(str(market_trans), "market_tx", account)

With these definitions, you can instruct the proposal (if approved) to buy or sell any token on hive-engine. Check the wallet first. Selling tokens that aren't there or buying an amount that there isn't swap.hive for will result in failure.

After defining, you can command:

sell_token("SPORTS", 250.00, 0.45, account)
time.sleep(30)
sell_token("ARCHON", 1.00, 3.333, account)
time.sleep(30)
sell_token("ASH", 225.00, 0.00495, account)
time.sleep(30)
buy_token("PAL", 500, 0.285, account)
time.sleep(30)

All code snippets must end with ``` and then !end


image.png

3-4: Power up HIVE, Power down HIVE.

def power_up_hive(to, amount, account):
    hive_account = Account(account, blockchain_instance=hive)    
    hive_power_tx = hive_account.transfer_to_vesting(amount, to, account)
    time.sleep(4)
    c = Comment(loaded_post, steem_instance=hive)
    c.reply(str(hive_power_tx), "hive_tx", account)


def power_down_hive(amount, account):
    hive_account = Account(account, blockchain_instance=hive)
    h_v = hive.token_power_to_vests(amount)
    hive_power_tx = hive_account.withdraw_vesting(h_v, account)
    time.sleep(4)
    c = Comment(loaded_post, steem_instance=hive)
    c.reply(str(hive_power_tx), "hive_tx", account)

power_down_hive(1, account)
time.sleep(30)
power_up_hive("sports-gov", 1, account)
time.sleep(30)
power_up_hive("sportstalksocial", 0.1, account)

5-6: Stake/Unstake Hive-Engine Token

def stake_token(amount, symbol, account):
    he_wallet = Wallet(account, blockchain_instance=hive)
    stake_trans = he_wallet.stake(amount=amount, symbol=symbol, receiver=account)
    time.sleep(1)
    c = Comment(loaded_post, steem_instance=hive)
    c.reply(str(stake_trans), "stake_tx", account)


def unstake_token(amount, symbol, account):
    he_wallet = Wallet(account, blockchain_instance=hive)
    unstake_trans = he_wallet.unstake(amount=amount, symbol=symbol)
    time.sleep(1)
    c = Comment(loaded_post, steem_instance=hive)
    c.reply(str(unstake_trans), "stake_tx", account)

7-8: Send HIVE or HIVE-ENGINE token to account

def transfer_hive(to, amount, asset, memo, account):
    hive_account = Account(account, blockchain_instance=hive)
    hive_tx = hive_account.transfer(to, amount, asset, memo, account)
    time.sleep(4)
    c = Comment(loaded_post, steem_instance=hive)
    c.reply(str(hive_tx), "hive_tx", account)

def transfer_token(to, amount, symbol, memo, account):
    he_wallet = Wallet(account, blockchain_instance=hive)
    transfer_tx = he_wallet.transfer(to, amount, symbol, memo)
    time.sleep(1)
    c = Comment(loaded_post, steem_instance=hive)
    c.reply(str(transfer_tx), "stake_tx", account)

transfer_hive("mydemouser", 5, "HIVE", "Your demo memo", account)
time.sleep(1)
transfer_token("mydemouser", 10, "SPORTS", "Your demo memo", account)

9-10 APPROVE or UNAPPROVE witness

def approve_witnesses(witness, account):
    hive_account = Account(account, blockchain_instance=hive)
    witness_tx = hive_account.approvewitness(witness, account)
    time.sleep(4)
    c = Comment(loaded_post, steem_instance=hive)
    c.reply(str(witness_tx), "witness_tx", account)


def remove_witnesses(witness, account):
    hive_account = Account(account, blockchain_instance=hive)
    witness_tx = hive_account.disapprovewitness(witness, account)
    time.sleep(4)
    c = Comment(loaded_post, steem_instance=hive)
    c.reply(str(witness_tx), "witness_tx", account)


approve_witnesses("blocktrades", account)
time.sleep(30)
remove_witnesses("jerrybanfield", account)

Again, all code snippets must end with ``` and then !end


image.png

sportstalkbreak.png

Proposal Requirements

The code above will be needed to work within Proposals on the SPORTS Petition and Proposal System. The following requirements also apply:

#sportstalk tag to post to the tribe

#sportsgov tag to showcase it's a governance post

#sportsproposal tag to make it a proposal

100,000 SPORTS sent to @sports-gov with your post URL as a memo

AND

#hive-py tag to pick up the code snippets

sportstalkbreak.png

Voting for Proposals

Any user can make a proposal even if they are not a SPORTS tribe member. @sports-gov will show up some time after posting to leave 2 comments, 'YES' and 'NO' once it locates a SPORTS transfer.

image.png


image.png

As the comment indicates, all SPORTS stakeholders can vote on these comments (with any %) to indicate their support for either the YES or the NO, whether they want the proposal to pass and the code to execute, or whether they want the NO conditions to go forward. There is a third option, and that is neither - if neither yes or no get 50% of the votes, neither YES nor NO will win.

The SPORTS Governance Power of each member is based on their SPORTS stake. You can request the governance power of any account or check out the top accounts by visiting #sports-governance in the SportsTalkSocial Discord

sportstalkbreak.png

How petitions works

Petitions are a simplified version of proposals. They don't have to have a code function and are not binding to any form of action. They are instead a way for users to make their will known.

The idea would be that if you wanted to find out if there was support for some kind of action without spending 100,000 SPORTS on a proposal you can issue a petition to see if the community was interested in moving in that direction. If you found positive support you'll be better prepared to issue a proposal or maybe find someone to cover your proposal's fee.

sportstalkbreak.png

Petition Requirements

The code above will be needed to work within Proposals on the SPORTS Petition and Proposal System. The following requirements also apply:

#sportstalk tag to post to the tribe

#sportsgov tag to showcase it's a governance post

#sportspetitions tag to make it a petition

1 SPORTS sent to @sports-gov with your post URL as a memo

sportstalkbreak.png


This Proposal

account = "sports-gov"

nodelist = NodeList()
nodelist.update_nodes()
nodes = nodelist.get_nodes(hive=True)
hive = Hive(node=nodes)


def transfer_token(to, amount, symbol, memo, account):
    he_wallet = Wallet(account, blockchain_instance=hive)
    transfer_tx = he_wallet.transfer(to, amount, symbol, memo)
    time.sleep(1)
    c = Comment(loaded_post, steem_instance=hive)
    c.reply(str(transfer_tx), "stake_tx", account)


transfer_token("sportsprojects", 1, "SPORTS", "Please fund this account with 24,960,203 SPORTS and send 3,952,615 SPORTS to @patrickulrich.", account)

Summary

You may have noticed that this post started with a set of code. That's because this announcement post is also a proposal that will be parsed by the ARCHON system to launch the project. If stakeholders approve this proposal it will send 1 SPORTS from the @sports-gov account to @sportsprojects with a memo requesting funding. The SPORTS requested are 24,960,203 to be sent to @sports-gov and 3,952,615 to be sent to @patrickulrich.

The Costs

These combined amounts (28,912,818 SPORTS) equate to a 2% increase in the current circulating supply of SPORTS that are available as per our site's record while this post was being prepared. The SPORTS held in @sports-gov will be available for funding future proposals from anyone in the community.

image.png

The 3,952,615 to be sent to @patrickulrich equate to the current market value of 2,500 ARCHON along with 100,000 SPORTS as a reimbursement for funding this proposal's fee. This is derived by taking the current Hive value of 2,500 ARCHON (736.62) and finding the current value at our current market rate of SPORTS (3,852,615).

image.png

image.png

Benefits To SPORTS

This will allow the community to make decisions via the proposal system. This may be on things as simple as what to do with post rewards for community accounts but it will also act as a way to disperse SPORTS to users who are making contributions towards growing the project via the request for @sportsprojects to unlock 2% of the circulating supply amount of SPORTS held there. These acts of funding will reward users for anything their imagination can dream up that will be of value to the stakeholders of the community.

Additionally @sports-gov's account has given posting permission to @rewarding. This will allow it to follow the votes issued by @sportstalksocial at 100%. This will mean that any of the posts that get curated via the daily curation report will also get a vote from the 2,500 ARCHON stake held in this account. This will add to the earning value of being one of the top posts in any of our monitored sports and thus should result in more content being created for the site.

How to Vote

@sports-gov will reply to this post with two comments. If you'd like to see this proposal pass then upvote the YES comment with any % upvote.

image.png

We hope you will consider voting yes to activate this proposal.

sportstalkbreak.png

SportsTalk.png | dTube.png | Discord.png | Twitter.png | Facebook.png | StateoftheDapps.png

Sort:  

YES

Upvote here to support the proposal, any % upvote will trigger 100% GP support.
All rewards from this comment go to the governance fund

Voted.

I'm so happy to see everyone on this table together

Voted

Later edit: this is my main account, but the vote goes from @erikahfit.
Let me know if it's not considered valid, so I can vote again. Sorry for the mixup.

It doesn't look like it was picked up. I don't see you listed on the Discord bot.

Ok, voting from my alt now, where the stake is.

Loading...
Loading...

SPORTS is one of the reasons I'm back and active on Hive. I hope things change for good.

It will . This post will be a game changer for SPORTS.

!WINE


Cheers, @sifondeseltz You Successfully Shared 0.100 WINE With @sportstalksocial.
You Earned 0.100 WINE As Curation Reward.
You Utilized 3/3 Successful Calls.

wine-greeting


WINE Current Market Price : 1.000 HIVE

NO

Upvote here to STOP the proposal, any % upvote will trigger 100% GP support.
All rewards from this comment go to the governance fund

@ptaku, to cię powinno zainteresować, nie wiem czy głosowałeś

Dzięki za info. Muszę poczytać. A Ty co sądzisz?

Zagłosowałem na tak. Zawsze to coś ciekawego się będzie dziać. Teoretycznie użytkownicy będą mieć więcej do powiedzenia

Very good
Go for more sports

Voted!

Hey just want to remind you of that we have a proposal now about the new ad-program on STS here:
https://www.sportstalksocial.com/hive-101690/@patrickulrich/proposal-for-advertising-changes

Hope you want to contribute by voting here =)