DeFi Payments With Card Pay

Cardstack’s decentralized payment & reward system

Cardstack Team
Cardstack
8 min readMay 31, 2021

--

Cardstack is building a decentralized software ecosystem using Web3 technology, blockchain economics, as well as open-source and open collaboration, so as to compete with the tech giants of Silicon Valley. To that end, we want to ensure that we all share in the same economic value — so that we can pay each other, distribute revenue, fund new products/upstream capabilities/software or open-source projects, and pay commissions or royalties to the network participants who make those sales possible.

Traditional vs Web3 Payments

When you think about payment, the first thing that comes to mind is Visa and Mastercard. They are accepted everywhere and you can use them to buy almost anything in the world. In China, with the spread of mobile apps, you can just scan a code to pay a merchant; that’s WeChat Pay and Alipay. OS providers have started to do this too. At the operating-system level within your phone, Apple Pay and Google Pay provide the capabilities to use the proximity sensors or biometrics (Face ID or Touch ID) to process payments. These are all traditional payments, which use traditional finance.

In Web3 (the blockchain space), we are introducing a new type of acceptance network, called Card Pay. The acronym “Card” stands for “customer acceptance” and “revenue distribution”. This is a new type of network that allows you to use Web3, WalletConnect, stablecoins, and other reward tokens as a way to augment the current payment ecosystem.

Card Pay is a DeFi payment and reward system. It consists of

  • a Web dApp, which is the Card Pay dashboard, and
  • a mobile app, which is the Card Wallet.

Web dApp for supplying tokens and issuing cards

In the Web dApp, we use layer-1 and layer-2 technology to onboard token value from Ethereum mainnet (layer 1) onto the cheaper and faster xDai chain network (layer 2).

If you have tokens or stablecoins on layer 1, you can stake them in the CARD Protocol reserve pool to become a token supplier in exchange for a reward (be it a percentage of the transaction fee or some sort of staking reward). You will receive an equivalent amount of tokens on layer 2, which you can then use to issue prepaid cards — cards with preloaded balances. These cards are basically wallets that you can give to people or sell to customers. You could even become a merchant who accepts those prepaid cards as a payment method for products and services. This is all configurable within the Card Pay Web dApp.

The users don’t have to deal with any of these crypto aspects though. They also don’t have to pay the high fees of Ethereum mainnet. All they have to do is connect the mobile app with the dApp (e.g. with a storefront, with a merchant, or with another user) and then pay directly. A merchant can use the same mobile app as a point-of-sale device; you can actually scan each other’s QR code between two phones and settle the payment using our layer-2 technology that is based on the Ethereum smart contract.

Issuing a prepaid card

The Card Pay Web dApp, which we are using to onboard new users, is based on a general-purpose workflow system.

This workflow system guides users through all the (sometimes rather complicated) steps that cannot be done with today’s dApps. Usually, you have to switch between four or five different dApps and figure out how to use MetaMask to get things done. With Card Pay, we streamline this process for you.

For example, this particular workflow allows you to create your own prepaid card in a few steps:

  • Customize the layout — what do you want your card to look like and how do you want to display your issuer name?
  • Choose the face value — how much money do you want to put on the card and which of your bridged tokens do you want to use to load it up?
  • Confirm the transaction — use your mobile app to approve the funding and your card will be issued.

At the end, you receive an Issuer badge in the form of a little NFT, because you have now become a prepaid card issuer in the Cardstack network.

You can use this workflow to issue prepaid cards for your customers to buy; or you can give them to your aunt or friends, so they can use cryptocurrency without having to do all this bridging and setup themselves. Issuers could even be centralized exchanges; prepaid card issuers are basically like different banks or organizations that create credit cards for users to use as payment methods.

Mobile wallet for biometric payments

Once you have a prepaid card, it shows up in your wallet, ready to be used for payments. The wallet supports both prepaid cards backed by stablecoins (which are close to the USD value) and reward cards that wrap the value of community or other tokens (which may be volatile). As soon as you select the payment method you want to use, you can pay by confirming the transaction with your Face ID or Touch ID.

That’s when we actually pay the merchant, settling the payment on the layer-2 chain, using tokens backed by layer 1. When the merchant has earned enough, he/she can claim those earnings into a Gnosis Safe (a smart-contract wallet) and withdraw them in bulk to bring them back to mainnet, e.g. to a decentralized exchange, and trade them for some other currency or even off-ramp them through a service provider to exchange them for fiat.

