
Show HN: Golang automation for mining cryptocurrencies on the Spot Market - alexellisuk
https://github.com/alexellis/spotminer
======
jlgaddis
Be careful with this kind of stuff.

Someone posted a link [0] to a GitHub repo here a few days ago that would fire
up a miner on some AWS GPU instances... except that they hard-coded their own
account (wallet) into it so any profits would go to them. It hit the HN front
page pretty quickly.

This might be completely legit but, at minimum, take a few minutes to look
through the code before you just blindly deploy it.

[0]:
[https://news.ycombinator.com/item?id=16249372](https://news.ycombinator.com/item?id=16249372)

~~~
alexellisuk
Always read the code - this is why I'm not supplying a binary.

I don't even know if this is valid within the T&Cs - but I hope it will be
interesting and of educational value at the least.

~~~
swedish_mafia
But you are supplying a binary !

This docker container calls a pre-compiled binary ./cpuminer. There is no way
to tell if this binary faithfully uses the bitcoin address provided in the
command line (yes there is some code there but you cannot confirm that this it
was compiled from that code.)

But it gets worse. Even if someone does disassemble the binary, you could
update the the docker container to add this capability, and nobody will be
able to tell because the image gets pulled each time.

~~~
alexellisuk
Have you taken a moment to read the README? The Dockerfile is linked in the
mine-with-docker project. You are well within your rights to rebuild that. The
concern raised was what happened with the cloud API.

------
broz
It seems the repo has a hardcoded mining address here, isn't it? I'm not sure
how do you configure a user at a mining pool, but be careful.

[https://github.com/alexellis/spotminer/blob/master/main.go#L...](https://github.com/alexellis/spotminer/blob/master/main.go#L161)

~~~
alexellisuk
I've fixed that - it was unintentional and thank you for pointing it out.

------
jarym
So if enough automated miners hit Packet.net's spot market does that mean that
it'll take the cheap supply away so that non-miners will be competing for
cost-effective instances?

------
IgorPartola
How quickly will I lose money with this?

~~~
np_tedious
Slower than if you used dedicated EC2s

~~~
IgorPartola
Heh that’s fair.

------
unusximmortalis
What's the spot instance which can be used and not lose money on mining with
'em?

~~~
malux85
It's not for GPU coins, but some altcoins are pop in and out of profitability
on CPUs, if you balance it in realtime you can make money. (I have an employee
doing this as a learning project)

But if making a lot of money is your goal then you're better do it it trading,
no I'm not going to elaborate

~~~
bufferoverflow
Is trading really better? With this you're basically guaranteed a profit, as
long as you can find a spot instance cheaper than the mined amount.

~~~
malux85
youre guaranteed a small profit. Trading is greater risk greater reward.

Mining might get you hundreds, low thousands a month. Trading is 10s thousands
/ low hundreds thous. Month

~~~
bufferoverflow
I remember seeing stats that something like 90% of the traders lose money
trading stocks. I'm sure it's the same in crypto, though it's compensated by
the nearly constant growth. I doubt though that many traders beat the simple
buy-and-hold strategy.

