0cf Swap
Our first applicaiton is 0cf swap. A simple app to swap BTC for DAI using renVM and uniswap.

Liquidity Pool

Anyone with renBTC will be able to contribute to a 0confirmation liquidity pool. This renBTC will be loaned out to those shifting BTC onto ethereum who have opted into the service. All contributors to the pool will get zeroBTC erc20 token that represents proportional ownership in the liquidity pool. As fees are earned from the loans they are added to the pool, increasing the value of the pool token (much like uniswap). Liquidity token holders can redeem their tokens for renBTC in the pool at any time.


The 0confirmation protocol provides an environment for keepers operate in and earn a yield facilitating short term loans. A keeper system is needed to monitor the state of the system and perform necessary actions.
    Monitor target chain for liquidity requests
    Monitor origin chain for transactions associated with liquidity requests
    Assess riskiness of originating transaction
    Source Liquidity from liquidity pool
    Trigger proxy wallet creation
    Submit borrowed renBTC
    Pay gas needed for ethereum transactions
    If bitcoin transaction fails or is delayed, liquidate proxy wallet to repay liquidity pool
    If bitcoin transaction is successful, forward assets to target account

Escrow Wallet

A smart contract that holds assets while waiting for the appropriate confirmations before releasing or liquidating them.

Proxy Wallet

A proxy wallet is a smart contract wallet that is created for each 0 confirmation transaction. When a liquidity request is fulfilled the renBTC is delivered to the proxy wallet which then executes the payload transaction(s) and holds onto the resulting assets until 6 confirmations are reached on the initiating transaction or the liquidation threshold is reached. Once that occurs the assets are forwarded on to the users address and the proxy wallet is destroyed

Fee Details

    renVM fee (0.2%): Fee paid to renVM network for performing shift (subject to change, check here to validate https://mainnet.renproject.io/)
    Bitcoin Network Fee: Fee needed to pay bitcoin network (calculated via renVM)
    0cf Loan Fee (0.1%): Fee paid to 0cf liquidity providers and keepers for providing short term loan
    Estimated Slippage: The potential slippage from the trade being executed on uniswap
    Estimated Gas Cost: 0cf swap employs Gas as a Service. Users do not need to pay for gas for actions on the ethereum network directly. It is paid in advance and then the amount spent is deducted from the swap amount.
Last modified 11mo ago