DeFi price feed for exchange rates

Recently, we announced an integration with Chainlink, as Card Pay will use Chainlink price feeds for rate locks.

Price feeds are very important for a payment system. When you travel internationally, for example, and you pay with your Visa card, a conversion has to happen. Sometimes, you’re shown that conversion when you’re checking out, so you can confirm that you agree with the rate. In those cases, you really have to figure out yourself if that rate is fair, too high, or too low. But with DeFi, we have a very reliable price feed based on actual trading activity between people on decentralized and centralized exchanges.

We use those prices to determine how much something is worth. What is ETH worth? What is a stablecoin like DAI worth? What is a community token like CARD worth? Based on that, we can display to users what their balance is worth and how much purchasing power they have.

The price feed is not only used to display users’ purchasing power; it is also an important aspect of the revenue pool, determining how many tokens we need to withdraw from your prepaid card to give to the merchant when you pay for a product or service. When a merchant prices a product at $50 USD, the payment has to be worth $50 USD. So, if the stablecoin is worth more, the protocol requires a little less DAI to fulfill the payment. The merchant receives exactly the number of tokens necessary to fulfill the $50 USD and takes on the risk of the exchange rate from that moment forward.

That is especially useful when you’re paying in a volatile token. Instead of having to agree on a rate lock with the other person via Telegram, your rate is automatically determined by a DeFi price feed, which has a network of validators and data providers that ensure the most accurate and fair price:

  • one price
  • no spread
  • no margin
  • no exchange rate fees
  • no profit being made by an exchange

That’s how we apply the DeFi price feed, which is typically used in trading, for payment use cases. Our aim is for Card Pay to provide both the usability and the simplicity of credit card payments in an international country, with the advantage of knowing that the right (and fair) amount of money is being deducted from your balance and paid to the merchant.

Virtuous cycle: create, launch, transact, reward, build

Once we have launched the payment protocol that provides economic bandwidth (Card Pay), we create a hosting system for Web3 apps (Card Space). Then, we extend that through a community-driven effort, as developers can contribute new software to the software catalog (Card Catalog) that can be used and, more importantly, paid for using the revenue distribution mechanism we have built.

“This is really a symbiotic relationship. These are not three different applications that are trying to do three things. They’re part of this virtuous cycle that we try to create at Cardstack.”

– Chris Tse, Cardstack Founder

Web3 is about having a slice of the decentralized Web. In this virtuous cycle, you can create your own space where people can transact. Based on those transactions, the developers, designers and many others get paid, which allows them to build new software and products. This is all within the Cardstack platform and the cohesive user experience that brings it all together.

What is Cardstack all about?

“We are really about building a software ecosystem that is general-purpose.”

– Chris Tse, Cardstack Founder

We want developers to come and build new capabilities on top of our software framework, because Cardstack is extensible. And all these extensions are monetized. This way, we’re going to build a larger and larger community of developers, who can see this as a way to express their will and follow their desire to share their knowledge. They get to share and monetize their software, without it being locked inside Google or Facebook. It’s open-source software, built on an open value system with an open distribution.

We’re working towards this vision to bring the community together and grow each part to create a cohesive experience, so that people will think of Cardstack as the experience layer of Web3, where they can learn how to leverage all these Web3 and blockchain tools. Our goal is to make Cardstack as easy to use as Alipay & WeChat Pay and as convenient as Visa & Mastercard.

Learn More

Watch the full video here, including a sneak peek into the Card Pay dashboard!

Chris Tse, Founding Director of the Cardstack Project, talks about Card Pay — the DeFi payment and reward system.

Interested to learn more?

Check out the resources below:

Introducing Card Pay: The payment & reward network for creators
Watch the video | Read the article

Card Pay Protocol: For a New Software Economy
Watch the video | Read the article

2021 Roadmap: Card Pay, Card Space & Card Catalog
Watch the video | Read the article

To get all our latest updates, sign up for our newsletter on cardstack.com, star Cardstack on GitHub, and join our Discord channel or our Telegram group and announcement channel.

--

--

Cardstack Team
Cardstack

Official account for the team behind the Cardstack project.