Why DeFi needs TokenScript

以太坊爱好者
本文约2612字,阅读全文需要约10分钟
Wallets are not "smart" because there is no standard layer between the blockchain and the user agent.

Editor's Note: This article comes fromEthereum enthusiasts (ID: ethfans)Editor's Note: This article comes from

Ethereum enthusiasts (ID: ethfans)

Ethereum enthusiasts (ID: ethfans)

, Author: Sunil Tom Jose, translation & proofreading: Min Min & A Jian, reprinted by Odaily with authorization.

The DeFi movement demonstrates the strength and maturity of the Ethereum ecosystem. But while the user experience continues to improve, there remains a gap between wallets and the blockchain that can stump even the most seasoned Ethereum users.

  1. Fortunately, TokenScript can help users bridge this gap.

  2. Recently, I gave Compound a try. This is a well-known DeFi application. Although I am a cryptocurrency user, I am not an Ethereum developer. Therefore, I used the simplest way to test the user experience of Compound: open my Chrome browser, use the MetaMask extension to connect to my wallet.

  3. Next, I test Compound with the following steps:

Use WBTC to mint cWBTC (native token on Compound) on Compound. As a cWBTC holder, not only can I redeem WBTC at any time, but I can also obtain the resulting interest.

Obtain the income brought by lending BTC.

The whole testing process was very smooth. This shows the difference between how advanced Ethereum wallets and dApps are, how smart contracts are integrated, and how DeFi dwarfs centralized services. And at the end of the day, I don't need to hand over the key to a third party.

  1. secondary title

  2. However, much information is missing

  3. From the perspective of missing information, the following points seriously affect the user experience:

  4. There is no record of Uniswap transactions on Metamask. I can only see a simple list of transactions. If I search for these transactions on Etherscan, I might be able to find the details. Problems can arise when it comes to tax returns.

As long as I lend WBTC on Compound, I can get COMP tokens, which is called "liquidity mining". This is a great feature, but there is a problem: where can I see the COMP tokens I have earned? In order to see my COMP tokens on MetaMask, I found the contract address again and pasted it into the relevant input box. However, since my account balance is zero, I must first get my COMP tokens back. As a result, my earned COMP tokens were not visible on MetaMask at all, even though I provided the smart contract address.

In the end, I still have to use the website. If the Compound website goes down, I don't know what to do. In theory, I hold the keys to all my funds, but my wallet doesn't understand the operation, nor what tokens I own. Therefore, I can only rely on the Compound website to explain what is happening on the blockchain and then create the transaction.

I love DeFi a lot and think Compound is awesome. However, the opaqueness of transactions inside wallets is a major flaw for a variety of reasons. To be fair, even if we have a decentralized and non-custodial cryptographic wallet, as far as my personal feelings are concerned, I still cannot get rid of my dependence on centralized services. I know exactly how I feel, and one main reason is:

secondary title

Smart wallets are not smart

  1. All DeFi dApps have the problems I pointed out above. I think the crux of these problems is that the smart wallet experience is clunky.

  2. So, what should a smart wallet look like?

  3. In my opinion smart wallets should:

  4. Detect that I hold cWBTC tokens, and explain why the ratio of cWBTC to WBTC is not 1:1.

  5. etc.

Shows how much interest I can earn, how much interest I have earned, and if I can withdraw my COMP tokens.

Know how to create a transaction to provide a loan and get my COMP tokens back with a button to do so.

etc.

In conclusion, MetaMask is dumb.

This is not MetaMask's fault. MetaMask is a great wallet. It improves the user experience of the blockchain in many ways and guides users well to the Ethereum blockchain.

Still, MetaMask isn't smart enough. Its understanding of blockchain is inherently limited. In fairness, this is true of all smart wallets. This is because there is no normalization layer between the blockchain and the user agent. A smart wallet is just a wallet.

It is unrealistic to expect wallet developers to solve all these problems. Even if they could, it would make MetaMask too large and pose a threat to the application's performance. Also, MetaMask is not scalable. Imagine the number of tokens and smart contracts in existence today, and the new tokens and smart contracts that will emerge in the future as DeFi becomes mainstream. Developers simply cannot implement all required changes in a timely manner.

What we need is an additional layer between the blockchain and the user agent that enables smart contract creators and token issuers to interpret smart wallets, smart contracts, and tokens.

TokenScript just can provide this kind of transparency. With TokenScript, smart wallets can replace websites while ensuring a smooth user experience.

secondary title

TokenScript is simple and powerful solution

Simply put, TokenScript is a JavaScript code layer with XML markup. It describes elements such as attributes, logic, operation and user interface related to the token.

TokenScript files are written and signed by the token issuer. Users can download it anywhere. We provide token issuers with a TokenScript library that can be served by any website, just as any website can verify the signature of the creator of the contract.