In this example, we will explore using RenVM interoperability to implement a set of smart contracts that allow traders and liquidity providers to trade BTC and ZEC on the Uniswap exchange. The full source code for this example is available on GitHub.
UniswapExchange are the contracts written by the Uniswap team, and are exact copies of the contracts deployed on Ethereum Mainnet.
Uniswap contracts are written in Vyper, so to use them in Solidity we need to write compatibility interfaces.
IUniswapFactory is the interface of the
IUniswapExchange are the interfaces for the
Uniswap Adapter contracts use the Uniswap interfaces to talk to the Uniswap contracts. These contracts adapter RenVM to the exsiting Uniswap contracts, allowing users to trade foreign blockchain tokens (e.g. BTC/ZEC) without needing to wrap/unwrap the Ethereum representation of these tokens.