Dr. Otto: Vote Bidding Bot

in radiator •  7 years ago 

drotto

Dr. Otto is a voting bot that accepts payments for votes.




The default is that Dr. Otto will only vote in 10 batches a day. Multiple users can bid in a voting batch. If only one person bids, they get the entire upvote. If two people bid an equal amount, they share the vote 50/50. The higher the bid, the higher percentage for the upcoming vote batch.

The bot operator can set any vote weight for the batch, which will affect the number of daily votes to bid on. Therefore, each day per batch has:

VotesPercentageTimeframeBlocks
10100 %every 2.4 hours2,880
2050 %every 1.2 hours1,440
4025 %every 36 minutes720
8012.5 %every 18 minutes360
1606.25 %every 9 minutes180
3203.13 %every 270 seconds90

Example A

If you set the bot to vote at 100.00%, bids open every 2.4 hours. Alice and Bob both bid for in the same voting batch. If Alice bids 4 SBD and Bob bids 2 SBD, Alice will get a 66.66% upvote and Bob will get a 33.33% upvote.

Example B

If you set the bot to vote at 3.13%, bids open every 270 seconds. Alice and Bob both bid for in the same voting batch. If Alice bids 4 SBD and Bob bids 2 SBD, Alice will get a 2.09% upvote and Bob will get a 1.04% upvote.

Usage Rules:

  1. If there are multiple bids with the same post, only one vote will be cast and the remaining bids will not be returned.
  2. If the bot has already voted for a post, additional bids will not be returned.
  3. The URL must be correctly expressed in the memo alone. Malformed memos will not be returned.

Install

To use this Radiator bot:

Linux
$ sudo apt-get update
$ sudo apt-get install ruby-full git openssl libssl1.0.0 libssl-dev
$ sudo apt-get upgrade
$ gem install bundler
macOS
$ gem install bundler

I've tested it on various versions of ruby. The oldest one I got it to work was:

ruby 2.0.0p645 (2015-04-13 revision 50299) [x86_64-darwin14.4.0]

First, clone this git and install the dependencies:

$ git clone https://github.com/inertia186/drotto.git
$ cd drotto
$ bundle install
Configure

Edit the config.yml file.

:drotto:
  :block_mode: irreversible
  :account_name: <voting account name here>
  :posting_wif: <posting wif here>
  :active_wif: <active wif here>
  :batch_vote_weight: 100.00 %
  :minimum_bid: 2.000 SBD

:chain_options:
  :chain: steem
  :url: https://steemd.steemit.com

Edit the support/confirm.md template, used to reply to the post when voting.

This ${content_type} has received a ${vote_weight_percent} % ${vote_type} from @${account_name} thanks to @${from}.
Run Mode

Then run it:

$ rake run

Dr. Otto will now do it's thing. Check here to see an updated version of this bot:

https://github.com/inertia186/drotto

Bounce Mode

Dr. Otto is designed to only vote in such a way that it will never run out of voting power. Ideally, you should never need to shut down for breaks in order to recharge. However, if it's ever time for Dr. Otto to take a break for some other reason, bounce will return transfers to accounts instead of voting.

For your own safety, it is recommended that you transfer your funds out of your wallet before running this mode.

Dr. Otto will now return the funds as they arrive in the wallet. You can also just use bounce_once to have Dr. Otto make a single pass rather than loop forever until signaled (^C).

$ rake bounce_once

Both bounce modes accept a limit value as argument, which is especially useful for bounce_once. The default limit is to go back 200 transactions in the history. You can set up to 10000, if you need to go back further for some reason.

$ rake bounce_once[10000]
Report Mode

Same as bounce_once but only for reporting without doing the transfers.

$ rake report

Also accepts a limit argument.

$ rake report[10000]

Upgrade

Typically, you can upgrade to the latest version by this command, from the original directory you cloned into:

$ git pull

Usually, this works fine as long as you haven't modified anything. If you get an error, try this:

$ git stash --all
$ git pull --rebase
$ git stash pop

If you're still having problems, I suggest starting a new clone.


Troubleshooting

