Skip to content

Other Use Cases

The main use case of the Cauldron protocol is for trading cashtokens in a decentralized manner. However, the contract is very flexible and allows multiple other use cases. Here are a few use cases that have been identified.

Merchant payment in any token

When a merchant wants to get paid in a token, Cauldron ca enable buyers to pay in tokens they don’t hold by utilising the contract.

flowchart LR
    cIn[
        Contract with
        USDC
    ]

    bchIn[
        Payment with
        BCH
    ]

    tx[
        Bitcoin Cash
        Transaction
    ]

    cOut[
        Contract with
        USDC
    ]

    merchantOut[
        Merchant
        payment in
        USDC
    ]

    bchOut[
        BCH change to
        customer
    ]

    cIn --> tx
    bchIn --> tx
    tx --> cOut
    tx --> merchantOut
    tx --> bchOut

Figure: Paying a merchant in USDC, without the user owning any USDC.

For instance, a user with BCH can directly pay a merchant requesting USDC by engaging a Cauldron contract to perform the exchange within the transaction itself.

Pay transaction fee with token

Bitcoin Cash network fee has to be paid in Bitcoin Cash. When a wallet has tokens, but no BCH, it is possible to utilize the Cauldron protocol to pay the fee with a token.

This works by including a Cauldron contract in the transaction and sell tokens to it, in return taking enough BCH to cover fee.

flowchart LR
    cIn[
        Contract with
        TOKEN/BCH
    ]

    tokenIn[
        Input with
        TOKEN
    ]

    tx[
        Bitcoin Cash
        Transaction
    ]

    cOut[
        Contract with
        TOKEN/BCH
    ]

    tokenOut[
        Output with
        TOKEN
    ]

    cIn --> tx
    tokenIn --> tx
    tx --> cOut
    tx --> tokenOut

On-chain Price Oracle

By taking a Cauldron as input, it is possible to use it as a price oracle with introspection. By looking at the ratio between TOKEN and BCH in contracts, it is possible to calculate the market price of a token.

flowchart LR
    cIn[
        Contract with
        TOKEN/BCH
    ]

    c2In[
        Smart Contract
        using price
    ]

    tx[
        Bitcoin Cash
        Transaction
    ]

    cOut[
        Contract with
        TOKEN/BCH
    ]

    c2Out[
        Smart Contract
        using price
    ]

    c2In --> tx
    cIn --> tx
    tx --> c2Out
    tx --> cOut