BitBotFactory / MikaLendingBot

Automated lending on Cryptocurrency exchanges Poloniex and Bitfinex
http://poloniexlendingbot.readthedocs.io/en/latest/index.html
MIT License
1.11k stars 345 forks source link

[Feature Idea] Automatically stop lending currencies that are about to fork #572

Open Evanito opened 6 years ago

Evanito commented 6 years ago

We have an enddate feature, and we often know when a currency is going to fork for weeks in advance.

Idea: When a currency fork is announced, have a feature that inputs an individual enddate for that coin so that users are able to benefit from the split instead of losing the new coin.

Requirements:

Evanito commented 6 years ago

Ideas and critiques would be appreciated.

We could keep a database of fork blocks, this could be a raw CSV we host in a Github repo. Then once a day or so have the bot: 1) Check our online DB of fork blocks, and grab the Goal Block of any forking coins. 2) Check the blockchain explorer API for forking coins to get the Current Block. 3) Estimate time until the fork is to occur. (Goal Block - Current Block) / Avg. Block Time 4) Set an enddate of at least 24 hours before that time is estimated to occur. 5) Continue to update the time in the days/weeks before the fork, in case blocks clear quicker than expected. 6) Once Goal Block has passed, remove the enddate and resume lending of coin.

Make this optional for those who do not like having a link to centralized databases.

chriscrutt commented 6 years ago

haha yeah right now I just set it to stop lending on the 10th

tisdall commented 6 years ago

I like the base idea, but there seems to be a new Bitcoin fork every day now so I think this might be difficult to make as a centralized CSV. The only coins you really want to stop lending are the ones involved in a fork the exchange are going to support and give you a portion of. For example, if Poloniex has no plans on supporting Bitcoin Diamond then there's no point in pausing lending as neither the lender nor borrower will ever see those coins. Another difficulty is if Poloniex decides to suddenly support forks after they've happened (I think this may have happened with Bitcoin Cash).

Overall I like this idea, but I think the user needs a way to opt-out of certain forks or opt-out of all forks. I think this is more work than it's worth, though.

rnevet commented 6 years ago

I only support coin config option, the rest probably won't be useful.