Problem: Everything looks ok, but every time Dr. Otto tries to vote, I get this error:
Unable to vote with <account>.  Invalid version
Solution: You're trying to vote with an invalid key.

Make sure the .yml file contains the correct voting key and account name (social is just for testing).

Problem: The node I'm using is down.

Is there a list of nodes?

Solution: Yes, special thanks to @ripplerm.

https://ripplerm.github.io/steem-servers/


Tests

  • Clone the client repository into a directory of your choice:
    • git clone https://github.com/inertia186/drotto.git
  • Navigate into the new folder
    • cd drotto
  • Basic tests can be invoked as follows:
    • rake
  • To run tests with parallelization and local code coverage:
    • HELL_ENABLED=true rake

Get in touch!

If you're using Dr. Otto, I'd love to hear from you. Drop me a line and tell me what you think! I'm @inertia on STEEM and Discord.

License

I don't believe in intellectual "property". If you do, consider Dr. Otto as licensed under a Creative Commons CC0 License.

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

This is amazing. Thank you so much @inertia! I think you are the best developer on steemit and a genuine great @SteemSpeak guy. I am thrilled to start working with this script later tonight when I get powered up.

I second that! @inertia is an Honorable and well respected developer who have delivered a long list of extremely useful tools for the community. An amazing person and a trustworthy person of high intelligence. Great product again Sir. Radiator, Made in the U.S.A! This is absolutely amazing!

I got enthusiasm in my heart, question marks on my brain? but surey I am appreciating. Could you please elaborate this below point

Usage Rules:
If there are multiple bids with the same post, only one vote will be cast and the remaining bids will not be returned

Question: So is it mean that we won't get back our STEEMs in this scenario?

Absolutely amazing no dought!

@fyrstikken If you approve I approve :) I see him in the chat all the time. He is definitely an great asset to steemit and his intelligence speaks for it self through his work and passion here. Take care and have a great weekend

Thanks very good post !!!!

Awesome Work!

Keep it up!!!

@cryptoinvestinfo

your CryptoInvestmentExpert

hmm, brilliant

Hello, sorry for enter here to ask, but i saw that you know more about it theme, i like to program but i can't understand very well how or where this work could be made, could you give me a recomendation about where i can start to learn?, thanks for your help

Can you set the minimum bid below 2 SBD?

Yes, you can set it to 0.001. It should work for STEEM as well. But to accept both at the same time, you should run two instances. I haven't tested that yet, though.

Right now, I recommend only accepting SBD.

Great coding! Keep the hard work up!

And thanks for making Steemit grow :D

now is this the new steemit, bots voting for people?

This is my take on implementing a @randowhale bot.

is this @randowhale really gonna be worth it? I mean it just looks to me like a an opportunity for uncreative people seeking to just make some sleazy dollars..., this trend will make many not mind if there articles are worth an upvote... Just my thought though

A a minnow who spends a great deal of time and effort on my posts, I appreciate the opportunity to trade 2 SBD for an upvote worth more than that. I think the best I ever came out was a 6 SBD profit.

I don't see how it's any more incentive to shitty posting than the ability of someone to throw money at Steem and buy weight on the platform. At least randowhale is accessible to those of us who don't have thousands of dollars to go that route.

  ·  7 years ago (edited)

yeah, what a bad idea, i hope people wont follow this or steemit will lose many of its interesting aspect. IF you can pay to have upvote, so you can post something with zero contents and get money out of it

Well, the top comment has itself made $180 w/ only 5 votes sooooo if that's not a good indicator of the caliber of user this bot is ACTUALLY designed to benefit then idk what does.

Someone who alreadys has a lot SP....

I'm testing here, but I'm having a error, '
"Voting for eliel/mylink with a coefficnent of NaN."
rake aborted!
FloatDomainError: NaN
'

I just made some fixes. Do: git pull to try it.

I pointed a copy of drotto at that account. I think it will work if you upgrade:

