Interview with the team building UDT Swap

Michael Hasson
NervOS CKB Israel
Published in
6 min readMay 4, 2020

Previously, we laid out our thesis around the core value proposition of layer 1 public blockchains, and described our enthusiasm about the prospect of building a DeFi ecosystem with sustainable security on top of the NervOS CKB blockchain. In continuation of that theme, we are diving deeper into the “pillars of DeFi” and exploring the foundational use cases which enable a trust minimized financial system to optimally function.

In our other article, we review the new UDT token system which will enable the creation of custom tokens, similar to ERC20 on Ethereum. Once you have a new custom token, which can represent a variety of assets such as stablecoins, synthetic assets, NFTs, or equity stakes in on-chain businesses, it’s important to create decentralized exchange protocols for moving these assets around.

Why are DEX’s important? DEX’s enable programmable liquidity which then unlocks “composable” i.e. interoperable and complementary use cases between financial applications. Centralized exchanges, or any centrally controlled platforms for that matter, enable a small group of governors to decide if/when to close access to data feeds. Decentralized, open source architecture enables anyone building applications to access liquidity with minimal platform risk.

While there are many approaches to designing trust-minimized exchanges, Uniswap was the first DEX to break out and achieve meaningful trading volume within the Ethereum ecosystem. It is currently the most popular destination for trading non-custodially on Ethereum.

The overall volume of trade on Ethereum based DEXs has seen strong growth over the last year

Source: DuneAnalytics

Uniswap is an example of an on-chain exchange, and more specifically, one that uses the AMM (automated market maker) model. Hayden Adams, the founder, wrote an excellent blog post detailing the history of the project.

Uniswap’s AMM model is beautifully simplistic. In essence, any ERC20 token can be swapped for any other ERC20 token for which there exists a liquidity pool. The protocol works by rewarding liquidity providers (token holders) who contribute their tokens to liquidity pools to capture a small fee for every trade. The price of each trade is determined by the existing liquidity at the time of the trade and the impact that the trade will make on the pool size. The equation for determining price is simply x * y = k, where x and y represent the quantity of ETH and ERC20 tokens available in a liquidity pool and k is a constant value.

Source: https://en.cryptonomist.ch/2020/03/21/uniswap-guide-the-most-widely-used-dex-on-ethereum/

As an example, if a liquidity pool has 10,000 USD (pick your favorite stablecoin) and 50 ETH, the implied price is $200 USD per ETH. If someone wants to sell his ETH to the pool, he will increase the size of the ETH pool and decrease the USD pool. So for example if I sell 1 ETH to the pool, there will be 51 ETH and 9800 USD. This new ratio implies a price of roughly $192 per ETH. Most likely, this price change is not reflective of the price movement on a regular order book market. As a result, an arbitrage is invited to buy ETH, thereby increasing the USD pool and decreasing the ETH pool, bringing the price back to market equilibrium.

Uniswap has gained market leadership in the emerging Ethereum DeFi space due to its simplicity and transparency. It is viewed as a permissionless piece of the financial stack which developers have confidence integrating with. Uniswap V2 is launching soon with a variety of important improvements.

— — — — —

We were excited to see a team take the concept that Uniswap introduced and work on reproducing something similar on NervOS. Last week we spoke with the GrowFi team, who is building the first UDT Swap system for NervOS CKB. They were recently awarded funding from the NervOS Grant Program to build a UDT Token Swap system, something that could become a key piece of financial infrastructure for the protocol.

The GrowFi team are no strangers to DeFi — they founded the DeFi Korea meetup group and built GrowDrop, a platform for sustainable crowdfunding. As part of our work in expanding the NervOS English speaking community, we wanted to have an introductory discussion to build bridges with our colleagues in Asia.

Lionschain: How did you guys get involved with NervOS?

Team GrowFi: We heard about NervOS in 2018 and thought the architecture was unique and interesting. We met Daniel at a meetup and decided to work on building the community in Korea. Today we have 400 members in the Korean NervOS Telegram group.

Lionschain: Great, so tell us about what you’re building.

Team GrowFi: We are building a token swap system based on Uniswap. It is designed to work for the new UDT token standard. There are some differences for example we leverage a system of multiple pools. Also we enable swaps between any tokens.

Lionschain: Can you give a sense for the challenges you are facing, since we know that the UDT architecture is still being defined?

Team GrowFi: The generalized UTXO / shared state model creates some conflicts. For example, pools can only be accessed by one person at a time. We counter this by creating multiple pools. This can lead to some complicated rebalancing issues between pools. If there is a failure, a user can access a different pool. Because only one person can change the state of a cell at a time.

Lionschain: How many people are on your team?

Team GrowFi: There are 8 of us.

Lionschain: Did you raise outside capital?

Team GrowFi: No, so far we have been funded by ecosystem grants.

Lionchain: Can you tell us about your previous work in DeFi?

Team GrowFi: We developed GrowDrop, built on Ethereum. It is a crowdfunding platform. We enable supporters of a project to deposit to Compound, and direct interest earning to the project, in exchange for tokens.

Lionschain: Is it similar to rDai?

Team GrowFi: We made it specific around the exchange of tokens for interest, so that investors can contribute without losing money.

Lionschain: Are you still working on it, or is your main focus on UDT swap?

Team GrowFi: GrowDrop is live, and our our main focus now is the UDT swap system.

Lionschain: What can you tell us about DeFi in Korea? Which crypto projects in general have seen the most adoption in Korea?

Team GrowFi: Ethereum and Bitcoin are basically the two leaders, Ethereum is the most used. We run the Korea DeFi community.

Lionschain: How do you compare the potential for DeFi on NervOS vs Ethereum? How do you compare the two networks overall?

Team GrowFi: We like both ecosystems. The UTXO model of NervOS really differentiates the project and we think they each have tradeoffs.

Lionschain: What are things you would like to see other teams build that could help your project be more successful?

Team GrowFi: We would love to see a standard way for wallets to interact with Nervos dapps, ideally a solution that supports both desktop and mobile, and doesn’t require a complex setup process like plugins. NervOS is still young. On Ethereum you know the customer probably has Metamask, but forcing your customers to install a plugin creates a lot of friction. We see there are good solutions out there in development and we hope one of them becomes a standard quickly.

Lionschain: Very cool. We are actively reaching out to the developer community so we can intro you to any teams we meet building something like that. We’d love to stay in touch and test out your system as it gets up and running. Thanks so much for your time.

Team GrowFi: That would be great, thank you guys.

— — — — — — — —

We are thrilled to see a team of experienced DeFi builders take interest in NervOS and work on this important piece of infrastructure. If you are a developer or team interested in building DeFi on a sustainable base layer, reach out or apply directly for a grant from the NervOS foundation.

--

--