Ask Me Anything — Part 2

#CardstackAMA: Behind the scenes of the Cardstack Project

Cardstack Team
Cardstack
17 min readApr 22, 2021

--

Chris Tse, Founding Director of the Cardstack Project, hosted an AMA session on April 12, 2021, where he answered various questions from the Cardstack community. He spoke about the products to be launched this year and the benefits they bring to users & developers. He also addressed questions around Cardstack’s strategy, crypto aspects, and the technology behind the project, among many other topics.

How can Cardstack facilitate and improve developers’ work?

Developers are overwhelmed. The modern tech stack for JavaScript, especially the “full stack”, is getting taller and taller and taller — with JavaScript, APIs, authentication, cloud, databases, etc. If you add Web3, wallets, transactions, DAOs, NFTs, gas fees, and meta transactions to that, it becomes too much to handle.

We improve developers’ work by unifying everything, so that you only need to work with one SDK. We code-generate or adapt to existing APIs that are already part of the platform. We reduce the surface area of what a developer needs to learn by saying, “You’re just building this one thing that shows up in this corner of the box on the website.”

Once you put in your content — which could be an audio card, a 3D visualization card, or something else — you don’t have to worry about how to store it or whether it will be anchored on the blockchain. As long as you use the derivation of an asset through the card adoption chain, you get the capability for free.

Essentially, we focus on reuse. As a developer, you can start with a card — a primitive that exists in the catalog. This is your starting point, the same way you can start with a WordPress theme and then make your modifications and add your enhancements to it. When you make those enhancements, you know the card has all the upstream capability. This is where WordPress themes are different because a lot of them are proprietary. Our hope is that all the cards, functionalities, modules, and plugins within the Cardstack ecosystem will be 100% open-source. So you can actually drill down and debug all you want. It’s all about reuse — building on the shoulders of giants and using the JavaScript module catalog idea of importing and using existing packages, but doing it the front-end, full-stack way.

As a JS developer, how can I get rewarded for participating?

The first way to get rewarded is that you directly monetize your card. We have learned from digital marketplaces like Roblox that you can sell digital goods, such as DLCs and additional items, within a game. So, if you’re creating a new card as a JavaScript developer, you can say, “To use my invitation template with its fancy animation, you have to pay $5 to add it to your account. Or, if you have a membership badge, you are entitled to use this set of cards that I have made for my members.” It’s similar to buying an open-edition NFT.

The second way to get rewarded is that someone uses your code, e.g. your animation library, as a foundation for their own work, which then becomes really popular. In that case, you want to get some sort of downstream royalty. That is why we need the on-chain records as a way to monitor the propagation, relationships, provenance, and derivation chain of cards. We want to use Tally as the analytics system that determines the value you get.

Can I clone the source code of a card, modify it just a little, publish it, and collect all the rewards? Can you prevent this kind of fraud?

This is like making trivial edits to someone else’s work, then claiming that you own it, and getting all the money. It is very hard to do that in our system because we use JavaScript package management. If your card is derived from an existing card, we know that you’re importing those libraries. So, if you are making extremely trivial changes, we know. This is like forking a project. In the Git-based open-source world, we can tell when a project is imitative and not original, due to its lineage.

Of course, this requires community governance; it is not free. People have to look at it and report it.

But this kind of fraud is challenging, because users always pull cards from the official Card Catalog. So, if you fork a card and make a modification, you still have to put the card back into the Card Catalog in order to get it to the user. And to do that, you need to be a developer in good standing within the Card Catalog ecosystem and the membership system. So it’s like saying, “Okay, I made a fake bag, but now I have to go back to the official store and try to sell it there.” It won’t work. That’s how we make sure that people don’t make counterfeit goods and pass them off as their own.

And if you were to put your work in other marketplaces, it wouldn’t integrate with Card Space and the wallets as smoothly.

Do you think Cardstack will share in the Ember.js ecosystem and possibly replace Ember.js in the future?

We share in the Ember ecosystem because it’s a framework we know very well. We have team members who have been long-time supporters and contributors to the Ember ecosystem; Ed Faulkner, our lead developer, is on the steering committee of Ember.

The way we see it, frameworks go through popularity cycles; something’s popular, something’s not popular. But one thing we know for sure is that Ember, as a codebase, is incredibly solid. It can support a really large Web app, including those with 400–500 developers working on the same Ember codebase. We see Cardstack as a very big app too. Every component and every module that is submitted to the Card Catalog actually runs inside one JavaScript app.

Ember is also designed to be easy to onboard. If you are a developer who doesn’t have Ember experience, you can learn it. So, we’re not going to replace Ember in the future, but we want to make it popular again.