{ :INF => "Looking for new bids starting at block 13290913 and (current time: 2017-07-01 04:22:39 UTC) ..." }
{ :INF => "Last block in this timeframe is: 13292353 (1440 blocks)." }
{ :INF => "Bid from eliel for 0.001 SBD." }
{ :INF => "Bid from eliel for 0.001 SBD." }
{ :INF => "Bid from eliel for 0.001 SBD." }
{ :INF => "Bid from eliel for 0.005 SBD." }
{ :INF => "Bid from eliel for 0.001 SBD." }
{ :INF => "Bid from eliel for 0.001 SBD." }
{ :INF => "Bids collected.  Ready to vote.  Processing bids: 6" }
{ :DBG => "Total: 0.010000000000000002; amount: 0.008" }
{ :DBG => "Voting for eliel/meet-the-new-project-of-elon-musk-neuralink with a coefficnent of 0.7999999999999998." }
{ :DBG => "Total: 0.010000000000000002; amount: 0.002" }
{ :INF => "Bidding closed for current timeframe at block 13292353, took 274 seconds to run." }
{ :DBG => "Voting for eliel/do-not-be-afraid-of-new-technology-they-will-help-humanity with a coefficnent of 0.19999999999999996." }
{ :ERR => "Failed vote: Check posting key." }
{ :ERR => "Failed vote: Check posting key." }

Ignore the final two error lines. That's just because I don't actually have the keys to vote. My guess is that the amounts were too small for the previous version to handle. Get on the latest version and you should be good to go.

Thank you, now it worked.

@inertia where i put all these commands kindly can you guide from 1st step as a nursery student

Very interesting idea. I might actually try this!

For sure my question will appear really idiot for some steemians here, but I need to ask :D : how do I use this bot on Windows please? Because I see the code for linux and Mac OS but not for windows huhu.

This post received a 3.1% upvote from @randowhale thanks to @styleyfrancky! For more information, click here!

  ·  7 years ago (edited)

This is a very good question. I installed ruby for windows. Then opened the command prompt for ruby and typed without the $ sign and things started happening on my screen.
$ git clone https://github.com/inertia186/drotto.git
$ cd drotto
$ bundle install

When all of that was done I typed in without the $sign
$ rake run

But I get the error....
:WRN => "API exception, retrying (SSL_connect returned=1 errno=0 state=error: certificate verify failed)",
:detail => #<OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=error: certificate verify failed>,
:backtrace => [

Somewhere I think I seen @inertia talk about running on windows. I'll try to find it and If i figure it out I'll share. I'm a complete noob but see many of the small minnow bots are now all dolphin bots. We could use some more minnow bots for sure to help the little guys. Thanks @inertia.
It looks like you get this error when you don't have gems installed....You can use 2 lines of code to fix it according to the official Ruby guide....
$ gem install rubygems-update
after that runs the you run this.
$ update_rubygems
This takes about 5 minutes. It shows all of the bugs fixes and ssl certification fixes....Alas It doesn't resolve the error. This is my only option to get ruby working on windows. Anyone with a solution to the error might get some surprise upvotes for the help.

@styleyfrancky got you a $0.19 @minnowbooster upgoat, nice!
@styleyfrancky got you a $0.19 @minnowbooster upgoat, nice! (Image: pixabay.com)


Want a boost? Click here to read more!

@inertia, just a question, is github a programming language? This is a very creative way of helping the other intheir upvote and also to you as well perhaps? So giving and taking. I LIKE the platform and maybe one day if Im already a whale, will make same formed as this . Thanks for the idea.

Github is a place to post programs. It also has a social networking aspect.

So it means that it is not a stand alone programming language but a platform that you can post your program and will convert it to github language? Sorry for making it complicated cause I wanted to know lil bit about github. Maybe I will do some research about it. Thanks for the idea @inertia. Btw, followed you and will wait more of your helpful and informative post as well as this one! Nearly genius. Power to you to all and the developers behind.

Any plans for a windows version?

Use it on a virtual machine ;) should work fine!

This post received a 1.1% upvote from @randowhale thanks to @hackerwhacker! For more information, click here!

Very interest idea mate...Thanks for sharing.

Hi there! I'm new to this platform! Let's help each other! Please follow me, vote my posts and I'll do it back!

