[UNI-V2-DAI-ETH] Uniswap V2 Dai-Eth Liquidity Token Collateral Application

So we’ve been recently been discussing the possibility of uniswap liquidity tokens as collateral again in this thread . The uniswap v2 pools now have much more liquidity than v1 pools, and so I think it’s time to have an updated application here.

Here are more related threads:
v1 collateral discussion
v1 collateral application(v2 app is mostly copied from here):

Reasons to include the Eth-Dai liquidity token

Personally, I think the Eth-Dai token would make good collateral for the following reasons:

  • Being able to use it for collateral incentivises the uniswap-v2 ETH-DAI pool, this is beneficial as it allows people to trade Eth-Dai with less slippage.
  • It is more valuable to hold when ETH is trading sideways rather than upward or downward. This makes it more likely actors will wish to use it for leverage when they expect no major change in Eth price.
  • It is the 3rd largest liquidity pool of the uniswap liquidity pools at just over 10 million dollars worth of assets. We may also consider adding the eth-usdc token which is the 2nd largest with over 13 million dollars in assets. More uniswap pool info here
  • potential as a tool to improve the peg if the protocol opens a vault, allowing us to inject dai liquidity directly into the market by holding uniswap tokens, while providing much desired yield to mkr holders. This also mitigates the issue brought up previously of uniswap tokens having insignificant impact on dai supply.

Application Form

1. Who is the interested party for this collateral application?
@befitsandpiper

2. Provide a brief high-level overview of the project, with a focus on the applying collateral token
Uniswap is a decentralized Constant Product Market Maker that operates on-chain. Unlike v1, there is a possibility of governance in the future that will allow upgrading of the profile.

There are three user groups, the first: traders use uniswap to swap one crypto-asset for another. The second: liquidity providers who provide liquidity for traders in exchange for a small fee on every trade. The third: a hypothetical future DAO to manage and upgrade the protocol. As far as I can tell this DAO and associated governance tokens have not been released yet, and I have not been able to find much information on it.
See https://uniswap.org/docs/v2/ for more details.

3. Provide a brief history of the project
I’m going to leave this for someone else to provide. I’m not 100% sure how relevant it is for this particular collateral type and I suspect that most people are aware of uniswap.

4. Link the whitepaper, documentation portals, and source code for the system(s) that interact with the proposed collateral, and all relevant Ethereum addresses. If the system is complex, schematic(s) are especially appreciated.

High level explainer of v2 vs v1: https://uniswap.org/blog/uniswap-v2/
Whitepaper: https://uniswap.org/whitepaper.pdf
Docs: https://uniswap.org/docs/v2/
Code: https://github.com/Uniswap

5. Link any available audits of the project. Both procedural and smart contract focused audits.

Audit report: https://uniswap.org/audit.html

6. Link to any active communities relating to the project.

Discord: https://discord.com/invite/XErMcTq
Blog: https://uniswap.org/blog/

7. How is the applying collateral type currently used?
To the best of my knowledge the uniswap liquidity tokens are not used by any other protocols directly. There are a number of dashboards that display the amount available, and some apps for calculating profit, but otherwise these appear to be a largely untapped resource.

8. Does one organization bear legal responsibility for the collateral? What jurisdiction does that organization reside in?
No organisation bears legal responsibility for the collateral. Dai, Eth and the uniswap tokens are all permissionless.

9. Where does exchange for the asset occur?
I am not aware of any markets for the ETH-DAI uniswap liquidity tokens outside of uniswap itself. Uniswap allows redemption between liquidity tokens and the underlying assets at any time. By definition, there is always the required liquidity for this redemption.

10. (Determined by Legal Domain Team) Has the project obtained any legal opinions or memoranda regarding the regulatory standing of the token or an explanation of the same from the perspective of any jurisdiction? If so, those materials should be provided for community review.
No

