How STK works.

If we had to sum up our STK token in a Twitter post, here’s what we’d say.

STK lets you use cryptocurrency for instant, contactless payments at point of sale.

If allowed a little more time, and a higher character limit, we’d provide a lot more detail. So, in less of a nutshell, here’s a breakdown from our Chief Technology Officer on the magic behind the scenes of our STK token and technology.


The STK token lets you make instant payments at points of sale directly from your cryptocurrency wallet. When you tap to pay through the STACK app, you can make purchases at any retail location that supports credit or debit cards. The STK token opens a bridge between the Ethereum blockchain and traditional credit card payment rails. In this article I’m going to explain the challenges of creating this protocol and how we resolved them.

Traditional payment rails

Most of the world’s retail transactions (shopping), as well as banking goes through a handful of core payment rails. The best known of these rails are run by major credit card companies. Their purpose is to enable banks and other financial institutions to transmit money to each other, securely and reliably.

We are focused on consumer-to-retail payments, like those you make at grocery stores, convenience stores, restaurants and other retail locations.

On the current credit card rails, payments from customers to merchants have two stages:

  1. Validation. When a shopper pays at a point of sale terminal, the terminal first checks with the paying institution (the shopper’s personal bank) to see if the payment should be allowed. The bank is responsible for preventing fraudulent transactions. It makes sure there is enough money to cover the purchase, and that the shopper has not already spent his/her money elsewhere. The paying institution sends its response, to either an accept or reject, back through the same rails.
  2. Settlement: Even after the transaction at point of sale is complete and the shopper has left the store with the purchase, no money has changed hands. The shopper’s bank has promised to pay the merchant, but the actual payment, called a settlement, happens at a later date. At settlement, the institutions involved reconcile and pay their debts to each other.

The terminal at which you tap to pay is a convenient tool for merchants to check customers’ ability to pay, and to obtain their promise to do so. Eventually, these payments are deposited into the merchant’s bank account.

Integrating crypto wallets

Where could cryptocurrency wallets (aka. crypto-wallets) fit into this network? Crypto-wallets store currency similar to the banks in the above example. So in the ideal case, your crypto-wallet, or even the blockchain itself, would participate in this payment network directly.

In order to participate as a member of the payment network, a candidate service must meet certain criteria set by the rails providers.

  1. The service must be able to guarantee a payment when asked. When a traditional bank validates a payment it locks the necessary funds inside the bank account to prevent the account holder from spending the money elsewhere. If on the other hand a provider promises to pay, but then reneges on that promise, the system becomes dangerously unreliable.
  2. The payment guarantee must be instantaneous, or take at most one second to respond.

Crypto-wallets, unfortunately, can’t satisfy either of these criteria. Although blockchains are reliable and consistent over the long term, early on any payment is akin to a pinky-swear. A transaction may be rejected minutes or sometimes hours after the fact. When this happens, it may be too late for the merchant to get their goods back.

Possible solutions

1. A dedicated crypto rail

Credit card companies have spent billions of dollars over a span of decades to create a comprehensive network of hardware and software systems and enable global payments. To create a new one from scratch would require a titanic effort.

To reach merchants at their places of business, the current payment rails provide easy-to-use point of sale terminals that plug into the rails. For merchants to adopt a new rail would take years of outreach as well as training, worldwide. Some companies, like Coinbase and Bitpay, are trying to achieve this through dedicated mobile apps. These apps are a good first step, but even they lack the instantaneous payment guarantees that many retail merchants need.

For cryptocurrencies to reach a mainstream audience quickly, a better approach would be to harness the existing rails.

2. Crypto banks

Another way to satisfy the required payment guarantee would be to create a crypto-bank. This institution would hold the private keys to individuals’ crypto wallets. By doing so, they could then guarantee payments and prevent fraud, i.e. double spending.

This solution is attractive in its simplicity. It has a few shortcomings, however. The crypto-bank would completely control their customers’ money. This goes against one fundamental design goal of blockchains: autonomy. The new crypto-bank would also expose a security risk. As demonstrated by centralized exchanges like Mt Gox, holding all keys in one place is like placing all your golden eggs in one, temptingly hackable, basket.

STK: A bridge

STK resolves the above problems by acting as a middleman between the existing payment rails and customers’ private crypto wallets. The STK token provides access to a payment channel between a crypto wallet and a 3rd party liquidity provider. This liquidity provider holds a reserve of local currency. Initially, the liquidity provider will be STACK. When making a purchase using STK tokens,

  1. STK obtains a signed transaction from the customer promising to send cryptocurrency from their wallet to STACK’s wallet.
  2. STACK then pays for the purchase from it’s own local currency reserve, using the existing payment rails.

Payment channels are an exciting step forward in scaling up the Ethereum blockchain. You can find a summary of how they work here. Payment channels are commonly used to guarantee that the transactions between two parties will always be successful.

Using payment channels, we can satisfy the requirements of all parties in the transaction. They provide a near-real-time guarantee of payment to the merchant. At the same time they give crypto wallet holders full control over their private keys, including the ability to trade their assets at any time.

Using the STACK app feels like you’re paying the merchant directly from your crypto-wallet. The machinery behind STK creates a seamless experience for the customer.

Here’s a step by step look at how STK makes payments behind the scenes, beginning when a shopper taps to pay at a point of sale.

  1. A shopper taps on a point of sale using their STACK app’s crypto-card.
  2. The payment rail tells the STACK app the amount of the purchase and the currency. The terminal then pauses and waits to hear if the transaction is approved.
  3. The app securely determined how much cryptocurrency would be required to pay the merchant.
  4. The app converts the price of the purchase to the cryptocurrency.
  5. Through the app, the shopper digitally signs a transaction transferring the purchase amount from their crypto-wallet to STACK’s wallet. They sign it using their private key, which is stored on their device.
  6. The app sends the signed transaction to the STK server.
  7. The STK server verifies that a) The amount of cryptocurrency being sent is correct, b) the amount required is available in the shopper’s payment channel, and c) the signed transaction comes from the correct crypto wallet
  8. If any of the above fails, STK sends a message to STACK to reject the purchase.
  9. Otherwise, it tells STACK to approve the transaction. The approval message includes the wallet, the target merchant, local currency and the amount of the settled purchase.

Benefits of STK

Using STK brings you the best of both worlds. It combines the ubiquity of existing global payment networks with the secure autonomy of the blockchain. It also has a few additional benefits:

  1. Chargeback. If you pay through STK, you can get a refund for your purchase if the product is not delivered as expected. The money returns to your STACK account through the payment rails; STACK then passes the refund back to your crypto-wallet through STK’s payment channel.
  2. Security. Unlike centralized cryptocurrency exchanges, a wallet’s private keys are only stored on the user’s device. Your device provides an additional layer of security against potential theft.
  3. System as a service. STK can connect any two parties through a payment channel. STACK is STK’s first partner; others can be added later.
  4. Fail-safe. Funds stored in the channel are independent of STACK’s database, so regardless of a potential breach your funds won’t be affected and can be withdrawn anytime.

At STK, we believe cryptocurrencies will play a part in the evolution of finance. Our STK token will be the first to enable instant, contactless payments at point of sale, and we’re excited to show you what we’re building. Join the discussion anytime:

www.stktoken.com

Telegram

Twitter

Bitcointalk