When iOS first came out, people were saying, “I would love to build iOS apps. How do I do it?” Well, it turned out that you had to learn Objective-C, which wasn’t the most popular language at the time. But if there is an app, a runtime, a set of libraries, and an SDK that people want to deliver the experience through, developers will learn the tool. A developer who knows React or Vue can pick up Ember in about a month, become extremely proficient, and tap into all the modules and libraries we have already integrated into the full-stack framework. So, we will grow the ecosystem and bring more people into this extremely productive framework.

However, it will be possible for you to write a card in React, Vue, or something else that may become popular in the future as well. That’s because the way we’ve thought about embedding JavaScript is that the card itself can have alternate encoding or syntax, as long as it renders within this Document Object Model (DOM) within the Web browser. Because Cardstack and CatalogJS (our component model) work at the JavaScript level, not at the Ember level, we can certainly support cards that are written in different ways. The overall environment — the app with the drag-and-drop tools — will be in Ember. But for developers who don’t want to learn Ember, we’ll look to support React and Vue as alternate ways of building cards.

How are oracles appointed, governed, and checked against fraud?

Let’s distinguish between two types of oracle.

1. We need oracles for exchange rates. If I know that you are paying with a stablecoin, I want to know how much it’s worth. If you are paying with a token that’s not a stablecoin, I want to know what the conversion is, either through a DEX or some other mechanism. For those pricing oracles, we don’t have to solve that problem.

We would like to integrate with the technologies from existing oracle providers like Chainlink or DIA. We want to use those oracles that already have some sort of diversity and decentralized aspect when we launch Card Pay. And those are not owned by the Foundation. They are in the network of the oracle provider; we are citizens of Web3 and the existing oracle infrastructure.

2. As for being able to compute our own information, we will make a decentralized, computational oracle infrastructure for the analytic function. There will be a sortition scheme, where every node is doing the same analytics. Then, based on on-chain sortition, we select three or four different oracles, get their results, and find the median of what’s reported.

Which part of the Cardstack technology are you most proud of, which can hardly be done by competitors?

We are most proud of the JavaScript framework for the Card SDK — the ability for us to define the schema of a card (the fields of the forms, the criteria of the collections, and the hierarchy of the nesting), to build in one template and have it generate code, persist it, move it, and allow it to exist. It’s almost like bringing the idea of a file, which you own on your thumb drive, to software. If you create a record for a customer, you can actually download the record to your thumb drive and then have it render on your computer 10 years later with a codebase. It’s the idea of software as a tool — where the software is not tethered to a particular URL and a particular software-as-a-service (SaaS) company, but actually floating around, while the state (the resource itself) is rendered by an open-source library.

That has nothing to do with crypto or Web3, but it has everything to do with the next generation, the next era of software — going from a product to a service and from a service to a tool. That’s our superpower — that we can decompose everything that’s in the app store (the SaaS model) into components that can be put back together. We’ve learned that composable Lego blocks really work. So, the wrapping app, the part the user sees — that’s the composability we’re working on, and we don’t think anybody is remotely close to what we have already done.

What is the biggest obstacle the project is facing right now? What are possible solutions?

We have to be aggressive in trying to land-grab, telling people, “We are Cardstack, the Web3 framework / WordPress of the next era. You should use us as the starting point.” However, the project is still a technically sequential project. We need to finish this in a precise order.

So, there is a bit of a conflict in terms of how fast we can go, as we are trying to create a system for payments, hosting, DAOs as part of Card Catalog’s governance, and rewards to get people to start using the network. These are all separately solvable problems, but we have to bring them together in the right order.

Meanwhile, as all this excitement in the blockchain and Web3 space is happening, we want to make sure that we can bring something to the market, take up some space, and have people recognize that this organization (Cardstack and its community) is doing something real. In addition, we want to be able to constantly surprise them with the size of it all, going from Card Pay to Card Space to Card Catalog — from a payment system to a decentralized Web hosting system to a software distribution system.

This is something that has to be done sequentially because it’s technically sequential. Also, from a market point of view, gradual growth improves people’s perception of what this project is. At the same time, we want to prove to people that this is actually live, that this is something they can be part of, just using their phone.

I think the solution lies in being deliberate, being as diligent as possible in taking each successive step, and then being bold — telling people where we’re going unapologetically.

Does Cardstack work without the blockchain?

Yes, Cardstack works without a blockchain too. If you want to create a new content website with text cards and rich-text cards, using Cardstack to publish your content on the Internet for free, with Card Space as your hosting service, you don’t need the blockchain.

