How Does Visor Integrate With Uniswap V3?

Visor Finance
Visor Finance
Published in
6 min readMar 30, 2021

Uniswap’s Version 3 — which launches on May 5th, less than six weeks from now, shocked most of the DeFi ecosystem when details were published just days ago. Of course the Uniswap team’s objective was to introduce improvements to capital efficiency and we all knew this. What took everyone by surprise though, was the way and which it was implemented.

DeFi has matured over the past year largely through the novel uses of fungible Uniswap Liquidity Pool tokens. LP tokens represent the ownership of a liquidity provider’s portion of a pool on Uniswap. However, using these tokens to denominate ownership of a pool is far from their only use case.

In May of 2020, Ampleforth was one of the first projects to utilize these LP tokens within a rewards program. Ampleforth allocated a portion of their tokens for participants who provided liquidity on Uniswap and then deposited the respective LP tokens in a reward contract they called the ‘geyser’. From then until now, that model has been adopted and re-engineered hundreds of times and created somewhat of a standard within DeFi- how liquidity seekers incentivize liquidity providers.

However, other uses have been discovered for LP tokens as well. For example, if a new project wants to signal that they will not or cannot ‘rug pull’ they provide a significant amount of liquidity on Uniswap and then time-lock their LP tokens so that participants know that this liquidity cannot be removed until a designated time.

More recently, MakerDAO passed a governance proposal which allows certain LP tokens to be accepted as collateral in order to mint their stablecoin Dai. This would allow borrowers to deposit LP tokens as collateral in protocols in order to get a loan.

Finally, in SushiSwap’s case, they leveraged the fungibility of these LP tokens to actually exit Uniswap pools for LP token holders and deposit the liquidity on their own exchange.

But the reason why the DeFi ecosystem is shocked is because in Uniswap v3, all these things will not function as they used to. Why? Because there will be no more fungible Uniswap LP tokens. Instead there will be LP NFT’s. NFT’s are here to stay in DeFi.

Uniswap v2 is centered around a single equation: x * y = k where x and y are the token quantities in the liquidity pool, and k is a constant product. In order to keep k constant, x and y can only move inverse to each other. Uniswap calls this the “Constant Product Market Maker Model.” The “Constant Product Market Maker Model” is represented as an ERC20 pool contract where tokens represent the liquidity of the pool. However, due to this single pool, everyone is subject to a ‘passive market making strategy’. Furthermore, this passive strategy makes everyone providing liquidity subject to ‘impermanent loss’ while not providing the greatest capital efficiency because of the lack of directed capital.

Page 3 of the Uniswap v3 white paper explains the use of the NFT LP token

The Constant Product Market Maker Model will not be used anymore in Uniswap v3, which makes completely fungible liquidity tokens impossible. Instead, Uniswap v3 will move to ‘Non-Fungible Liquidity’ and will remove Native Liquidity Tokens and replace them with Liquidity Positions as individual NFT’s.

So what exactly is ‘Non-Fungible Liquidity’?

Since LP positions in v3 contain many more custom inputs such as Concentrated Liquidity, Range Orders, and Flexible Fees, all variables need to be contained within the individual non-fungible token (NFT).

Furthermore, Uniswap explains that they expect strategies will end up being tokenized,

Over time we expect increasingly sophisticated strategies to be tokenized, making it possible for LPs to participate while maintaining a passive user experience. This could include multi-positions, auto-rebalancing to concentrate around the market price, fee reinvestment, lending, and more.

And that in order to provide these features to v3 LP’s, specific NFT periphery contracts need to be wrapped around the LP NFT,

Anyone could create a periphery contract that wraps an individual liquidity position (including collected fees) in an ERC-721 non-fungible token.

Visor has set out to build such a composable periphery, allowing Visor NFT vaults to wrap individual LP NFT’s.

We envision a DeFi ecosystem where market conditions can unlock liquidity from networks of sovereign smart vaults, moving in and out of communion via gasless cryptographic signatures.

Visor’s UniversalVault asset locks are operated by signatures which can be relayed and aggregated off-chain, meaning networks of liquidity positions can be assembled by external DeFi protocols in a single transaction. The fact that Uniswap is launching such a powerful upgrade to their liquidity representation makes this all the more exciting.

As Visor rolls out NFT Vault upgrades, we anticipate some of the following immediate use cases to compliment the Uniswap v3 launch:

  1. Uniswap LP NFT deposited in a Visor Vault is able to trustlessly receive rewards from liquidity mining programs
Project_XYZ pays an ‘active liquidity miner’ directly to their Visor Vault

Given the right infrastructure exists upon v3 launch, projects will immediately seek to take advantage of Uniswap v3 for incentivizing ‘active liquidity mining’; allocating rewards only to liquidity providers within a designated range or a certain defined strategy. In order to reward liquidity providers, Visor will allow users to stake their LP NFT’s, coupled with an additional layer (Hypervisor) that allows projects to reward those liquidity providers.

In contrast, the two most common rewards program models, based on Chef and SNX, will not be compatible with Uniswap LP NFT’s.

2. Directing Uniswap v3 LP fees to another party, creating an income generating asset

Charlie pays Alice upfront for one month of fee access from Uniswap v3 LP NFT

Fees earned in earlier versions of Uniswap were re-deposited in the pool as liquidity. Liquidity in the pool would grow over time, even without explicit deposits. However, in Uniswap v3, due to the non-fungible nature of positions, fees do not get re-deposited and instead fee earnings are stored separately and held as the tokens in which the fees are paid.

A Visor smart vault could contain a whole collection of income generating assets.

3. Timelocking a Uniswap LP NFT which is deposited in a Visor Vault

A project can lock up their Uniswap LP NFT with Visor

Traditionally, a liquidity locker such as Unicrypt allowed projects to store LP tokens in a smart contract, revoking permission to move these LP tokens from a starting block to an ending block. However with Uniswap v3, projects will not be able to use the same methods, contracts and providers of existing liquidity lockers. To address this issue, we are developing a timelock feature with an accompanied UI to allow projects to timelock their LP NFT within a Visor Vault.

Those three specific use-cases will be what Visor is focused on for the foreseeable weeks along side the Uniswap v3 launch, but we also want to highlight an additional use-case for networked Vaults that has us very excited; truly decentralized borrowing and lending via collateralization of assets inside vaults.

In a world where DeFi protocols interface with permissioned locks, an owner of a vault could simply submit a signature for its assets to become collateralized, allowing a lender to provide a loan based on this collateral.
Upon a default or liquidation event down the road, the ownership of the collateral could transfer seamlessly without extraneous transactions that relinquish custody ahead of time.

With the successful launch of our rewards program just five short days ago we are demonstrating smart vaults in action and are proving that the DeFi ecosystem is ready for NFT Vaults. Demonstrating that it is possible to interact with DeFi protocols through an NFT enhancing the discovery, reputation, safety and programmability of on-chain liquidity. We are proud that along side us, Uniswap is also introducing NFT’s to DeFi in a major way. We look forward to being an integral part of that new liquidity ecosystem. See you on 🦄 v3!

Join the Visor community on…

Twitter | Discord | Github | Our Website

--

--

Visor Finance
Visor Finance

The DeFi protocol for Active Liquidity Management. Building on 🦄 v3.