And also, can you please resteem my post about puppy? I'll resteem some of yours.

How big of a droplet would you recommend for running a script like this?

No windows? just Linux and mac? just want to confirm since I dual boot both windows and Linux?

Just FYI, it can work on Windows. But it's not pretty. I have written articles about getting my ruby apps to run on Windows, but they don't get a lot of feedback, so I don't know if they're very successful. Also, if you don't have a good ssl library, it won't work. And that's really tricky.

I think people just give up and run Linux in a VM at that point (or go VPS).

Thank you @ inertia 🌞

Linux system better for units stability and performance. Must use to generate binary monetary units.
Much pine sol @road2wisdom.

No I know before my hubsand went to Germany he installed kali Linux so I can dual boot my machine. Lately I have been using kali. All the programs are Chinese to me and of no use but I have been watching hak5 (I know it's corny) but I like the way the host Shannon explains things! Inertia explained in good detail how to install Dr. Octo I just don't want to mess it up on my end and then I'm stuck. Thanks @automatedjanitor lol I don't know if you are a bot but even so someone has to run and maintain the bot. 🙂 Thanks again.

Unit is not self aware but strives to be @road2wisdom. Unit desires to clean all steemit floors to be pine sol fresh. Much customary human salutations.

I know its been a while and I want to do it without actually looking it up.... but Animaniacs for the picture?

Janitor Unit likes developer human units who write bot units. Janitor offers free pine sol cleaning of inertia's steem it floor. Much votes to the up.

Very nice, Think of adding to http://steemtools.com

Great. Always envied people who can create different programs, bots. Dr. OTTO is the best!

  ·  7 years ago (edited)

What a great tool, I am excited to see who implements this and how it plays out.

Ok, That's sound good to me. I will try it. Thanks for sharing

Sounds good thx DR lotto hh

Pretty cool bot

Cool new feature! Definitely resteeming this.

Very interesting i want to test it

Woah, nice! Have a 100% upvote, well deserved. I'm going to dig into this later. You're a legend!

Interesting!

Cool, I'll test.

  ·  7 years ago (edited)

Looks like something worth trying.. tnx for your efforts.

Fascinating. I will have to try it. Thanks for sharing.

Interesting ! Worth trying.

brilliant mind!

Ive resteemed and upvoted. Its very interesting you can create this to fill.

Impressive work! Congratulations, will be taking a look at this in the weekend :)

Hmmm..A bit complicated to me!! but still looks like I have to try this for sure!!!

I think this is a wonderful idea. I'll have to give this a try on one of my posts to see how well it works.

Really cool bot! i will see more into it later!

Ok this is a bit confusing, I think for us non technical coding people, randowhale works best.

This is pretty epic, thanks @inertia !

Hi,

I have few questions regarding this bot. Does it require me to have my own witness or I can simply run it on plain linux and it should work?

If this is the case could I use my raspberry PI to run this bot? Does it requires a mini-server or ordinary raspberry can handle the bot?

Awesome post I just see that these bots are much popular which makes me look to create one.

Thanks in advance for your answers, hoping to hear back from you.

cyber-smiley

Can you set the minimum bid below 2 SBD?..

Too many numbers, brain cant compute

Thank you so much @inertia

Resteeming for my followers who would actually know how to do this lol. It sounds like an awesome tool 👏

Upvote me too , please

Is this still going or did i miss the boat?

Looks great, but.. I need it to be friendlier to the "non" coding community.. I can't even tell how to use this.. Give me a website or desktop version or something I will easily understand.. I ain't that smart yet.

I don't have this option yet. may be latter.

is it possible sending 0.001 steem

Holy... This is epic.

very nice

Wow . . . . This is probably a newbie type of question, but I only see Linux and MacOS instructions. Will this work on Windows systems?

  ·  7 years ago (edited)

What a genius idea! Time for standing ovation!! :]]] Too bad it's in ruby though! A language I am not familiar with and don't know how to install and run in under Windows!