However, we do have to know who you are and we use a wallet to give you an identity. So, when you have a wallet address (an 0x address on your externally owned account), we’ll use that as a proxy for your identity.

Now, if you want to create a subscription system so that people can pay you, you can use Card Pay — but then, you do need the blockchain.

A lot of people try to stick blockchain beneath their project to make it a blockchain project. With Cardstack, it’s the other way around. As decentralized SaaS, Cardstack gives you access to the infrastructure of the Internet. It just so happens that the blockchain has become another piece of that infrastructure in recent years. So, if you’re building an app, of course you’re going to tap into it.

But we see Web3 and blockchain as part of the toolkit. If you need to use blockchain, use it. If you don’t need to use blockchain, don’t use it. The important thing is that we are compatible and designed with the types of transactions and affordances that blockchain provides, and we want to bring that to the market.

Do you think the volatility of the token price can negatively impact end users?

It definitely has a negative impact when you don’t know how much something is. If you denominate something in ETH, for example — NFTs are usually denominated in ETH, because it’s cheaper to buy an NFT with ETH than ERC20 tokens, from a gas point of view — it’s really confusing. You ask yourself, “What is the real price? Did you intend for this NFT to be four times more expensive, now that ETH has gone up four times?”

We believe that products should be priced in something that is relatively stable. Then, you can say, “With the tokens I have in my wallet, how many of them do I need to pay this stable price?” At Cardstack, prices are denominated in Spend (§1 Spend = $0.01 USD). With 1 Spend being 1 USD cent, it is like a mileage point, similar to airline miles or credit card points or V-Bucks. We’re using this game-inspired currency for pricing in the Cardstack network, and that spend is what we write to the blockchain. Then, we convert it to the stablecoin or token that is needed.

If your token goes up and down in value and you want to make a purchase using that token, we’ll use an oracle. We’ll use an existing decentralized exchange to convert your token to the currency that the merchant supports. This is exactly the same thing that happens when you’re travelling internationally with a credit card that is denominated in Australian dollars, for example. When you go to Singapore and swipe the credit card, the money is transferred at that time in that terminal. We’ll do the same thing via the Card Pay protocol.

When are you planning to add liquidity to platforms with multi-chain launch capabilities, like Zero Exchange?

Decentralized exchanges (DEX) are important. A DEX is how you do currency conversions at the time of payment. If someone has a certain stablecoin and wants to buy something that requires another currency, or vice versa, you want to be able to script together the best price you can get.

Uniswap is the big player on layer 1 for large denominations (the amount should be big enough to make the $20–80 gas fee worthwhile). But there are other types of order books too. The 0x protocol, for example, has an off-chain order book and on-chain settlement. That is a little bit better. To the degree that they support the layer 2 we support, this could be interesting for us.

We are looking very deeply into various DEX protocols, including Kyber and 0x, to see if there’s a way for us to leverage some of the innovations and bring that value into the workflow. We do not integrate a DEX just to have a DEX integrated. We integrate it so it can improve the usage performance and experience. That’s what we focus on at Cardstack.

In which phase would you consider identity platforms like y.at?

What y.at shows us is that identity is an NFT. You can select and mint an NFT for three emojis and say, “I own that.” It’s almost like reserving a domain name, which you then use as an identity. The idea of buying emojis or reserving names you want to be known as is fun. But it’s not really an identity.

We actually think it’s your Ethereum address or your long 0x string that identifies who you are, that allows you to accumulate history and take actions.

Anyway, we believe that identity is something that people will assemble in their wallets. You may have many different types of aliases, e.g. a .eth address, an image, or a CryptoPunk. These kinds of NFTs — whether that’s ENS or HNS or something else — are extremely fun and interesting, so we would like to support those.

Will the current CARD tokens be used for the wallet and give benefits to those who hold them?

The CARD token is modeled as a payment and reward token. You can certainly pay for things using CARD tokens, in which case we will get the conversion rate. Sometimes, the conversion rate may have a discount or a bonus to it, so it’s cheaper to pay with CARD than it would be to pay with stablecoins. But the most important thing is that people who don’t have CARD tokens, but who are using the network, spending stablecoins, paying with Apple Pay, etc., will earn CARD tokens the same way you earn miles or credit card points. Then, they can redeem those points.

But here’s the thing: The membership level — the ability for us to unlock features — is based on the number of CARD tokens you have or the time you acquired them. These rules could make you want to accumulate the tokens, the same way you earn experience points in a game. You can certainly use them, but you can also accumulate them for other purposes, e.g. to level up. So, we are applying some game dynamics here to make the tokens useful in three or four different ways. It’s like saying, “The CARD token is a super token. You can do all these different things with it.” How you use it depends on who you are and what you’re aiming to do. We want to provide the tools and the mechanism for you to do what you want to do, but how you end up using the token is up to you.

