Tokenization in Defi
One of my favorites is the tokenization of balances. When you’re well-banked, you can use assets like equities, shares in mutual funds, cars, etc. to collateralize other financial transactions. Defi not only democratizes this logic but also takes it several steps further.
Take, for example, Yearn’s yUSD vault shares, a form of yield-high, high-risk USD stablecoin. What happens under the hood is that
- You deposit stablecoins (e.g., USDT) to Yearn, which supplies them to Compound and Aave. In return, you get a receipt called yUSDT. At any time, you can take the receipt to Yearn and withdraw your original USDT + interest from Yearn.
- Your yUSDT is put into the Curve Y pool, a stablecoin liquidity pool that only trades yTokens. But from the perspective of users, they can trade with the pool with regular stablecoins. In return for the yUSDT, Curve issues you yCRV, representing your share of that pool.
- Finally, you can deposit the yCRV into the yUSD vault, which uses them to automatically claim and sell CRV (Curve’s native token, which they pay to LPs) for more yCRV. The vault issues yUSD as a receipt for the yCRV + any profits accrued during that time.
So the users’ original USDT deposit is used in three different protocols at the same time, earning them three sources of yield (interest from Compound/Aave, trading fees from Curve, and CRV rewards from Curve). While that also magnifies the risks, both economic and smart-contract ones, it’s still a major innovation.
The hidden tax problem with tokenization
Because tokenization is both easy to implement and super useful, it has emerged as a de-facto standard in all of Defi. Users get issued cTokens on Compound, aTokens on Aave, UNI-LP shares on Uniswap, and so on.
What hasn’t received the same level of attention so far is how these transactions are affected by taxes. I’ve recently done my crypto taxes for 2019 and used that chance to look ahead to 2020, where I interacted with many different Defi systems. In that process, I asked my (German) accountant about trades such as tokenization events, and he suggested they are likely taxable events.
To give an example, when you deposit ETH to Compound and get cTokens in return, that could constitute a sale of ETH for cETH, thereby realizing capital gains (or losses) on the ETH. Same when you decide to redeem your cETH back for ETH. TokenTax suggests that this logic could apply to US citizens as well.
Now I should make several disclosures. I am neither a tax lawyer nor accountant, and I don’t think wrapping a token should constitute an exchange. After all, how is this different from depositing your cash at a bank (where it moves from “cash ledger” to bank ledger)? I am merely very conservative when it comes to taxation. And hence I think everyone should be aware that there is a case where tax negatively affects one of the most common transaction types in all of Defi and then take their own steps to explore the problem further.
Token contracts vs. tokenless contracts
At the core of this lies the question of what even constitutes an exchange at all. Why does Etherscan show a token transfer for some transactions but not others?
When people start in crypto, they naively think of their account having a token. But in reality, it’s the token that has accounts and balances. A token is an entry in the database of a token contract deployed on Ethereum. That contract consists of nothing but a map of accounts + balances and a set of functions for updating this map. When you want to transact a token, instead of sending a message to the recipient, you send it to the token contract, asking to debit your balance and credit someone else’s balance.
Think from the perspective of an accountant:
- you transfer token A to a smart contract, removing it from your account
- you get transferred a receipt token, adding it to your account
I think it’s easy to see how you can arrive at this being a sale, especially given that the two happen atomically! But what if we stop at after step 1? That’s the case with tokenless contracts. For example, when you stake UNI-LP tokens in the Uniswap DAO, you don’t get any receipt tokens.
Yet, the way they track your claim on the underlying collateral is the same as with the token contract. There’s a database somewhere in the contract storage with the same map of accounts and token balances. And you can just as much send a message to this contract and have it return said collateral.
So, are we to believe that somehow the question of tax or not depends purely on whether the contract in question is an ERC-20 token contract vs. something else? It’s your wallet or account explorer, like Etherscan, that chooses to display some contract-internal balances but not others.
- I think there’s a real chance that receipt tokens constitute taxable events, at least in the absence of better guidance.
- We don’t know if that means tokenless contracts are taxable events too, but it doesn’t seem so.
- If you engage in these transactions, talk to your accountant about this. Better be safe than sorry when it comes to taxes.
- But if token contracts are taxable and tokenless contracts are not (which logically *shouldn’t* but seems to be true anyway), then there are some ways protocols could improve the UX for users and tax authorities by aligning the on-chain footprint of a transaction more closely with the spirit of that transaction.
For one, protocols like Compound and Aave could add a checkbox which lets the user decide if they want to claim the receipt tokens or not. That would allow them to make a choice that is compliant with their on their own local regulation.
Instead of updating all protocols with more options manually, there could also be a higher-level gateway that is itself tokenless and holds receipt tokens without ever passing them on to the user. For example, you would deposit and withdraw ETH in Aave via the gateway without ever touching the aETH itself.
The fact that anything happening inside tokenless contracts does not seem to create taxable events also greatly benefits exchanges such as Uniswap or Balancer and their LPs. If you have liquidity in these pools, the market constantly rebalances you as the price moves around on its random walk. All of these transactions would constitute sales if they happened on CEX. But since a token represents your share in the pool, the canon seems to be that LPs
- sell their pair of tokens, e.g., ETH + USDC, for pool tokens, thereby establishing a cost basis;
- later sell the pool token for (hopefully) more ETH and USDC, thereby realizing a single sale instead of the millions that might have happened in between.
I get that this post raises more questions than it answers, but I hope you agree that there’s not really any logical reason to treat balances stored in an ERC-20 token contract different from balances stored in a non-token contract. I also hope that if you frequently interact with tokenized balances, you seek your own answers in conjunction with a local accountant or tax lawyer.