[UNI-V1-DAI] Uniswap Dai Liquidity Token Collateral Application

Extra info for section 5.
Vyper (language used to implement uniswap v1) audits might also be relevant diligence.consensys.net/audits/2019/10/vyper/
Trail of Bits has also done a vyper audit but i cant find a paper, just this blog blog.trailofbits.com/2019/10/24/watch-your-language-our-first-vyper-audit/

3 Likes

And the underlying assets in this case are very liquid.


Extra random information for people interested.

https://uniswap.info/token/0x6b175474e89094c44da98b954eedeac495271d0f

If you’re interested in how this would perform in relation to ETH price movements.

3 Likes

Loving the team effort everyone. Thanks for the contributions.

7 Likes

I love this token and I’m a holder myself. It is, by definition, more stable than ETH alone.

In the technical side this isn’t much of a challenge. The token is a standard ERC20 that does not have any centralization risk.

I have a couple of concerns about risk, but maybe not insurmountable.

  • Where would oracles source token prices? Maybe this can be derived from existing oracles and pool size, it’s an open question.
  • Where would keepers source prices? There’s not a liquid market for these, so the assumption would be that a keeper would need to either hold or remove liquidity from the pool to recapitalize.
  • What about Uniswap V2? As far as I know, Uniswap will upgrade to V2 and replace the frontend. Uniswap V1 will continue to live forever on-chain, but the future of the V1 ETH/Dai pool is uncertain at this point.
  • How could flash loans in and out of the Uniswap pool affect the Maker Protocol? It might not, but I haven’t fully thought this consideration out.
  • What are the possible issues, if any, of having Dai partially backed by Dai? Again, there might not be any, but we want to think that through and be sure about it.

I’m not too concerned about the fact that this is an ETH and Dai derivative. I myself hold ETH/Dai in uncertain markets, and I think that because it’s a more stable asset than ETH alone it might attract more interest in sideways markets.

5 Likes

I think the only viable option that has been floated at this point would be to derive the price based on the amount of collateral backing the liquidity pool.

Maybe if the protocol started accepting it as collateral there might be more p2p trading, but who knows.

Would love to hear if anyone else has a better suggestion here myself.

1 Like

No liquidator plans to use that market. They will redeem the liquidity for the underlying.

The simplest way to calculate the value of a liquidity token is by dividing the two assets in the token contract by the total supply of the token. We may need something more resistant to flash loans if it is possible to temporarily pump the underlying value, however.

I already do this. It’s easy and cheap.

There is no key uniswap frontend, and most uniswap trades do not originate on the official uniswap UI. Uniswap V1 is already integrated into several liquidity systems including Kyber and 1inch. Uniswap-V2 is uncertain, and I’m bearish about it because the amount of liquidity required to generate volatility-based volume is substantially larger because there is no unifying collateral (eg ETH), and because it uses substantially more gas.

2 Likes

I’m having difficulty assembling such an attack. I end up short several million dollars.

Attack WIP:

  • Flash loan 65m DAI and 150 kETH
  • Deposit 130 kETH and 20m DAI into Uniswap, obtaining UNI-V1:DAI worth $40m, an 89% share of the total pool
  • Buy 48 kETH on ETH-DAI with 45m DAI
    -> the pool nets 37m, your portion nets 33m, you lose 4m on slippage to the rest of the pool
  • Open vault with your UNI-V1:DAI, currently worth 73m DAI, draw 49m DAI
  • Sell 20 kETH on Uniswap:DAI for the remaining 16m DAI
  • Repay
2 Likes

Wanted to add this as an anecdotal signal that this should be something that we should consider.


1 Like

Wow that is great ! @Andy_McCall

I like Coinbase since a while already, first transaction i made with bitcoin was on Coinbase to buy things on the Darkweb haha…

What i like also is you can watch video and learn about crypto and they even give free crypto. This is a nice and interesting way to learn and the platform in general is always working great, never had a bug on Coinbase in years.

Yeah i’m also a big coinbase user!

I think the takeaway here is that other competitors in the stablecoin space are making investments into the uniswap exchange, so we might want to consider it as well to remain competitive.

3 Likes

Yes, this will also boost on chain liquidity of ETH-DAI. Important for the DAI ecosystem and competition with other stablecoins.

2 Likes

ETH-DAI / ETH-USDC uniswap LPs mostly fear of a parabolic ETH rally that would erase all fee profits.

Minting DAI against the uniswap liquidity tokens would be a reliable source of liquidity for hedging the risk with leveraged ETH exposure in a bullish environment.

4 Likes

Wanted to cross post this here:

Would love to know what the next steps are and if there is any room for community involvement. Is this just an issue of development work and capacity given the current circumstances? Do we need a separate discussion for how to properly build a uniswap oracle?

Next steps will be waiting for MIPs to be ratified. Once they are, MIP8 states that domain teams need to communicate their opinion of the asset (domain greenlight) and whether they are willing to work on it within two weeks. MIP9 details the process for the community greenlight poll which is run by the governance facilitator on a similar timescale.

Once those have both happened, we wait for the domain teams to do the required work on the asset. Then I believe someone (who?) submits a MIP12c2 subproposal which is then voted on at some point (when?) and may be part of the governance cycle?

Admittedly it gets a bit confusing towards the end there.

It seems to me that the main holdup here at this point (based on the various coms I’ve seen from foundation members) is that we are unsure of how to create an oracle for this asset at either an implementation level or a conceptual level.

I am wondering if the concerns around a proper oracle are mitigated if an open-sourced PoC oracle was created by the community for the oracle team to review. I.E. If the community were to build an example implementation would that be useful to the foundation’s oracle domain team and would that help speed things along here.

@NikKunkel would be the one to ask.

I messaged @NikKunkel and his suggestion was to start a new thread where we could hash out the details of a UNI-V1 oracle. Here’s that thread.

Please leave your comments in that thread if you have ideas about how the DAI:ETH UNI-V1 token might be priced.

3 Likes

About price Oracle (12). It can be computed directly from current ETH price. So no oracle is needed. If uniswap pool is not in balance it is subject to arbitrage anyways, so it will be balanced back quickly by anybody.

Idea to include uniswap pool tokens like DAI-ETH is fantastic. It has half of a volatility of ETH and actually better liquidity than ETH (since half of it’s value is DAI which You redeem right away)

1 Like

From the discussion on a UNI-V1 oracle, here is how you can avoid the issue of the pool not being balanced:

INVARIANT = SHARE_ETH_BALANCE * SHARE_DAI_BALANCE
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
2 Likes

Huge fan of the idea of having Uniswap liquidity tokens as collateral on makerDAO :slight_smile:

However, Uniswap V2 is coming out in ~2 weeks. I think it would be better to wait and use Uniswap V2 liquidity tokens as collateral.

1 Like