Code (KIN): L2 Solana Payment
What is Code?
Code serves Solana-based payments instantly and privately. The Code team has built three consumer products for the web: digital banknotes, money links, and micropayments.
"Digital Paper Cash" enable instant cash transfers by scanning QR codes within the app. Since the UI/UX is slick and there is 'haptic feedback', the experience does feel like passing real cash. Watch the video for yourself below 👇
"Cash link" is a feature that allows sending money via any messaging service, without the Code app itself. Watch the video below 👇
These first two products are very seamless. They are clearly designed for the mass retail market and summarise the messy underbelly of blockchain. But the Code team has already recognised that these two products have yet to find suitable market adoption.
"Micropayments for the web" is Code's third and latest product. It's still in beta, but there are already seamless demonstrations. The concept is to give developers the ability to charge users from 1 to 100 cents. This is the use case that everyone wants - paying 25 cents to read one article rather than having to sign up for a perpetual subscription. Uniquely, this is made possible by Solana. Because Solana is fast and cheap, Code payments are instant and free.
Micro Payments
For a dozen years, micropayments were considered "almost a success". But even in 2024, we still find transaction fees very expensive and unreliable. We were told we'd have flying cars, but it turns out the world's latest innovation is an $8.41 USD fee for an international money transfer.
Wise
Banks, governments, big tech companies, and even Satoshi Nakamoto have tried to solve the micropayment issue. So far, all have failed.
The fundamental problem with micropayments (defined as transactions under $1) is that they are too small for centralised companies to make a profit. The costs of the traditional financial system prey on the profit margins of everything. For micropayments to work, the movement of that money must be free.
This "free" problem is difficult to solve. Even blockchains that are reputed to be able to get rid of middlemen and allow P2P transfers are overwhelmed to achieve this.
Visa Crypto
Solana is likely the closest blockchain to free. As Visa explains:
"Solana's transaction fees are not only affordable (typically less than $0.001), but also reliable. This reliable, low fee level is what attracts its network to explore the efficiencies and cost savings of traditional payment operations."
In fact, Solana is so cheap that it makes sense for applications to subsidise consumer transaction fees. We've already seen teams like DRiP, Helium, and Dialect do this. And now, Code is doing the same for micropayments.
Code Background
Code was founded by the makers of Kik, the viral messaging app.
Kik's value proposition was simple: free text messaging. Some may remember that text messaging was not free before. Kik also had new features at the time, such as tracking when messages were sent, read, and captions while people were typing. Kik was the first to turn mobile text messaging into an immersive experience.
Within months of Kik's rise, several Chinese messaging apps copied Kik's feature set. In 2010, Tencent (a huge Chinese media conglomerate) launched a new mobile app called "WeChat," largely a clone of Kik. A few years later, after adding billions to its valuation, Tencent "thanked" it with a $50 Million investment in Kik at a $1 Billion valuation to build its western version of WeChat.
Kik's ambition to build its western version of WeChat centred around payments. WeChat has grown to dominate the financial lives of the general Chinese public, and the western world has nothing similar. "Kik Points" was the first step towards WeChat-style payments in its centralised version. This attempt failed as the team got stuck in the maze of traditional financial regulations. So, the Kik team pivoted to crypto and launched $KIN (an ERC-20 token on Ethereum) as the next attempt to spur the economy in its messaging app. But Ethereum's high transaction fees and long block times thwarted this effort. Kik then moved KIN to Stellar because it was faster and cheaper. In the end, even Stellar wasn't as "stellar" as its name suggests. So the KIN team forked the Stellar blockchain and installed a faster and cheaper fee model. Even that failed. Eventually, Kik switched to Solana, even before the testnet launched! In fact, Kik was the first team in the world to announce they were building on Solana.
KIN inspired other EVM-based projects, such as Helium and Render, to migrate to Solana.
Along the way, KIN overcame some serious difficulties. The SEC went after KIN for its ICO in 2017 and endured a lengthy court battle. The end result was quite favourable, a $5 Million settlement fee that did not require Kin to be registered as a security.
Now, KIN is an SPL token on Solana. While Kik has backed out of this ecosystem, Code (led by Ted Livingston, the long-time founder of Kik) is taking the reins as the main team building KIN.
Watch Lightspeed's interview with Ted Livingston below, which discusses crypto opportunities in micropayments and Code's big announcement!
Code & KIN
Code has a history of being a team that likes to "go against the grain" and has proven to take the right steps. Building in Solana was their first bet that differed from the general consensus, and that was while the idea was still notes on Anatoly's whiteboard! Their second bet was to build an L2 in Solana. And their third bet was to build a Code around KIN, a free-floating currency, rather than a stablecoin like USDC. Currently, KIN is the only token that Code users can hold and send.
At first glance, this is strange. People are paying with dollars, not KIN. The Code team has outlined the reasons KIN was chosen over USDC. Their view is:
- Stablecoins aren't crypto, because they can be frozen at will by a centralised authority.
- No one uses USDC for payments in the real world. What people want is USD, not USDC. Bitcoin has no marketing team.
- BTC is an asset with a free-floating price, and that's a harmonising force. If the price of KIN rises, the use and adoption of Code increases.
- If KIN falls, its usage decreases. However, the amplitude of growth is more asymmetrical upwards than downwards.
These four opinions are "different", but very intuitive. Number #4 is the most interesting because the pros outweigh the cons. Just as BTC's price rise fuelled adoption, Code is attempting to do the same with KIN. Despite the view that "volatility is a bug", Code sees it as "a feature".
It's worth noting that KIN has a variety of unique attributes. Perhaps most notably, KIN is one of the few tokens that has received regulatory clarity from the SEC.
KIN is also fully decentralised, with no organisation or website. Market Cap = FDV (Fully Diluted Valuation), meaning that KIN is already fully distributed with 0% inflation.
When the KIN Foundation was closed, its community voted to burn their token reserves along with Kik holdings. In total, around 7 trillion KIN (70% of supply) worth $156 Million at the time were burned.
The market initially reacted positively to this KIN token burn, the price jumped +300%, before correcting again and downplaying one of the largest crypto asset burns in history.
Zoom out, and it appears KIN is still down 98.7% from its ATH point. Despite the 70% reduction in its total supply, KIN has been ignored by the market.
Going forward, KIN's path to revival depends on Code's success. If Code can attract users to its app and scale its micropayments, then demand for KIN will rise as long as people need it for transactions.
KIN's "fully decentralised, inflationless, regulation-approved" narrative has good potential. KIN's tokenomy is also solid, although ideally there would be additional value-generating mechanisms as well. KIN's buying pressure is what investors need to pay attention to. The team has seen a glimmer of hope in the market following the launch of its micropayments SDK, with over 800 developers using it in their projects. A promising start, but more is needed.
Code's technology
Code's technology stack is the reason behind its seamless, instant, private and reliable user experience.
- Instant: While Solana is fast, it's not instant. When dealing with money and payments, latency creates stress and bad experiences. Payments should be instant.
- Private: While Solana is pseudonymous, it is not anonymous. Lack of privacy is one of the big barriers to mass adoption of crypto. The payment should respect privacy.
- Reliable: While Solana is reliable, it is not always so. The network is prone to outages, and that will hinder the mass adoption of payments. The code was not always smooth at first.
The developers had a lot to do. As mentioned above, the original Kik team moved from Kik Points → Ethereum → Stellar → Stellar fork → Solana. Well, the Code team also learnt that even the fast and cheap Solana is not perfect. There are still many things that Solana can improve and enhance. Hence, the Code team built Sequencer-or "Layer 2" in Ethereum parlance.
Amidst the controversy of debating "what L2 really means", we can call Sequencer Code as L2 because it locks funds in a contract and relies on the sequencer to execute transactions. This is similar to Optimism and Arbitrum. But, unlike most Ethereum L2s, Code has built in "emergency exits" that can be used right away. If the Code Sequencer goes down, users can "exit" and access their funds on the main L1 Solana with Timelock Explorer.
Sequencer Code is the secret ingredient behind instant payments. When scanning a friend's QR code, the process is instant. And once the payment is made, it is instantly finalised. The sequencer itself is non-custodial, meaning it does not hold the user's funds or private keys. The Code Sequencer only schedules signed transactions.
The Sequencer's job is to maintain the global state and run a simulation of the 'intent' of the transaction received. The Sequencer ensures that the state transitions are valid and have proper references. The received intent is then scheduled and forwarded to Solana's L1 asynchronously. This differs from Ethereum's L2, which "rolls up the pool" of transactions to save costs. Sequencer Code can forward transactions immediately thanks to Solana's low fees.
When there is a user intent, a series of behind-the-scenes (backend) actions need to be performed to fulfil the user's intent.
- These backend actions may consist of transactions with a durable nonce value provided by the Sequencer Code.
- The transactions are then signed and sent to the Code Sequencer.
- The Sequencer Code then validates the transactions and schedules them to be forwarded to the Solana blockchain.
This 'intent' that I mentioned earlier is the "desired intent" of the user, without mentioning the actual form of the transaction in the complex language of blockchain. The Code Sequencer's job is to translate that intent into a blockchain transaction that needs to be done to fulfil the user's wish.
Let's say you want to withdraw funds from the Code app and transfer them to a Phantom wallet:
Intent = "Withdraw 100 KIN to Phantom wallet"
Sequencer Code = Action "Open multiple Timelock accounts and transfer funds to destination accounts"
Sequencer Code = Transaction "Scheduled to move funds from account FxNp...WPVy to account CMx1...ds1A"
Solana = Instruction "-100 KIN FxNP...WPVy and +100 KIN CMx1...ds1A"
From a developer's point of view, intent removes complexity. The focus becomes directly on the intent and let the Sequencer Code handle the rest. Intent also removes the complexity of blockchain on the user side. All we have to do is state the desired "intent", and Sequencer Code will handle all the behind-the-scenes chaos.
Intents help get rid of Solana's complexity, but they don't guarantee instant transactions. For this reason, Code has built a Timelock programme. This Timelock programme enables a simple 'state-channel', as described by Vitalik Buterin and Jeff Coleman.
https://twitter.com/aeyakovenko/status/1679257167713689602
When combined with a 'durable nonce' (which provides a way for transactions to be created and signed that can be sent at any time in the future), the Timelock Programme guarantees the availability of funds on a non-custodial basis.
The Splitter Code programme is the last piece of technology we will cover - please check out the Github Code for all the rest. Tokens are usually transferred to their destination in one single instruction. However, 'splitting' the transfer into multiple deliveries can offer privacy protection, by making it harder for the funds to be traced back to their source of origin.
Code enhances privacy through an approach called "anonymised amounts". When a user makes a payment, the Code app automatically breaks down the payment intent into multiple transactions. The sum of all those transactions is always equal to the original payment amount.
More specifically, the Code app stores balances in multiple accounts. Each account is associated with a different denomination, which is derived from their private key. For example, my balance may be stored in 7 accounts, each with a different denomination. The sum of my balance is the sum of all 7 accounts. Think of it like how you would tidy up Monopoly money.
When we make a payment, the Code app breaks down the payment intent into multiple transactions, each of which comes from one of the denominations. For example, if Alice paid Bob 70,212 KIN, the Code app would break the payment into 7 transactions. Each transaction is a different amount, but the total amount of all transactions is the same/equal to the original payment amount.
There are various other new mechanisms. Code is built to achieve stronger privacy for users' onchain transactions. Importantly, they are all invisible. They are just part of the experience of using the Code app. Users don't need to go to Tornado Cash or turn on special settings; privacy is embedded in Code from the start.