11. (Determined by Legal Domain Team) Describe whether there are any regulatory registrations for the token and provide related documentation (including an explanation of any past or existing interactions with any regulatory authorities, regardless of jurisdiction), if applicable.
No

12. (Optional) List any possible oracle data sources for the proposed Collateral type.
Not sure. I suspect the best way to go about this is to have oracles report the prices for the underlying assets and then get the ratio from the uniswap contract. Uniswap does have an oracle system discussed here: https://uniswap.org/blog/uniswap-v2/. I’ll leave it up to the Oracle Domain team to decide if we want to use the uniswap oracle for the token price.

13. (Optional) List any parties interested in taking part in liquidations for the proposed Collateral type.
No parties that I know of, though I suspect that anyone willing to bid on ETH collateral would also be willing to bid on ETH-DAI liquidity tokens.

15 Likes

I strongly support uniswap liquidity as collateral. It is easy to liquidate by breaking into parts. V2 has a built-in oracle that resists manipulation.

7 Likes

What are the implications of having DAI serve as collateral for itself? Does it allow for vaults to create highly leveraged situations that could be unstable?

One good thing about this is that it provides DAI liquidity in a positive way that will actually circulate in the market and provide stability for the peg.

3 Likes

would say this topic has been discussed a fair amount itt:

3 Likes

While there’s limited value in DAI collateralizing DAI, there is no drawback to it. Mixed collateral, which is only partially DAI, works and is less risky the larger its DAI composition. See @Jiecut’s writeup in the v1 discussion.

5 Likes

There are a few nice features with this one.

  1. A keeper gets back roughly 1/2 the value in DAI when they liquidate requiring no other tx other than a deposit to return to making bids.
  2. A reduced pricing risk in ETH.
  3. The vault owner actually gets some return (probably not as much as in other pools)
  4. Incentivizes uniswap liqjuidity
  5. No liquidity issues (to be contrasted with any of the compound cTokens which can have significant liquidity issues given that 100% of the supply can be consumed by borrow)
  6. v2 pricing oracle is pretty robust now.
  7. No need for new oracles.

I am a yes to this one. Depending on the LR I would not expect this to mint much DAI but anything to help incentivize DAI minting as well as putting additional liquidity in uniswap is a good idea generally.

I think a general consideration for all the uniswap-DAI tokens that represent already in place Maker collateral (KNC-DAI, ZRX-DAI, BAT-DAI, USDC-DAI, etc.) should also be considered at some point because no new oracles are needed and keepers already know how to deal with these (all except USDC at this point - soon to change).

There is only one negative and that is the number of tx’s required to fully cycle collateral for a keeper is up because to get the ETH and DAI one has to redeem the uniswap, and then sell the ETH where as ETH alone only requires a ETH sale.

7 Likes

I propose that since the volatility is approximately the square root of ETH volatility, then CR for this token should be about the square root of the CR for ETH, or about 123%

3 Likes

As long as the technical implementation risk can be solved perfectly, I will support it.

1 Like

Interestly because this is 50% non-DSR DAI, there could be a sf discount of DSR*0.5 for this collateral type.

SF = Base Rate + Risk Premium - 0.5*DSR

@Jiecut, as the Uniswap liquidity can be more interesting than the DSR, I wonder if the discount makes sense. Maybe add a profit taking parameter in the Risk premium framework, not that it had anything to do with RP.

If the Uniswap rate is 20%, everyone will leverage the position using the vault until a rate of let’s say 5%. If the rate is 0% (like now) or at least below 5% we should reach DC quickly (I acknowledge that the Uniswap profitability to lean towards 0 quickly as well).

@SebVentures This is just future proofing, in case we have a high rate environment with high DSR. We don’t want this vault to be only used during low rate environments. There’s also CHAI-ETH but it makes sense to just give a bit of a bypass on the DSR for DAI-ETH. [CHAI-ETH is just more annoying for end users]

It should be noted if the vault user decided to use a 150% CR, for ever DAI they borrowed they’d be holding 0.75 DAI. Applying the DSR at a 50% rate is conservative.

