Welcome Avatar!
Staying up to date with technical developments during market lulls as this improves your chances of finding the correct investments early in the next market cycle. Uniswap v2 enabled easy deployment and trading of the long tail of crypto tokens, facilitating speculative activity throughout the ecosystem. Uniswap is the largest DEX based on volume, and they’ve just announced Uniswap v4.
People in the space are still busy building the future of finance.
Today we’ll go over the Uniswap v4 announcement to see if there are any new tools we can add to our toolbox.
But first, Vitalik Buterin released an article (albeit focused on a period far-in-the-future) about Ethereum. We’ll briefly cover that here as we like to keep an eye on what the Ethereum co-founder is thinking about.
Ethereum: The Three Transitions (Link)
Vitalik says that the future of Ethereum requires three technical transitions:
Moving to rollups: Scalability solutions
Moving to smart contract wallets: Shift towards smart contract wallets, which offer superior security and functionality compared to traditional wallets.
Adding privacy-preserving tech: ensuring privacy-preserving funds transfers and developing other features like social recovery, identity, and reputation in a privacy-preserving manner
We’ve covered rollups in detail before so our focus today is on security and privacy.
Wallet Security
“Not your keys, not your crypto” - but securing “your keys” is so difficult for the average user that it’s a significant block on adoption. People will either outsource security to centralized services, or adopt a widget like Ledger hardware wallet as a panacea without understanding the trade-offs and risks.
A better solution is to use a smart contract as your wallet. This allows you to create any set of rules you want to control your funds. Rules could include basic features like daily spending limits to protect against theft / fraud, through to a full social recovery option to let a majority of your nominated guardians “reset your Ethereum password”. For a deeper dive, see BowTiedPickle’s EIP-4337 explainer.
Privacy Transition
The privacy transition introduces major challenges. Once internal transfers are possible, users will need to use the internal addressing scheme of the privacy system. In a privacy-friendly ecosystem, a user will have both spending public keys and encryption public keys. Privacy requirements will increase the number of addresses each user has, potentially leading to one address per transaction if stealth address proposals become widely used.
Vitalik suggests that “keystore contracts” could be a solution to the challenge of addresses. These contracts could hold stealth meta-addresses, encryption keys, and other information, and the address of the keystore contract could be used as a user's address.
However, privacy also introduces complexities in key recovery. Key recovery in a many-address-per-user world can be done by running the recovery procedure on each address separately. But this approach has issues with gas cost, counterfactual addresses (addresses for which the smart contract has not yet been published), and privacy.
In the post, Vitalik proposes an architecture that separates verification logic and asset holdings. Each user has a keystore contract which exists in one location, and addresses on different Layer 2s where the verification logic of each of those addresses is a pointer to the keystore contract.
In the future, wallets will need to secure both assets and data. In a zero-knowledge world, the wallet is not just protecting authentication credentials, it's also holding your data. Losing the encryption key means losing everything, and if someone sees your encryption key, they see everything that was encrypted to that key.
Uniswap v4
Uniswap v1 allowed users to swap ERC-20 tokens with ETH, or ERC-20 to ERC-20 in two swaps. Uniswap v2 is what allowed Uniswap to really take off, allowing for users to create pairs between any ERC-20 token with the Uniswap contracts. Uniswap v3 brought further changes, including the ability to provide liquidity for a specific range. Uniswap has now been around for 5 years, and just announced the release of Uniswap v4.
Here’s what you need to know.
Features
Hooks: These are like programmable buttons that developers can customize to add new features to their pools (a pair of tokens that people can trade). Hooks can be used to make pools “smarter”, such as by dynamically adjusting fees or setting trading limits.
Singleton Contract: In previous versions of Uniswap, every new pair of tokens to be traded required creating a new contract, which was costly. Uniswap v4 introduces a singleton contract, which means that all token pairs can be managed by one contract, drastically reducing costs.
Flash Accounting: This is a system that allows transactions to be performed internally within the contract before the final balances are settled, which reduces gas costs.
Native ETH: Uniswap v4 supports direct pairs with ETH (instead of WETH previously), which makes the process simpler and cheaper.
Improved Developer Experience: Uniswap v4 introduces several features that make it easier for developers to interact with the protocol and create applications. These include ERC-1155 accounting, which simplifies token management, and governance updates, which provide greater control over fees and other settings.
For a more technical overview, refer to the whitepaper and the GitHub.
Benefits
Increased Efficiency and Flexibility: With features like flash accounting and singleton implementation, Uniswap v4 offers more efficient transaction routing and liquidity pool management. This could lead to a more streamlined trading experience, which could boost adoption.
Improved Customization: The introduction of hooks allows developers to add new functionalities to liquidity pools, potentially driving innovation and the creation of unique trading features within the Uniswap ecosystem. This could lead to more tailored and sophisticated DeFi applications, making the platform more attractive for various use-cases and potentially attracting more developers .
Gas Cost Reductions: Uniswap v4 introduces several features designed to reduce gas costs, such as native Ethereum support and flash accounting. These could lower the barrier to entry for users and increase the overall throughput of the network, potentially attracting more participants to the platform and the broader Ethereum ecosystem.
Interoperability: With hooks and ERC-1155 accounting, Uniswap v4 could improve integration with other Ethereum protocols and standards. That means more complex and beneficial interactions between different DeFi protocols (more fees!).
Implications for Liquidity Providers: With features like dynamic fees managed by hook contracts, liquidity providers may have more control and could potentially earn more from their capital. In addition, the introduction of withdrawal fees could also have implications for liquidity providers, discouraging selling.
Potential for New Market Strategies: With features like Time-Weighted Average Market Maker (TWAMM), limit orders, and dynamic fees, Uniswap v4 could enable new market strategies not possible in previous versions. These features should bring on more sophisticated traders and increase overall trading volume.
Potential Drawbacks
At the end of the day, the usefulness of any new features comes down to their adoption and implementation by crypto users. These advantages could be offset by potential risks and downsides, such as the increased complexity of the system, possible bugs in new features, and unforeseeable market dynamics.
A crypto community member was also quick to point out that Uniswap is not “open source” as stated. This allows Uniswap to internalize the benefits of open source (more eyes on the code) without allowing other people to profit from it. Oh, and the licenses expires in 2027.
This anon autist even discovered a bug already:
These types of bugs will probably get ironed out as further auditing of the code is completed.
v4 also reflects an unfortunate trend in the crypto space to move away from truly open sourced protocols.
Here’s an excerpt from a past piece we did on Aave when token holders voted to abandon open source for Aave v3 under an expiring business license.
AAVE holders voted to abandon “Free and Open Source Software” in favor of a source-available business license which restricts the rights of the community to fork Aave v3 or create derivative works. The business license restrictions will lapse next January and Aave v3 will revert to the free software MIT license.
This is a problem because Aave users are not necessarily AAVE token holders and therefore could not affect the governance vote which changed the license terms. You should not need to be a token holder to use a decentralized finance application. As we’ve written before this would be like needing to hold some SBUX shares to buy coffee at Starbucks.
This is important because Aave v2 was released under a free software license. Users may have believed that Aave is and would remain free software. Improvements and future versions of free software should not be released under a nonfree license.
Important freedoms were taken away from Aave users in v3 including:
freedom to run the software as you wish, for any purpose
freedom to study how the software works then change it so it does your computing as you wish
freedom to distribute copies of your improved versions to help others
Why this matters in a sentence: if Aave the Company is forced to blacklist certain countries, nobody else is free to make an uncensored fork of Aave
And. There is no financial incentive to make a new feature which Aave has not prioritized but the market will be willing to pay for, because you are forbidden to release a fork. This also applies to anyone wishing to extend Aave to a blockchain which the core team has not chosen to support yet. Since many useful components of DeFi were built ‘standing on the shoulders’ of earlier projects, widespread use of business licenses instead of free software licenses could stifle innovation.
The spirit of “open finance” / “decentralized finance” is to give the people financial sovereignty via control of their assets. This requires control over the software which manages these assets (both UI / frontend and blockchain smart contracts / backend).
If we allow DeFi’s free software to be captured by profit seeking VCs and converted to non-free software we’ll be no better off than in the legacy system. We’ll ‘own’ our tokens but not the infrastructure which gives the tokens value.
Concluding Thoughts
Uniswap v4 should make Uniswap more efficient and cheaper for users, which is great for the end consumer. Hooks are an interesting development and the use cases are quite open ended (Can you think of any creative “ponzus” v4 can enable? Drop a comment).
However, these developments come with greater complexity and yet another step away from the open source roots that crypto was founded upon.
A common theme in crypto is the rising complexity of the infrastructure that supports the industry. Complexity compounds and a world where anyone can pick up their phone or hop on their computer and easily understand what they’re using seems further and further away. At the same time, developments such as account abstraction are encouraging as they are indicative of a future where a wallet is as simple as an email address. As far as end user experience goes, Uniswap has been one of the better protocols.
In any case, it feels as though we are caught in a tug-of-war between new innovations that refine and build upon what exists (thereby increasing both utility and complexity) and the goal of simplifying the “front end” of crypto that people will actually use.
This is a free post, so feel free to give it a share and Subscribe if you haven’t already.
Disclaimer: None of this is to be deemed legal or financial advice of any kind. These are opinions from an anonymous group of cartoon animals with Wall Street and Software backgrounds.
We now have a full course on crypto that will get you up to speed (Click Here)
Security: Our official views on how to store Crypto correctly (Click Here)
Great piece. You guys keep us informed pretty fast. 👍🏾
Not clear on the BSL problem, since that allows derivative works. Is it retention of copyright? What is missing?