Why is the project not very exposed in the crypto sphere?

The crypto sphere, like any sphere, is quite insular. You have to speak the lingo of the day. Right now, people are talking about NFTs. Before, they talked about DeFi. Before that, they talked about scaling Ethereum. And people will talk about Web3, asking, “What are the Web3 solutions?” Right now, they still think that Web3 is about domain names or storage or decentralized cloud and things like that. But there’s a big missing piece.

Where’s the app? Yes, you have an index with The Graph. You have storage with Filecoin. You have DNS with ENS and HNS. But where’s the app? Where’s the user experience? That’s a huge missing point in the discussion around Web3; people are just ignoring the website itself.

We believe that people will get there. Sometimes, you just go where you believe people will show up. It’s a strategic position that’s not occupied by anybody. We’ve invested a lot of time and energy to make sure that we can serve the people when they show up. They will show up and then, suddenly, boom!

It was mentioned that you could spend your stablecoins. Can I spend my on-chain CARD?

Generally, you can spend any token that is accepted by the merchant, and there is an allow-list of stablecoins that are accepted in the network. Now, if you want to use something that’s not a stablecoin and the merchant doesn’t support it, we convert it to a currency that is accepted by the merchant.

Can a merchant be my local grocery store?

Digital goods are easier to do, so that’s what we’re focusing on; but the great thing about WalletConnect is that you can scan a QR code, click approve, and then use your Face ID to confirm the payment. This is how Alipay or WeChat Pay work.

We want to enable people to have a little screen in their store, so customers can scan the QR code and pay that way. But here’s the important thing: You’re not spending your Bitcoin and Ether. You are using crypto rails to spend your balance that you may have loaded via Apple Pay or earned through other transactions with merchants.

The crypto rails are getting good enough and layer-2 transaction fees are low enough to make it possible for us to actually use WalletConnect for this capability to do transactions. It’s not the first priority, but it’s certainly possible. There’s really no difference between a screen with a QR code that you scan on a dApp on your desktop and one that you scan on a little iPad in a grocery store.

Is Tally decentralized, trustless, and ready for launch?

With Tally, we always know that, when you have captured enough state stored on the blockchain, we get to a point where nobody knows what’s going on anymore. If you take Etherscan, for example, that is not the world’s best way to have an understanding of what’s going on in the blockchain. You get the details, but you’re too much in the weeds.

Tally is about running analytics on top of raw blockchain data. Analytics systems are now offered by some centralized platforms. You can subscribe to an expensive service that will analyze the blockchain and give you a dashboard. There are some systems that are open-source too, but they are difficult to use. Tally is all about taking that information, aggregating it using a network of nodes that run the same computation, and selecting a subset to report back on-chain. Does that sound familiar? That’s an oracle.

In other words, Tally is an analytic oracle. It’s an oracle that’s not just doing some basic median averaging. It’s actually doing real computation and reducing the dimensionality, to arrive at a number so that we can then say confidently, “This is the number that can go on-chain.” It’s something we’re continuously working on.

The decentralized aspects are a different challenge. We have a data science team working on analyzing the data that we put on-chain. Initially, this is somewhat centralized, using a data science tool. Independently, we’re creating the decentralized capability for running nodes and using a sortition scheme. There’s a lot of good work on implementing on-chain sortition, especially from folks at the Keep Network — so we’re using their codebase as a reference for a sortition scheme.

Card Pay is currently using a very simple version of Tally, which aggregates the amount of tokens you have earned and can redeem based on your spending history. But you can imagine that this basic off-chain Tally can become a much richer and more interesting set of tools that can be leveraged for making newsfeeds, recommendations, or deciding whether someone has violated a rule.

These are all capabilities that are in the centralized AI regime, where people with the centralized power are using it to control people. We want to decentralize the AI aspects of it, so that those types of algorithms don’t control your life, but are published via these trustless nodes. That is a major part of our project, but it is the second phase of what Cardstack is all about.

Learn More

If you missed the live stream of the AMA, you can watch Chris Tse answer the questions above and many more in this video:

Chris Tse, Founding Director of the Cardstack Project, addresses various questions submitted by the Cardstack community.

This article is Part 2 of our AMA series, focusing on the crypto and tech-related questions Chris Tse answered in the video above. Part 1 covers questions about the different aspects of the Cardstack products.

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.