How To Sell Bitcoin on eBay for 300% Profit

I have never traded stocks. I have never taken an economics course. I have never aspired to be someone who trades money for money.

But ever since I first heard about the Bitcoin phenomenon, I was hooked. As a student of Computer Science, Bitcoin intrigued me at a cryptographic level. As an advocate of privacy, Bitcoin intrigued me at a fundamental level. Trying to make money was (hopefully) merely a side effect.

After taking the Khan Academy course on Bitcoin, reading Satoshi Nakamoto's original paper, and starting Applied Cryptography, I set out to map the major Bitcoin marketplaces. As it stands right now, Bitcoin can be securely traded for USD on a limited number of websites. And, it's not easy. There are issues when trading "tangible" money for "digital goods" such as BTC. The marketplaces take security very seriously, and transferring in USD to a marketplace isn't as easy as linking your PayPal account.

Each marketplace has different security parameters and different types of buying/selling schemes. Not only that, but the prices varied. Quite considerably. Sometimes you could buy 1 BTC on Coinbase for $93, and at the exact same time they were selling on MtGox for $102. Naturally, I saw what looked like a hole, and by a hole I mean a way to make money. I started mapping the major marketplaces out based on a few different specifications.

Ease of transfer in, which is how easy it was to get USD into the marketplace to buy some Bitcoin. Ease of purchasing, meaning how much time it takes for a BTC to arrive after you purchase it. Ease of selling, meaning how much time it takes to receive money when selling BTC. Ease of transfer out, which is how much time it takes to get money out of the marketplace and in a place (like a bank account) where you can actually spend it.

Marketplace Ease of Transfer In Ease of Purchasing Ease of Selling Ease of Transfer Out
BitStamp Hard. SEPA if you live in Europe. If not, bank transfer, $15 minimum fee, 2-5 days.** Easy, instant. Easy, instant. Hard. SEPA - 2/3 days. Other - 5 days.
Coinbase Easy, but you have to login to your bank account online. Hard. takes a week for BTC to arrive (Until you verify account) Moderate, takes a few days for USD to show up in bank account. Easy. Coinbase is linked to bank account.
BTC-e Moderate. "The presently supported payment methods are : US Bank Wire, EU Bank Wire (SEPA), Visa, Mastercard, Liqpay.com, unikarta.com, PerfectMoney.com, WebCreds.com, Ukash.com, Webmoney.ru." Easy, usually instant, can take 1-2 days. Easy, usually instant, can take 1-2 days. Moderate, ???
MtGox Hard. Long bank transfers, etc. Easy, instant. Easy, instant. Hard. Long bank transfers. At least 1-2 days.
campBX Easy with Dwolla. Easy, instant. Easy, instant. Easy with Dwolla.

** = accepts Ripple/AstroPay

I thought maybe I could buy the Bitcoins on some site (like Coinbase) and sell it on some site (like MtGox). But with some much waiting time involved in transferring funds in and out, it didn't seem worth it. I would be scraping maybe $5-10 every BTC, and I would have to wait weeks to see the money. I also had little capital. My interest faltered.

Enter eBay

Until I visited eBay. I searched Bitcoin, and was amazed. People were consistently selling Bitcoin for 150% market price. At the time, Coinbase was selling BTC for $93. I saw almost every auction end with a winning bid of at least $150. Not only that, but some auctions were ending at $300, $500, and I even saw one end at $700.

No way. Too good to be true. I know what you're thinking, there's no such thing as a free lunch, PayPal is an insecure way of trading BTC, etc. I wasn't really thinking at the time.

So, I decided on Coinbase. I liked the easy of payment, and also there are no transfer fees when sending BTC from your Coinbase wallet elsewhere. I had to wait a week to see my BTC, but that was fine. A week later, after buying a $94 BTC, I put .5 BTC up. I started the bid at $0.99, for three days.

Three days later, the auction ended at $80. I was amazed. The buyer was from China. I did not send the BTC until I received payment. Once I did, I sent the .5 BTC. I sent the buyer the blockchain.info (keeps track of every single BTC transfer on the network, so there is proof I sent it). He recieved it, left me positive feedback, all was good. Hmm...

It was around this time I told my friend about this crazy money-making scheme. He's loose with his money. He bought 2. He's bold. He put 1 BTC up for $0.99, with a Buy It Now of $300.

Within 15 minutes, someone bought it now. He paid, and my friend sent the BTC. Feedback was exchanged. WHAT?

Why would ANYBODY pay $300 for something I bought for $90? We tried to hypothesize. They were out of the US, so they couldn't use Coinbase? They wanted it instantly, whereas we had to wait a week? We didn't worry about it for too long... we were too busy buying more.