@SebVentures Also, uniswap returns aren’t that simplistic. You still have ETH exposure and impermanent loss exposure. Also volume, which you’re calculating returns off of, can be volatile. Using UNI-V2-DAI-ETH as collateral and borrowing DAI is NOT rate arbitrage. It’s quite different.

1 Like

I very much support this proposal :heart_eyes:

Some quick notes on oracle implementation:

The best thing to do is definitely to have oracles report prices for both underlying assets.

To calculate the underlying value of some amount of liquidity tokens at a given instant, you would naively do

token0Amount = reserveToken0*liquidityAmount/liquidityTotalSupply
token1Amount = reserveToken1*liquidityAmount/liquidityTotalSupply
totalValue=token0Amount*oraclePrice0 + token1Amount*oraclePrice1

However, if the price of Uniswap is off at that moment, the value will be calculated higher than it should because liquidity tokens values are at their lowest in a fully arb’d state.

So the oracle should instead calculate what reserveToken0 and reserveToken1 would in after an arbitrage trade that brings it to the price ratio reported by the Maker oracles for the underlying assets. I can share this formula if helpful (shouldn’t be too hard to calculate on chain).

Then calculate fully arbitraged value:

token0Amount = arbitragedReserveToken0*liquidityAmount/liquidityTotalSupply
token1Amount = arbitragedReserveToken1*liquidityAmount/liquidityTotalSupply
totalValue=token0Amount*oraclePrice0 + token1Amount*oraclePrice1

This gives you a safe floor price to use when pricing liquidity tokens.

8 Likes

We might just implement a simple smart contract that takes in a pair address, relative price, and amount of liquidity tokens and returns the underlying token balances if arbitraged to that price to save you some time :slight_smile:

3 Likes

Does this formula posted on the DAI:ETH UNI-V1 post look correct:

BAL_A = SQRT(INVARIANT / PRICE_A:B)
BAL_B = SQRT(INVARIANT / PRICE_B:A)
SHARE_VALUE = (BAL_A * ORACLE_PRICE_A) + (BAL_B * ORACLE_PRICE_B)

In the context of UNI-V1-ETHDAI it would look like this:

BAL_ETH = SQRT(INVARIANT / ETHUSD)
BAL_DAI = SQRT(INVARIANT / (1 / ETHUSD))          // (USDETH === 1 / ETHUSD)
SHARE_VALUE = (BAL_ETH * ETHUSD) + (BAL_DAI * 1)  // Value in USD
1 Like

I think that is very close but we also have to check if the protocol charge is turned on, and if so factor in the portion of the pools that will go to the feeTo address. Doesn’t add that much complexity though

We just opened up an issue here to implement this:

8 Likes

Hi, I made a prediction market on this to incentivize attention https://omen.eth.link/#/0xe0aabc3ab700623c5a47efcdadb61b009d46b135

4 Likes

hi, here is a Uniswap V2 DAI/ETH liquidity token -ETH pair on uniswap so you can trade the liquidity tokens directly for ETH. someone should make another one for uniswap v2 DAI/ETH - DAI pair to enable infinite liquidity the pool tokens for these pairs should be allowed on makerdao too as collateral creating a loop of infinite money and infinite money leverage (minus gas fees)

https://uniswap.info/pair/0x6EdF66D04d5ED3357102ed8605b62752F740b598

needs more liquidity, if you have UNI-V2 for the Dai/eth pair please add liquidity on this pair

Giving this the benefit of the doubt. Appreciate the spam flags, but I’m letting this one stay up in case anyone wants to discuss the utility of having ‘second level’ liquidity tokens.

2 Likes

I like arbitraging these but higher level pairs don’t help makerdao. Their volume for V1 was largely people making mistakes and losing money to arbitrageurs. You can already redeem the liquidity for dai and eth, and then the dai for eth, which is way more liquid than the higher-order exchange would supply.

3 Likes