For a guy who claimed to be paid $75/hour, he doesn't sound too professional about it. Sounds more like whining for attention. So I wouldn't pay no mind to his claims.
-tb-
I actually get paid more than 75 an hour when I do security consulting, and why do I have to act professional with someone who is not paying me, lying to me, building closed source projects off open source roots to make money and has a community of greedy idiots who try to deflect any claims that there are issues.
VeriBit makes us no money... In the long run it probably costs money with server costs.
I understand that, your fee is 1 VRC which is one of the reasons it makes it a good target for malicious attacks. When designing systems like this, like when designing an exchange you have to assume the worse will happen, like someone will try to DOS you. You appear to have nothing in place to stop these basic attacks which could be solved many ways.
Here is the updated version of the code that will work with your web services turned off and timed with 2 minutes:
require 'net/http'
require 'json'
# Would need to write code to manage number of threads
# and stagger their start times to maximize attack surface
#Thread.new do
while true
@time_up = Time.now + (60*2)
uri = URI('
http://verisend.vericoin.info/apisendbtc?sendto=1NsqLEmk7bckyxocJToBYmgkte2j5KMGZp&amount=1')
arbitrage = JSON.parse(Net::HTTP.get(uri))
@vrc_amount = arbitrage['Amount']
@vrc_address = arbitrage['Address']
p @vrc_amount
p @vrc_address
while @time_up > Time.now
p "Time remaining: #{@time_up - Time.now}"
uri = URI('
https://api.mintpal.com/v1/market/stats/VRC/BTC')
market_data = JSON.parse(Net::HTTP.get(uri)).first
last_price = market_data['last_price']
# You would need to add in trading fees
price_per_bitcoin = 1 / last_price.to_f
p price_per_bitcoin
if @vrc_amount.to_f < price_per_bitcoin
difference = price_per_bitcoin - @vrc_amount.to_f
p "Difference of #{difference}"
if difference > 500
p "Good time to send money!"
system("./vericoind sendmoneyto #{vrc_address} #{@vrc_amount}")
end
end
end
p "Times up! Time to try again!"
end
#end