Giter Club home page Giter Club logo

eosio-vpaysplit's Introduction

EOSIO Vote Pay Split

The eosio-vpaysplit contract is for splitting BP vote rewards to multiple parties at the time of claim. It is fully on-chain, transparent, flexible to various situations, and configurable via table data.

Supported use cases when claiming BP rewards

The contract is meant to be installed on a BP account, and can do the following for any number of accounts when claimrewards is called:

  • Pay an account based on percentage of vpay increase and dynamically calculated vote weight of a proxy, automatically detecting and stopping daily payment if proxy unregisters or unvotes the BP.

  • Pay an account based on percentage of vpay increase and fixed vote weight.

Configuring

Adding or updating payments

Below are examples for setting up payments to some of the common EOS rewards proxies. Keep in mind the example percentages may not be perfect as the numbers to calculate rewards can fluctuate throughout the day. It's best to keep an eye on your balances with these proxies and adjust the percentages if needed.

Example to setup payments for Colin Talks Crypto Rewards Proxy:

cleos push action BPACCOUNT setbuyer '{"account":"genereospool","vote_eos":"0.0000 EOS","vote_proxy":"colinrewards","percent":82,"memo":"BPACCOUNT"}' -p BPACCOUNT

Example to setup payments for Value Proxy:

cleos push action BPACCOUNT setbuyer '{"account":"voteforvalue","vote_eos":"0.0000 EOS","vote_proxy":"voteforvalue","percent":90,"memo":""}' -p BPACCOUNT

Example to setup payments for EOSDT Proxy:

cleos push action BPACCOUNT setbuyer '{"account":"eosdtgovernc","vote_eos":"0.0000 EOS","vote_proxy":"eosdtbpproxy","percent":85,"memo":"bp_deposit:BPACCOUNT"}' -p BPACCOUNT

Example to setup payments to "someaccount" without a specific proxy, but who votes with 10M EOS and requires 50% of the vpay increase:

cleos push action BPACCOUNT setbuyer '{"account":"someaccount","vote_eos":"10000000.0000 EOS","vote_proxy":"","percent":50,"memo":"hello there!"}' -p BPACCOUNT

Removing payments

Example to remove payment to "someaccount":

cleos push action BPACCOUNT removebuyer '{"account":"someaccount"}' -p BPACCOUNT

Building and deploying

Dependencies

Build

cd eosio-vpaysplit
EOSIO_CONTRACTS_PATH=/path/to/eosio.contracts ./build.sh

Deploy

cd eosio-vpaysplit
cleos set contract BPACCOUNT ./build vpaysplit.wasm vpaysplit.abi -p BPACCOUNT
cleos set account permission BPACCOUNT active --add-code

Running

Just run claimrewards as usual. The contract will fire when a transfer is sent from eosio.vpay to your BP account.

eosio-vpaysplit's People

Contributors

n8d avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.