I bought 2 more, and sold them each for $300. Buy It Nows. Both within 20 minutes of posting the auction.

My friend bought 8. After my 2 sold, I bought 5 more. If the trend continued, we were going to make thousands of dollars. We had to wait a week for our BTC, but that was fine, in 20 days our Coinbase accounts would be verified and we could turnover BTC on eBay INSTANTLY.

No such thing as a free lunch, dammit

I was at the gym when I received the email. Chargeback. My friend from China was initiating a chargeback via PayPal. I was so struck I left the gym as soon as I got there. I went home, examined the case. He was indeed saying I never sent the item. Not too surprising, I guess. I screenshot'd Coinbase verifications showing I sent the BTC. I sent PayPal the blockchain.info. I even screenshot'd the pleasant message exchange we had, including the positive feedback he left me.

My money was frozen for at least 21 days. PayPal would understand. At least I sold those other two for $300. Boy, was I naive. Within 2 weeks, 2 more chargebacks. Actually one of them was an unauthorized claim, saying someone hacked into his account, bought BTC, and ran off. Which, really, is plausible.

However, PayPal states that if the seller can prove that he sent the item, he will not lose his money. Again, I sent all correspondence, blockchain, and even EXPLAINED what Bitcoin was, just in case they didn't know.

My friend? Same thing happened with his buyers. By the way, I checked the addresses I sent the BTC to. All of my "customers" had spent the BTC I had sent them...

Now...

PayPal has ruled on one of my cases. I failed to prove that I sent the item.. (?) and lost my money. $90 down the drain. I have no doubt I will lose the rest of the money. Was I scammed? Were their accounts really hacked? Who knows. I'll stick to programming.

Oh and by the way- I still have 5.5 BTC, if anyone would like to buy some...

How To Insert Records Into Database Without Rails (ActiveRecord Ruby WITHOUT Rails)

I recently came across the following situation:

I had created a Ruby on Rails application (a database of clients) and connected the application to an external, online MySQL database. This works fine for inserting/editing/deleting records via the Rails application. However, there was a local task that needed to be implemented on our local machines that could insert/edit records in the same database.

I'm learning to love Ruby, so naturally I wanted to use it as much as I could. Also, considering I wrote the app in Rails, I figured it made sense to write it in Ruby rather than writing a PHP script to connect to the same database.

It is possible!

First, let's make sure to have the necessary gems installed. I used a MySQL database, so I am going to use the 'mysql2' adapter. If you used sqlite3, use the appropriate adapter.

gem install mysql2

Then,

gem install activerecord

Here, we install the Active Record gem (look familiar, Rails users?). Now we can create our file, and require the necessary gems.

require 'active_record'   #NOTE UNDERSCORE
ActiveRecord::Base.establish_connection(
:adapter => 'mysql2', #approp. adapter
:database => 'databaseNameHere',
:username => 'usernameHere',
:password => 'passwordHere',
:host => '0.0.0.0' #host IP here
)

So we've established a connection to the database. Now, we need to crack open the classes we are going to be using. Any model that you need create/edit/destroy needs to be 'declared' (in a sense), here.

Let's say we are changing the User model:

class User < ActiveRecord::Base
end

Now we are free to manipulate Users as we please.

@user = User.new(:uname => "uthisisaname")
@user.save

Talent Does Not Exist

"If you always put limits on what you can do, physical or anything else, it’ll spread over into the rest of your life. It’ll spread into your work, into your morality, into your entire being. There are no limits. There are plateaus, but you must not stay there, you must go beyond them. If it kills you, it kills you. A man must constantly exceed his level.” - Bruce Lee

This is not a scientific paper. I will cite no studies, and make no attempt to appeal to the scientific method. I am, by nature (or habit?), a scientific and logical person. However, I write this essay as an appeal to your apathy, to your dying ambition. Take it as such. I use a lot of commas.

There is no such thing as talent. There is no such thing as being born with ability of any kind. You. You have no talent. You did not emerge from your mother's womb with the ability to play the banjo, blow glass, or edit digital video.

You may have picked up a baseball bat for the first time and hit a home run, first try. Chances are, you were startled! All of your friends (maybe even your parents) said you were "naturally talented." They were wrong. I (and you, after this paper) will attribute this occurrence to one of (or both) of these factors:

  1. Luck. Pure, utter, coincidence. Congratulations.
  2. Some convenient accumulation of past events, training, and/or brain signals

