The SteemSTEM script for returning the curation rewards to the delegators is now public
utopian-io·@lemouth-dev·
0.000 HBDThe SteemSTEM script for returning the curation rewards to the delegators is now public
<div class='text-justify'> As a consequence of a request made by several people, I share below information about the python script used by @steemstem to **automatically** return, week after week, a fraction of the curation rewards to our delegators. <div class="pull-left"> <center><img style="padding:15px" width="90%" src="https://i.postimg.cc/TwG0vzht/ssio.png"> </center> </div> The source file of the script is available on [**this github repository**](https://github.com/BFuks/steemstem_delegator_return/). The script runs on Python version 3 and only requires the [**beem library**](https://github.com/holgern/beem). ___ ## <center><b> Inputs </b></center> ___ On startup (after executing the script in a shell), the user is first requested to provide the **private active key** of the account that will pay the delegators. Let's call this account *X* below. Second, the **Steem account for which the delegation operations must be tracked** needs to be given, as well as **the percentage of the curation rewards** to be returned to the delegators. Let's call this account *Y* below. Finally, the **number of days** (from the present moment) during which the curation rewards must be collected has to be provided. ___ ## <center><b> Algorithm </b></center> ___ The scripts begins with getting the list of delegation operations related to the account *Y* from its creation. For each operation: - If the operation concerns a new delegator, the delegated VESTS are stored in a dictionary with the name of the delegator's Steem account. If the moment at which the delegation occurred is within the curation reward period under consideration, the delegation strength is weighted accordingly to the time it was effective. - If the operation concerns an already stored delegator and it turns out that the delegation has been reduced, the stored delegation strength is updated to the new value. - If the operation concerns an already stored delegator and it turns out that the delegation has been increased, the stored delegation strength is updated. If the moment at which the delegation has been updated is within the curation reward period under consideration, the extra delegation strength is weighted accordingly to the time it was effective (and only the extra VESTS are weighted). The curation rewards related to the considered period are then extracted and their specified fraction is returned to the delegators proportionally to their delegated stakes. The payments are done from the account *X*. ___ <sub>Make sure to follow steemstem on [**steemstem.io**](https://www.steemstem.io/#!/@steemstem), [**steemit**](https://steemit.com/@steemstem), [**facebook**](https://www.facebook.com/OfficialsteemSTEM/), [**twitter**](https://twitter.com/steemstem_), and [**instagram**](https://www.instagram.com/steemstem/) to always be up-to-date on our latest news and ideas. Please also consider to support the project by **delegating to @steemstem** for a ROI of 65% of our curation rewards (quick delegation links: [50SP](https://steemconnect.com/sign/delegateVestingShares?delegator=&delegatee=steemstem&vesting_shares=50%20SP) | [100SP](https://steemconnect.com/sign/delegateVestingShares?delegator=&delegatee=steemstem&vesting_shares=100%20SP) | [500SP](https://steemconnect.com/sign/delegateVestingShares?delegator=&delegatee=steemstem&vesting_shares=500%20SP) | [1000SP](https://steemconnect.com/sign/delegateVestingShares?delegator=&delegatee=steemstem&vesting_shares=1000%20SP) | [5000SP](https://steemconnect.com/sign/delegateVestingShares?delegator=&delegatee=steemstem&vesting_shares=5000%20SP) | [10000SP](https://steemconnect.com/sign/delegateVestingShares?delegator=&delegatee=steemstem&vesting_shares=10000%20SP)).</sub> </div>
👍 lemouth-dev, vitasoy, shammi, pagliozzo, amosbastian, saunter, jaff8, ctime, codingdefined, tobias-g, lemouth, robotics101, phage93, mcfarhat, lesmouths-travel, scipio, drsensor, hitsug, alexs1320, conradsuperb, dylanhobalart, voronoi, miniature-tiger, justtryme90, dna-polymerase, dna-ligase, dna-helicase, dna-primase, sliding-clamp, clamp-loader, dna-gyrase, rna-polymerase, ribosome, jtm.support, greenorange, nonzerosum, pozyton, lordneroo, curbot, dwolfe, howo, reinaseq, bachuslib, katerinaramm, tychoxi, someaddons, cpufronz, espoem, mops2e, steem-ua, newsrx, irelandscape, borislavzlatanov, stemq, etcmike, dexterdev, magicmonk, utopian-io, jga, geekpowered, mgranja, thepe, steemstem, alexzicky, suesa, praditya, erikkun28, aalok, emmanuel293, kingnosa, huilco, steemmyphoto, traviseric, alexworld, amin-ove, gammagooblin, kevinwong, fancybrothers, tanyaschutte, felixrodriguez, enzor, tristan-muller, fejiro, sco, adetola, rharphelle, jlmol7, rionpistorius, heajin, kingabesh, ajpacheco1610, lianaakobian, anyes2013, effofex, count-antonio, de-stem, ari16, temitayo-pelumi, beautyinscience, helo, alexander.alexis, ludmila.kyriakou, esteemguy, nicola71, tfcoates, eleonardo, shoganaii, terrylovejoy, olajidekehinde, mondodidave73, flugschwein, michaelwrites, marcuz, ibk-gabriel, osakuni, purelyscience, mitaenda, osariemen, scottallen, herbayomi, swapsteem, bloom, kryzsec, samminator, tsoldovieri, abigail-dantes, gra, kenadis, maticpecovnik, real2josh, alexdory, dedesuryani, synick, reyvaj, walisongo, jrevilla, regularowl, mr-aaron, fbslo, mathowl, francostem, derbesserwisser, greatwarrior79, deholt, javier.dejuan, stem.witness, arconite, mountain.phil28, nurhayati, monie, jaycem, doctor-cog-diss, steemzeiger, biomimi, funster, walexworld, testomilian, allhailfish, tombstone, corsica, zonguin, kingswisdom, irishcoffee, darkiche, dragibusss, galam, lafona-miner, curation.trail, serylt, fanta-steem, dbddv01, supposer, zest, communityisyou, stem-espanol, emiliomoron, ulisesfl17, majapesi, ubaldonet, lupafilotaxia, lorenzor, iamphysical, azulear, carloserp-2000, amestyj, ivymalifred, yrmaleza, miguelangel2801, bearded-benjamin, arac, tomastonyperez, elvigia, luiscd8a, geadriana, elpdl, josedelacruz, viannis, yusvelasquez, jesusfl17, mary11, fran.frey, alfonzoasdrubal, xeliram, giulyfarci52, wilmer14molina, alaiza, lapp, steemtpistia, crassipes, agrovision, psicoluigi, flores39, medicnet, mahdiyari, lamouthe, eniolw, ozgurcinarli, strefanetu, damzxyno, lacher-prise, gribouille, robertbira, eurogee, acont, egotheist, langford, steepup, wargof, guga34, forestplane, ennyta, anaestrada12, tensor, grzesiekb, ixindamix, akarantain,