Dr. Otto: Ra ra Rasputin Update

in #radiator6 years ago

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




Update Notes

This is a rather big change, so it is recommended that you back up your current version or clone this version to a new location, rather than just git pull on top of your existing install. Doing a git pull should work, but you'll have to merge your config.yml by hand. If you're good at git, this should be no big deal. If not, don't try to update on top of your existing bot. Just do a fresh install.

New Features

Dr. Otto can now accept bids from one account and vote from another. This is handy if delegation is not available for your particular configuration (e.g. Golos). Note, if you can use delegation, you should because voting/commenting is done in the same transaction, which is less prone to complications.

There's now better support for urls in memos that end with things like #comments and/or /. Some people paste urls without looking for extras or they get urls from other platforms running Apache, which automatically adds trailing slashes.

You can now configure Dr. Otto to accept both core (STEEM) and debt (SBD) currencies. They are not accepted 1:1. Dr. Otto checks the internal market to find the correct ratio to process bids.

The rake state task now returns a valid error code to the caller. This allows you to do things like configure monit to notify you if Dr. Otto stops voting.

Added rake audit_bidder task so you can investigate bid behavior.

Added extra logic to deal with bluff bids, that is, bids intended to mislead other bidders into avoiding a window.

Added support for flags. This feature is not enabled by default.

Various fixes and gem updates.


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.2.2p95 (2015-04-13 revision 50295) [x86_64-darwin14]

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>
  :max_age: 7200
  :batch_vote_weight: 100.00 %
  :min_effective_weight: 0.25 %
  :reserve_vote_weight: 0.00 %
  :minimum_bid: 2.000 SBD
  :blacklist: mikethemug
  :no_bounce: bittrex poloniex openledger
  :no_comment: bittrex poloniex openledger
  :no_comment_fee: 0.00 %
  :auto_bounce_on_lockout: false
: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]

You can also use bounce_stream to immediately bounce transfers that are invalid. The advantage of this is that bounced transactions are returned right when they happen if they cannot be processed rather than wait for the batch.

$ rake bounce_stream
Report Mode

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

$ rake report

Also accepts a limit argument.

$ rake report[10000]
State Check

The state task will return an error code to the shell of -1 if the current voting power of the bot has reached 100 %. If voting power is less than 100 %, it returns 0 to the shell. This can be used by external tools to detect configuration problems.

$ rake state
$ echo $?
Usage Report

The usage task will generate a report for the last month.

$ rake usage
Audit Bidder

The audit_bidder task will generate a report that segments between bids and refunds.

$ rake audit_bidder[account_name,bidder,symbol,days]

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:

https://steem-third-party.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.


Also see:


Sort:  

I have a question, being a new user, due to less steem power, how can we use such steem bot for upvote? Is it possible to get such bot at low rate

No, you need a decent amount of STEEM Power to run this bot. Whatever your upvote is worth, that’s about the most this bot can make per vote. If you don’t have much of an upvote, nobody will bother to use your bot.

o I see, bad luck because right now I am struggling hard to get steem power , I also following your posts , I learn here a lot

What is the minimum recommended steem power to have?

As I said, you need a decent amount of STEEM Power to run this bot. What that means is, if you can do a $1 upvote, that's $10/day because you can vote about 10 times a day before your voting power starts to decline. Whatever you can upvote, that's about the most you can expect to collect.

So, to get $10/day, you need to lock up about 2,800 STEEM Power at the moment. That much STEEM would cost you $16k to buy on the open market right now.

Use this link to calculate out what one upvote would be based on the amount of STEEM Power you have:

https://www.steemnow.com/upvotecalc.html

Let's say you want to collect $50/day. That would require a $5 upvote. To do that, you would need to have 12,500 STEEM Power, which would cost about $71,250.

thanks for the explanation!

Please I have series of questions to ask?

  • Why is the need for multiple bidder in a bash?, does it means that the rate of voting depends on the amount of sbd for any bash. If you understand what I meant, for instance; let us assume I am the only one in bash A, that is 100%. Does it mean it would be of more gain if I bid 5SBD than if I bid 2SBD. Maybe the rate of my 100% vote will be different for both values, that is maybe, the 100% vote for 2SBD will be doubled while 5SBD would be tripled. That is the higher the bid the bigger the vote of the rate chosen. Please I would like you to enlighten me on that.

  • what Does the Timeframe means, for example for 100% 10 votes, does it means it can only vote every post I make for every 2.4hours time i.e if it upvote my post now, then it can then only upvote any of my second post in 2.4hours time and so on in such sequence?

  • what if I don't have up to the number of post to be upvoted a day or how long can the Dr Otto Wait for you to post. Is it possible for your vote bid to last for a long time, maybe through out a week?.

An account can vote 10 times a day at 100%; 20 times a day at 50%; and so on. Because of this limitation, Dr. Otto splits votes based on bids.

The reason for having multiple bidders in each batch is to gamify it so that higher bids get a bigger votes for that window.

The 2.4 hour timeframe is (roughly) the time it takes to recharge one full window.

If bids come in while the bot is disabled, it is possible to catch up or just refund them. Depends on the configuration, though.

Oh!, now I get.......that is there are only 10 entries for 100% vote, because the vote recharge fully in 2.4hrs (24hrs/2.4hrs of recharging)

Thanks a lot @inertia,.....i think I now understand to some extent......i wasn't actually privilege to know about this life saving voting system until now.......thanks a lot once again for such platform.

I think you should review earlier posts about how bidding bots work. Every one of these questions exposes that you don't know the very basics.

@josephsavage,.....you are actually right, it's because I wasn't actually privilege to know about this bidding bots until now.......as you said, I will actually need to read more about this bot system, although I have understood to some extent.......I Am going to go through his post to find the former basics of the bot system post. Or maybe you can assist me in saving effort by giving me the link to the post at your own ease......i was happy knowing about this voting system, because I have been trying to post a lost of stuffs, but it is discouraging that it has not been discovered..... But with Dr Otto, I should be able to encourage myself.... all thanks to @inertia

The link is already given in the post.

https://steemit.com/radiator/@inertia/dr-otto-vote-bidding-bot

Many Steemians use www.steembottracker.com by @yabapmatt to manage their bidding bot usage, so check his page for useful information, too.

Thanks a lot @josephsavage, I really appreciate that

great information ,excellent work of this post,thanks for good sharing

I wanna got this chance.Very good for sharing this feed.I will follow you regular share such a type content.
Thanks

It is a blessing to know there is improved support and improvements. Thanks @inertia for the encouraging update.

The same actor (Jim Varney) plays five roles in the fantasy of a mad scientist out to corner the world market.

@radiator

His name is ROB PAULSEN.

Thank you for this bot, the update, and continued contributions to the Steem ecosystem.

good post.
thanks for sharing.

I give one vote and share your post due to the posing posts.

This is excellent @inertia, I will try it out next! You were asking, who is using your API...well I just started using it this week and I'm loving it :P