Maybe your favorite musician hit one of these factors when first picking up an instrument. Maybe not. Let's assume that they hit number 2, because luck is hard to reason about. Great, they had some COMPLETELY UNPLANNED predisposition to playing piano. Then, they worked and worked and worked and worked and worked and WORKED until they were amazing and what they do, and then they reached success.

You must assume that every successful person worked harder than you can imagine working to get where they are today. If you tell yourself that you cannot start because you are not "talented, you are bullshitting yourself, because talent does not exist. If you INSIST that they have hit number 2 and you have not, consider whatever skill or goal you have in mind relatively:

Nobody picks up a baseball bat and hits the ball every time. The person from the example from before hit 1 (one) ball. They are .000001% ahead of you, out of 100%. Really, they got lucky, and now that .000001% is stopping you from starting to pursue your dream because you don't think you have "talent." Shut up.

It is practical for you to see talent for the myth that it is. It is practical for you to see that nobody was born with and nobody started with more ability than you have the potential to gain. It is freedom. It is the freedom that you can work hard at anything you want to do, and you are just as likely to succeed as everybody else. It is a level playing field. 

What if I'm wrong? What if talent does exist? What if you spend your whole life working your absolute hardest at something you want to succeed at and you FAIL?

I hope I do not have to answer that question. I hope that in asking yourself that question, you see that such a life would not be a failure at all.

If it kills you, it kills you. 

Create and Locate Custom Validations in Ruby on Rails

Validations help users specify restrictions on data being entered into the database, at an application level.

A general overview of Validations and their uses can be found in the Rails guides, here.

There are quite a few built in validations. Let's build an example for purposes of this tutorial. We have a model called Run, which keeps track of the time you started the run and the time you ended the run.

At first, your model might look something like this. We can assume :start and :end are both data of type time.

1

This is of course in the app/models folder. Let's add some built-in validations.

2

Here, we use the :presence validation to make sure that whenever a new Run is created, it always has a start and an end. Now, let's say we wanted to add a validation that checks to make sure each :end time is after, or greater than, the :start time.

That validation could be placed directly in the model .rb file. It would look something like this.

Screen Shot 2013-06-15 at 12.38.30 AM

You would then change your Run model to reflect this change.

Screen Shot 2013-06-15 at 12.38.11 AM

This would work fine. However, let's say eventually you plan on creating a Jog model and a BikeRide model, and you want to validate the same exact things. You could copy and paste the validator into every model .rb file... but what kind of programmer are you!?

So! You're going to create (I know, I was scared at first two) a folder in your app directory called validators. This will keep everything nice and organized. Then create a file called time_validator.rb in that folder, and place your TimeValidator into said file.

Side note: if you are running your server, make sure you CTRL+C and restart it so rails can update the directory structure.

Now you're going to add an includes to your models and all subsequent models that use this validation.

Screen Shot 2013-06-15 at 12.38.19 AM

All validations must use the validate method, which takes in any record. This is an abstraction, so it doesn't actually matter which type of model you validate with. However, obviously in this case all models you send in must have the start and end columns.

Setting up MySQL with Ruby on Rails with Mac OSX

Goals:

  • To install MySQL for use with Ruby on Rails
  • To install Ruby on Rails
  • To show you how to combine the two

Step One

Install XCode! If you already have XCode, then you need to update XCode. While you're at it, run a system update. Chances are you've been putting it off for a few weeks. I'll wait here.

If you're wondering why, it's because XCode comes with the C compiler that Ruby needs.

Step Two

Install Ruby on Rails! 

Step Three

Install Homebrew. Ever use Linux? Ever use sudo apt-get? This is Mac's version of that. Run the following terminal command:

ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"

Step Four

Now to install MySQL using brew.

brew install mysql

Step Five

Making MySQL run on startup. This requires some moving of files and directories.

mysql_install_db --verbose --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp

mkdir -p ~/Library/LaunchAgents

cp /usr/local/Cellar/mysql/5.5.27/homebrew.mxcl.mysql.plist ~/Library/LaunchAgents/

launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist

Step Six 

mysql -uroot

If you see the mysql> prompt, you succeeded. Congratulations!

Step Seven

Install the mysql2 gem for rails.

gem install 'mysql2'

Step Eight

To create a new app using mysql:

rails new APPNAMEHERE -d mysql

To edit an existing project to use MySQL, change gem 'sqlite3' to gem 'mysql2' . Then, change your config/database.yml file to look something like this:

Screen Shot 2013-06-12 at 11.42.12 PM

 

The key points here being adapters, usernames, hosts (if you're doing local development) and databases... (you'll probably have to make some new ones, or re-run your migrations.)