May 5: Inside Cardstack This Week

Card Pay, CARD Protocol & CARD Token

Cardstack Team
Cardstack
3 min readMay 5, 2021

--

Card Pay protocol

We have completed a milestone, as we are doing repeatable and continuous deployment of our Card Pay smart contract to testnet. This allows us to immediately test new functionalities, enhancements, and bug fixes as we make them in our source code. All the infrastructure to support the Card Pay protocol on Kovan and Sokol is up and running. The infrastructure is also connected on Ethereum mainnet and xDAI mainnet, deployed with the same automation using Terraform.

Card Pay SDK

As a way to streamline the development of the Web-based Card Pay dashboard dApp, the Cardstack mobile wallet, and the command-line utilities, we have extracted the common capabilities into something called the Card Pay SDK. The Card Pay SDK provides an easy way for JavaScript developers to tap into our implementation of prepaid cards, supply depots, token bridges, and revenue pools. This SDK is currently being used by our internal developers, but it has been added to the main Cardstack monorepo to be part of our overall developer toolkit moving forward.

Card Pay dApp

On the Card Pay dApp front, we have finalized the workflows for token bridging, prepaid card issuance, and merchant payments.

These workflows share a common Boxel workflow and thread UI model.

Enhancements to both the design system components and the connections to the Web3 APIs are being done iteratively, covering more and more of the smart-contract capability via our guided step-by-step user experience.

CARD Token

We have added support for the Cardstack token to be used as a native gas token in all the smart contracts generated on the xDAI chain, to ensure that we can support gasless transactions on layer 2. This way, users will not have to acquire or swap for additional gas tokens like xDai or Eth. They can also use stablecoin balances to pay for gas, so they only need one type of token (whether it’s DAI or CARD) to complete the transaction on layer 2. It is worth noting that layer-2 fees are still less than 1 cent, which is negligible to the user, but which will enable lower-denomination commerce activity (e.g. buying something for less than $5, which is still economically impractical on mainnet).

CARD Protocol

As part of the CARD Protocol, we are implementing a reward distribution mechanism, so that customers, merchants, and token suppliers can receive rewards that are proportional to their spending, earning, and staking, respectively. The CARD token is one of the reward tokens that can be distributed through this revenue pool, but we have designed our reward distribution mechanism to support reward tokens from token communities, brands, and other partner projects as well. We have finalized the architecture for leveraging the revenue pool data on spending and earning (which is already deployed to testnet) as a source of on-chain records to power off-chain computations. This architecture will determine how much reward each wallet would get within the reward cycle. At the conclusion of the reward cycle, wallet holders will be able to send a single transaction to our reward pool, which allows them to redeem a set of tokens they have earned in that time in one step.

We believe that this capability will allow for many creative community building mechanisms, as on-chain activities can be rewarded by simple configuration through the Card Pay dashboard. This can replace the current error-prone method of using Google spreadsheets and manual on-chain payments to reward customers and community members. We will launch this reward system in a second release, following the launch of the stablecoin-based payment mechanisms.

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.