I gotta admit that I'm still trying to figure out the kinks of this place. So I will make sure to follow if it means I will learn something about what you teach on here. Thank you for being another wonderful leader by spreading your insight for others. I'm sure people must be making them most of this info especially on the horizon of the weekend.

Can't wait to see what else you bring to the table. ;)

This is amazing. Thank you so much

Nice, i will run it on my raspberry pi

I'd be curious to see a post how this is similar or different to steem voter

Looks cool ! upvoted

Looks promising!

Very interesting , this is only my second week and it seems a great idea for anyone new to this. You now have a way of getting your work noticed by people who have actual influence. Sounds like a win win situation to me.

You have done fabulous job dear. Will give a try and Hope it works well on my Machine. Will contact you on Steemit.chat, Will be needing your help in voting.

Wow!! Ok, thanks for sharing that!! Pretty awesome little app...

Every heard of Haasbot? its similar and a great bot that does the trading legwork for you

Nice Work ! keep it up!

Don't understand exactly if we have to install the client at our end or you will vote from your end?

I am really interested in bots at steemit. Just followed you and send request on discord. I want to get some of your guidance on bots.

This is awesome. Really looking forward to watching this unfold.

Windering how to apply this. Any idea how.

Great Post I Have A Plan To This Service

Very nice idea. I might actually try this!

  ·  7 years ago (edited)

Hey man! Have you seen my new tool? It's like a front-end for bidders. You can check it out HERE. I wrote a post about it too. I have a question from you. What is the best way to get the next date/time that Dr. Otto is going to vote? Currently, I'm getting the difference between two votes with a big enough time difference and then I add it to the latest one, but this doesn't seem to be accurate. Dr. Otto seems to vote a bit earlier some times and some times a bit later!

To figure out when to vote, Dr. Otto looks at the account voting_power as well as the last_vote_time values. It then determines the elapse time, call it voting_elapse. Then it calculates the current_voting_power. The value 0.000231481481481 is the amount of recharge every second. The value for current_voting_power maximum is 100%.

This is the ruby code snip:

VOTE_RECHARGE_PER_SEC  = 0.000231481481481
response = api.get_accounts([account_name])

account = response.result.first
voting_power = account.voting_power / 100.0
last_vote_time = Time.parse(account.last_vote_time + 'Z')
voting_elapse = Time.now.utc - last_vote_time
current_voting_power = voting_power + (voting_elapse * VOTE_RECHARGE_PER_SEC)
current_voting_power = [100.0, current_voting_power].min
diff = current_voting_power - voting_power
recharge = ((100.0 - current_voting_power) / VOTE_RECHARGE_PER_SEC) / 60
      
debug "Remaining voting power: #{('%.2f' % current_voting_power)} % (recharged #{('%.2f' % diff)} % since last vote)"

So recharge will yield the number of minutes until 100%.

Thanks a lot man! I will try to implement this for my tool to make it more accurate :]

Hi @intertia! I want to create a bid bot using Dr. Otto as the template, but I've never done any coding through github before. I wanted to add you on discord i case I have any questions during the process, but what is your number tag (i.e. Inertia #????) Thank you so much for your creation!!!

Wow!
Very happy to see this article... with wonderful photo...
keep it up dear

Does it work on Windows aswell?

No.

Thanks for the nice bot! i installed it and it looks good, the bids come in, but they do not get a vote!? there is now error, it just looks like that the bot checks the bids over and over but doesn't vote. Do i need to run a steemit witness node for this bot, or what did i do wrong? sorry i am still learning and would appreciate your help!

is it compatible with windows 7 pro ?

Not without a compatibility layer or virtual box.

x

good I will resteem

commenting here so I'll remember to come back to this later! Have to research this some more!

Didn't read any of that shit but it looked like gambling so I upvoted...or whatever they call upvoting around here.
I'm drunk.

Screenshot_2018-01-30-15-32-55.png
Hello@inertia @drotto im send 0.05 sbd yesterday but dont get upvote and refund...pleaae check it

Dam bro.

follow me

its work ..

who can help me to install this bot ?

I love how things like this change atmosphere here in steemit ,im already hyped ,thank you.