DotSwap V2
DotSwap V2
DotSwap V2 utilizes elegantly designed PSBTs and a secure asset pool, allowing us to achieve:
BTC-native BRC20 AMM swap.
Swap BTC/BRC20 and BRC20/BRC20 trading pairs strictly on BTC and adhering to the BRC20 protocol.
Fully on-chain BRC20 swap transactions.
Every transactions are recorded on-chain, instead of recorded off-chain an or periodically on-chain with roll-ups.
Minimized front-running risks
The exchange prices of a trading pair is calculated at the time of the swap request using the amount of BTC and BRC20 assets in the asset pool. This help ensure that each swap transactions are constructed and broadcasted in the order of the swap requests, which then further minimizes the risk of transactions being front-run by mempool-watching bots.
Swap transactions goes through in the same block.
With pre-constructed PSBTs, the process of swapping BTC/BRC20 tokens to BRC20 tokens, which normally would require several steps and maybe multiple blocks, can be put in the same block using a transaction chain. This reduces the wait time of a transaction to only 1 block in an ideal situation.
PSBTs and Network Fees
There are three types of PSBTs that are used by DotSwap V2 and will be signed by the swapper and the asset pool when swapping.
Swapping from BRC20 to BTC
1 transaction network fees, same block:
TX1: Swappers send Transferable BRC20 to asset pool, asset pool sends BTC to swappers.
Swapping from BTC to BRC20
3 transaction network fees, same block:
TX1: Swappers send BTC to asset pool.
TX2: Asset pool inscribes the BRC20 Transfer inscriptions for itself to make them transferable.
TX3: Asset pool sends BRC20 Transfer inscriptions to swappers.
Swapping from BRC20 to BRC20
3 transaction network fees, same block:
TX1: Swappers send BRC20 to asset pool.
TX2: Asset pool inscribes the BRC20 Transfer inscriptions for itself to make them transferable.
TX3: Asset pool sends BRC20 Transfer inscriptions to swappers.
Last updated