Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add wstETH collateral support #73

Closed
12 of 13 tasks
valiafetisov opened this issue Jan 31, 2022 · 6 comments · Fixed by #92
Closed
12 of 13 tasks

Add wstETH collateral support #73

valiafetisov opened this issue Jan 31, 2022 · 6 comments · Fixed by #92

Comments

@valiafetisov
Copy link
Contributor

valiafetisov commented Jan 31, 2022

Goal

Participation in wstETH collateral auctions is possible via the UI

Context

wstETH collateral requires it's own callee contract and uses Uniswap v3 exchange, therefore:

  • new callee address should be passed to the clipper contract (along with possibly different callee data)
  • the price of the new collateral should be calculated separately

This issue will also be used to refactor callee logic to streamline collateral onboarding.

Tasks

  • Refactor callee / collateral logic
  • Add new WstETHCurveUniv3Callee callee support
    • Deploy callee to test networks if needed
    • Add uniswap v3 library
    • Generate callee data
    • Calculate price
  • Add new collateral config
  • Manually validate that new collateral is supported
    • Manually create a new auction on a supported test chain
    • Execute auth and bidding
This was referenced Jan 31, 2022
@valiafetisov
Copy link
Contributor Author

Add new callee support

The callee in question is https://github.com/makerdao/exchange-callees/blob/master/src/WstETHCurveUniv3Callee.sol

But I can not find its address, since action-demo-keeper doesn't seem to support this collateral.

Till we get the address from the PR (by merging the PR and asking them to fill the json), I can try to deploy it myself, but it's not clear for me, what constructor parameters should be used. The contract accepts:

@valiafetisov
Copy link
Contributor Author

valiafetisov commented Feb 2, 2022

It turns out, I've been looking into a wrong config file inside action-demo-keeper and it actually supports wstETH (but only on the mainnet): https://github.com/makerdao/auction-demo-keeper/blob/bca09252af029448ff67823b0b7825ad8c6feff8/config/mainnet.json#L358-L373

Another interesting, but currently unrelated point: latest mainnet config uses uniswapV2Callee for YFI-A (while all other collaterals are traded via V3 callee) https://github.com/makerdao/auction-demo-keeper/blob/bca09252af029448ff67823b0b7825ad8c6feff8/config/mainnet.json#L189

@valiafetisov
Copy link
Contributor Author

valiafetisov commented Feb 2, 2022

Based on the callee deployed on the main, constructor parameters are:

parameter description mainnet kovan goerli
curvePool StableSwapSTETH.vy contract https://curve.readthedocs.io/... 0xdc24316b9ae028f1497c275eb9192a3ea0f67022 unknown unknown
uniV3Router Same on all networks 0xe592427a0aece92de3edee1f18e0157c05861564 0xe592427a0aece92de3edee1f18e0157c05861564 0xe592427a0aece92de3edee1f18e0157c05861564
daiJoin MCD_JOIN_DAI from the https://chainlog.makerdao.com 0x9759A6Ac90977b93B58547b4A71c78317f391A28 0x5AA71a3ae1C0bd6ac27A1f28e1415fFFB6F15B8c 0x9759A6Ac90977b93B58547b4A71c78317f391A28 (not sure if it's a valid goerli address)
weth ETH from the https://chainlog.makerdao.com 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 0xd0A1E359811322d97991E03f863a0C30C2cF029C 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2

Unfortunately, StableSwapSTETH.vy doesn't seem to be deployed anywhere except main.

@valiafetisov
Copy link
Contributor Author

@LukSteib can you maybe ask PE if they are aware of WstETHCurveUniv3Callee or the StableSwapSTETH addresses on the test chains? Or did they only test it on the mainnet/fork? Otherwise, we would need to prioritise #81 sooner than later to actually test something.

@LukSteib
Copy link
Contributor

LukSteib commented Feb 2, 2022

Or did they only test it on the mainnet/fork?

Yes, testing is based on the mainnet/fork approach and not on the testnet based approach.

Otherwise, we would need to prioritise #81 sooner than later to actually test something.

Given the above, I agree that we need to prioritise that. IMO the minimal testing setup that we requested from chaoslabs (ie. liquidation of one urn of a specific ilk at a time) would already help here.

@valiafetisov
Copy link
Contributor Author

Yes, testing is based on the mainnet/fork approach and not on the testnet based approach.

I tried forking mainnet a few blocks before active wstETH auction was taken in block 14052147, but it doesn't seem to work so far (it's not being fetched from the clipper).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants