Skip to content
This repository has been archived by the owner on Jan 18, 2023. It is now read-only.

Checkpoint 1 for revamped ExchangeIssuance. #13

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bweick
Copy link
Contributor

@bweick bweick commented Oct 13, 2021

No description provided.

- May be issues with on-going compatibility since adapters are built more for modules
- May require additional contracts/code to turn standardized data inputs into a function call to the adapter

### Option 2: Use 0x-like implementation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One potential problem with this implementation is when a set contains wrapped tokens. At the time of submitting a transaction, a set may contain 1.001 DAI worth of cDAI. However, by the time the transaction is mined, the exchange rate will have likely increased, making minting the set require 1.002 DAI worth of cDAI.

Since all trades and transformations would be computed off-chain, this solution would only purchase 1.001 DAI, and would then revert when attempting to wrap it into the correct about of cDAI.

This feature should be able to handle the following asset types:
- Spot tokens
- Wrapped tokens (AAVE, Compound)
- LP tokens (Curve, UniswapV2, Sushiswap)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LP tokens have a special problem of often not having the ability to create a trade with a specified output amount of LP tokens. Instead, they usually require supplying an input amount of the underlying tokens. This setup is incompatible with the issuance modules which would require fixed proportions of each token (including the LP tokens). Have you thought of any potential solutions for this?

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

Successfully merging this pull request may close these issues.

2 participants