Inspiration

HotPot Protocol is a decentralized cross-chain swap solution for cryptocurrencies implemented by a set of robust, non-upgradable smart contracts. HotPot Protocol helps users (incl. smart contracts) to seamlessly swap cryptocurrencies on different blockchain networks. It's fast, decentralized, safe, low-cost and with zero slippage. Ultimately, HotPot Protocol will support the requirements to develop programmable cross-chain DeFi.

What it does

To serve the needs of Flux Protocol's cross-chained lending and borrowing, existing solutions could not meet all requirements. Therefore, in order to achieve true cross-chain lending and borrowing, ZeroOne Labs has developed its own cross-chain solution: HotPot Protocol.

How we built it

Existing cross-chain swaps (e.g.: AnySwap, O3) are based on an AMM architecture and require liquidity providers to inject liquidity and the token prices are based on the equation x*y=k.

When users need to cross-chai swap a large amount of assets, the token price will be impacted when the liquidity of the liquidity pair (LP) isn't sufficient. For example, a user wants to cross-chain swap 100,000 DAI for 500 BNB (hypo. market price 1000 DAI / BNB) but can only swap 100,000 DAI for 450 BNB because of insufficient liquidity causing a token price impact and slippage. If the liquidity is small, even small swap orders will experience high price impacts.

Liquidity is of high-priority for swaps! To eliminate the liquidity problem, HotPot will credit borrow (non-collateralized) from ZeroOne's Flux Protocol. During a cross-chain swap, if the liquidity isn't sufficient, HotPot will borrow the required assets to increase the missing liquidity. Once the liquidity is sufficient (or any other given time) HotPot Protocol will pay the outstanding borrowings to Flux Protocol.

Not only does the credited borrow on Flux Protocol resolve the liquidity problems, it also increases Flux Protocol's money market utilization rate.

At the same time, HotPot Protocol also allows any address to provide liquidity through incentives. To eliminate impermanent loss, HotPot's liquidity will be provided by single assets and receive rewards without risks.

Challenges we ran into

he cross-chain infrastructure is responsible for communicating the orders from Network X to Network Y. To meet Hotpot's cross-chain requirements well-known bridges (Chainlink, Multichain formerly AnySwap, Poly Network) are selected as Hotpot's bridge.

Hotpot doesn’t directly trust any Bridge and adopts a mixed use and secondary confirmation method to avoid a single cross-chain bridge from malicious behaviour (or vulnerability to exploitation). Hotpot Protocol’s cross-chain swap execution requires at least two cross-chain bridges to be separately confirmed according to Hotpot's risk prevention strategy before it can be processed. The risk prevention strategy requires medium to large sized swaps to be confirmed twice, while small sized swaps only need one confirmation by any of the cross-chain bridges.

At the same time, to prevent malfunction of any bridge solution causing troubles for the secondary confirmation, Hotpot is constantly monitoring, and will activate plus allow backup services to complete the secondary confirmation when the requirements are met.

Accomplishments that we're proud of

It's fast, decentralized, safe, low-cost and with zero slippage!

What we learned

The balance between decentralization, stability, and ease of use.

What's next for Hotpot

support ethereum and more blockchain.

Hotpot contracts on OEC

{
"Access": "0x05d75d25c8ec102538Dd7Fc39e19d7A5dB8faeCE",
        "Router": "0x8301028AC137b47B19C6c0Ce34A832e8D5024752",
        "Config": "0x223b20dF5c92A1dAb7258b851bE19a5CfAa1Cfbe",
        "Vaults": {
            "USDT": "0x1217082C48603881cF6145aF509Fdca9582FAb0c",
            "USDC": "0x8A341FA25Cf0a35277dd199BdAC61C5a9b261974",
            "DAI": "0x037feaCdF68F55Ff2BE854b0c75104aeB6213881",
            "BTC": "0x03D496A52b61976aA4147BAe18272A48691c8FbB",
            "ETH": "0x6B7C026621d53d092FB446C2162D1DFc048bC9D7"
        },
        "Gateways": {
            "6": {
                "USDT": "0x6d981C8535af305915c7eC2FceFA126d6286c0F5",
                "USDC": "0xA7FeD91A00fE5847cc4970a1122fA5bCf2700291",
                "DAI": "0x8b0963Ac00776111160f9bAB0E1835719ce5ff6C",
                "BTC": "0x1ee6dCa80F09E7d387DbFA8EB2Dea08e83FaD182",
                "ETH": "0xBe7F5e9eC0b1911251D61Ac64860a315a5185A18"
            },
            "7": {
                "USDT": "0xA08584E87703Da3E454133080362FfBE545dEf11",
                "USDC": "0xf2575b39ADF3fC2d9370862e17efDCC79D935c00",
                "DAI": "0xaca1227d3526D78a7Df361dF3495Aa2A64042808",
                "BTC": "0xdE8B716F43dcD94e4D4afE73D040825b2E990E6D",
                "ETH": "0x35b161F6F1Aa5787045505bd2E8307195485725D"
            },
            "17": {
                "USDT": "0xf195EeC267130FFF260b107a26b94976f59e09e2",
                "USDC": "0x353881c2afda8D07Db6c01f59D91Bef75570d4D2",
                "DAI": "0xA86E17e1B40F251d50Ce64Da1f2F824Ff9520E44",
                "BTC": "0xE5bbC1FaF1dD83251B2949c08dE53Ba86BFf4Fb8",
                "ETH": "0x5CB3Ff30Ae417fddC9301b64C35A211f40f801C2"
            },
            "19": {
                "USDT": "0xc4a937E3fe940226A5C4372b0563C6c2Ac76F542",
                "USDC": "0xe26dC64f1B833ee829B431B0293C9EB677E60730",
                "DAI": "0xEc90274Bca42C2FEb76986D6EF54d662ba2aE0Ae",
                "BTC": "0x3ccFDc23678df1f5C74850EEe339d659307461eb",
                "ETH": "0x0c9145FFC4269e8658db245080535a48c15eaf84"
            }
        },
        "HotpotLens": "0x487Fd5C13f5764b798D4AecaEA79B2e0DF5d3952",
        "RouterV2": "0xa0C593894dd3F37aCB67278125B0aF316Ad7c614",
        "ExtCaller": "0x7E5c3A5C03Effb37D214541Ce1174E06D31794c0",
        "RouterV3": "0x93D3B6713c08F50C576490c7C975E1D315927EF3"
}

Built With

Share this project:

Updates