Enable any website to instant purchase or sale of digital assets and cryptocurrencies via ShapeShift Skeleton

What is ShapeShift

ShapeShift is a service which allow users to specify the currency they want to exchange and where to send the exchanged coins to. In a first step, user receives a public address he or she has to deposit to, and specifies where to send exchanged assets to. In a second step, user deposits the asset to the provided address, and in the last step ShapeShift is responsible to send different type of assets back on the agreed exchange rate, as soon as they receive users deposit. Exchange rate itself has an expiration time, and will not change until it will expire.

If business owner would like to integrate such a solution to their website, one of the best candidates is a ShapeShift Skeleton – simple widget which allows instant purchase or sale of digital assets and cryptocurrencies. Widget itself is an open-source, and allows users to exchange assets without leaving the site. In addition, template for this widget allows developers to customize the look and feel of the tool, to match particular look and feel of their product.


Go to ShapeShift github, clone the repo, install the dependencies, and run the server. From command line it would look as following:

git clone https://github.com/Shapeshift-Public/ShapeShift-Skeleton
cd ShapeShift-Skeleton # clones the repo locally
npm install # installs dependencies from package.json
npm install -g bower # installs bower (if you do not have it installed already)
bower installs # installs web dependencies
node dev-server.js # runs a dev server

Code is open sourced and could be found here


If you will go to http://localhost:3000 in your browser, you should see this:


Default exchange is from BTC to LTC (Bitcoin to Litecoin), there are many more assets/currencies, 60+ at the moment of writing, including ETH, ETC, BCH, XMR, DASH, ZEC, NEO and many ERC20 tokens, such as ANT, BAT, OMG, etc.

Return Address field is used to return the deposited funds if the exchange failed.

Withdrawal Address is the destination of the funds you want to exchange.

Amount is the how much you want to receive.

After pressing Shift button, you should see:


Under the hood, widget made a request to ShapeShift API, providing the withdrawal address, amount and return address, and got following response:


Now user has to deposit requested amount of Ether (0.04566097 in our case) to receive 0.001 BTC to the Withdrawal Address. Notice the expiration field, which gives a user just a few minutes to make a deposit, otherwise it will fail, and funds will be returned to the Return Address.


In the template directory, you will find templates to customize look and feel for coin selector, shift button, deposit info and potential error information, to make sure that integrated solution matches your website.

When will you pay with Bitcoin for lunch?

Cryptocurrencies are becoming more popular every day. In the near future we should be able to use Bitcoin, Ether, ZCash, Monero, Dash, etc to pay for lunch.

As a customer who would like to use cryptocurrency as a method of payment (medium of exchange), I would expect following things to happen:

  1. Payment should be secure, and my remaining coins will be stolen now or later.
  2. I should not care that I pay with concrete cryptocurrency.  It also includes that I should not care that my coffee for EUR 1.5 could cost me 3 because of the currency volatility.
  3. Payment should be instantaneous. I could wait couple of seconds, not more.
  4. Payment should be private. Which leads you to question if your phone is tracking your location, video cameras are tracking what you do, what is the point that my transaction was private? It could be just matched by comparing when I did my payment on the camera with concrete transaction timestamp. Maybe we should hide also timestamp of each transaction?
  5. Transaction cost should not matter for you. It could be neglected due to its small amount, or just carried to the receiver.

Payment is secure as soon as receivers address is copied correctly or scanned from the correct QR code, and proper amount is set. Remaining coins simply can not be moved, even if public address is known to everybody, and could be transferred if sender is in possession of address private key.

Currencies supported by Jaxx (source: jaxx.io)

I should not care that I pay with concrete cryptocurrency point could be resolved by using mobile app – wallet, allowing multiple currencies, which easily carried everywhere, as it  resides on your phone. Possible solution could be Jaxx, and its not the only solution.

Now, lets think about payment should be instantaneous. In cryptocurrency world transaction speed is correlated with the transaction safety, and to be precise how sure receiver is that coins are moved properly. Technically speaking, transaction should be stored on the blockchain and confirmed by majority of the nodes. In case of Bitcoin, confirmation will take around 10 minutes, for payment with Ether – 12 seconds.

Payment should be private. If you would like to pay with Bitcoin, then you will ask for a Bitcoin address from the shop (or scan QR code), and will make a payment. This transaction will be stored on the blockchain, with publicly available transaction information, such as amount, sender and receiver addresses. For you, as a sender, you could just take this address and check all transactions which involved this shop address, because blockchain stores all the transactions for every address forever. It might not be convenient for a store, as its clearly exposes sensitive business information. Its not also convenient for a sender, because its balance will be known to a receiver.

There are already currency such as ZCash and Monero which address issues of currency fungibility and privacy much better than Bitcoin or Ether.


Transaction cost should not matter for you. As of now, in case of Bitcoin, at the moment average transaction fee is about 3$. Fees are raising for other coins as well, its almost 1$ for Ether. The lowest transaction fee at the moment are in Litecoin, due to recently activated SegWit.

Transaction fees are rising (source: bitinfocharts.com)

As an alternative, transaction costs could be carried by the receiver (think – credit card system today). In this case to make payment still profitable for the seller, transaction fees should be negligible, otherwise its hard to imagine that customer would be fine to pay premium only for the fact that payment is done using Bitcoin or other crypto.

How far are we now to address all the issues mentioned above?

A lot of work to do.