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

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.

8 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.

9 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:

5 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

Would not breaking the liquidity token apart mean a new process for liquidation of vaults, and therefore a change to the Maker protocol?

If we are going that far, why don’t we let Maker setup the liquidity pool tokens as well as take them apart. I think a likely customer for this product would be someone who wants to borrow DAI to pair with their ETH to earn on Uniswap. Why not make it easy on them?

How would it work in an emergency shutdown? Maker would have to convert all the liquidity pool tokens first before allowing any DAI holder access to their ETH claim, return collateral ETH and DAI to the vault holders, dump whatever ETH is left over into the pool that DAI holders have a claim to, and burn any remaining left over DAI. Actually, doing that seems less risky than a normal vault for everybody concerned. But, I think it is a big change.

Edit: I mean otherwise during a shutdown, the DAI holder gets claim to collateral, which includes LP token, which breaks down into DAI which is a clam to collateral, etc.

1 Like

No

Maker doesn’t have to do that.

No it wouldn’t.

1 Like

If you had a 1000 dai loan backed by $1230 ETH/DAI LP token and got liquidated, the LP token breaks down to about $615 worth of ETH and 615 dai. The dai goes to paying your debt, so you only owe 385 dai and have $615 worth of ETH as collateral, so you are like at 160%, you are still good. CR should be 120% for the LP token which equates to 150% for ETH.

4 Likes