Transformers Usecases?

I am investigating the transformers approach that ZRX is taken now I wonder if the follow actions will be possible:

Can I create a transformer that people transfer 1 ETH, consumes half for instance in DAI from ZRX liquidity and add it next to Uniswap Liquidity to DAI/WETH pair.

Another idea it will be create an onchain price feed using a transformer to save the price the trade was made, etc, the ways to build are endless if this kind of approach is possible.

I have several ideas to implement on top of this and build legos to people be able to call these kind of functions to execute, do you think is possible to do the above with transformers approach or this is limited?

1 Like

Yes such a transformer is certainly possible. One nice feature of transformers are they are composable –– we already have the FillQuoteTransformer, which would be able to convert 0.5 ETH to DAI using 0x liquidity; we would just need to add a transformer that deposits assets into Uniswap pools. The on-chain price feed also sounds feasible, though at current gas prices it might add too much cost to be very practical.
We would love to hear your other ideas for transformers! Happy to discuss.

1 Like

From top of my head I think in the follow situations if it works composable:

  • Leverage in Compound or Aave
  • Convert from USDC Compound to DAI on Aave - withdraw cUSDC from Coumpound, swap to DAI, convert to aDai
  • sell LP tokens at once for Dai, for instance, remove liquidity from any pair and then sell it for DAI
  • Buy LP tokens (already said in my first post) with ETH
  • Swap aZRX for Dai, withdraw from Aave Lending and then swap ZRX for DAI
  • Arbitrage
  • Convert any Dai trade to Chai at final

In the NFT space:

  • Swap Collectible for ETH and then transfer DAI at final

This maybe only the few legos that I remember, if all this could be done gas efficiently using transformers we have plenty of room for innovations


which one do you think would be the most useful @JoaoCampos89 / @Michael ?
I like the one you used at the beginning of the thread Joao. Would that basically allow to participate in Uniswap (or other protocols) just providing one side/one asset, right?

Yes, users will be able to add liquidity with only one side of it, behind the scenes the transformer will buy the other half to add to the pool. Another use case it will be liquidate the LP token to ETH for instance, using ZRX liquidity behind the scenes, where we convert the LP back and then sell the half part for ETH.