May 19: Inside Cardstack This Week

CARD Protocol, Card Pay, Gnosis Safe & Tally

Cardstack Team
Cardstack
3 min readMay 19, 2021

--

CARD Protocol

This week, we worked on completing the merchant processing loop in the smart contract that backs the CARD Protocol. The key capability is about ensuring that merchants can withdraw in bulk from the revenue pool anytime they wish, while customers can leverage the revenue pool for the clearance of payments, using the latest exchange rates between the stablecoins held by the customer and the price specified by the merchant (based on SPEND, which is $0.01 USD). We also added some safeguards to ensure that prepaid cards are loaded on-chain and must wait one block before payments can be made with those cards. This one-block delay reduces the risk of flash loan-based attacks, while costing nothing in terms of user experience and responsiveness.

Ask Me Anything with Chainlink

In an AMA session with Chainlink Labs host Andy Boyan, Cardstack founder Chris Tse spoke about our approach to exchange rates in our payment processing flow. They discussed the parallels between the Card Pay protocol and traditional payment networks like Visa or Mastercard. They also talked about merchant adoption, which can start out with digital merchants and then move to brick-and-mortar merchants by way of the Card Pay SDK.

Watch the full AMA here.

DeFi Payments with Card Pay

We have released a video that elaborates on DeFi payments with Card Pay. In this video, Chris Tse goes into detail about how Card Pay relates to the other products — Card Space and Card Catalog. The aim is to provide merchants with more and more tools to create their digital storefronts, while they can enhance the capabilities by tapping into the modular software catalog that will be launched later this year.

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

Gnosis Safes in Card Pay

On the mobile engineering front, we continue to integrate the various types of Gnosis Safes in the protocol into the user interface, leveraging the Gnosis Transaction Service in the back-end. The CARD Protocol generates Gnosis Safes, which are multisignature smart-contract wallets, to represent the following concepts:

  1. A prepaid card with a stablecoin balance
  2. A depot for bridging tokens from layer 1 to layer 2
  3. A merchant account for tracking earnings and receiving revenue from the revenue pool

All these concepts have slightly different visual representations in the mobile app and web dApp — which enables us to optimize the user experience — while sharing a common technical infrastructure and reusing proven, audited code from the Gnosis team.

Rewards via Tally

On our R&D front, we are pushing forward to deploy the necessary services to create the reward pool and the business logic for distributing rewards — based on spending, membership levels, and NFT ownership — via the off-chain Tally Protocol. We are also using the Gnosis Transaction Service (a Django-based application) as the initial implementation architecture for the off-chain Tally processor. This gives us easy access to transaction histories and balances that are already indexed and stored as part of the Gnosis Safe ecosystem. At the same time, it allows us to add new models to represent business logic and database queries that will enable us to calculate the distribution among all eligible wallets.

Merkle Payment Pool

We are extending an existing open-source library published by the Cardstack team, called the “Merkle Payment Pool”, to create a multi-token distribution system. This codebase will be included as a module in the CARD Protocol. It can also be used independently by other projects to leverage off-chain computation for determining criteria and reward amounts. This is based on arbitrarily complex logic that does not cost any incremental gas to compute; neither does it cost more on-chain storage to distribute through the smart contract. We are using this architecture to design the staking program for CARD coming later this year.

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.