KSM Bridge for NFT Markeplace

December 16, 2020

Trading NFTs on Unique marketplace requires the connection to a network that handles currency with a real value. Naturally, Kusama was chosen for that. The bridge is a trusted service, yet the trust window is minimized. It scans Kusama blocks for KSM transfers made to the Escrow address and once a transfer is seen and is final (the block is finalized), it is registered in the Matcher smart contract that resides in Unique blockchain. So the Matcher knows that this particular user has made a deposit. The KSM value becomes locked in escrow address on the Kusama side and issued as a virtual deposit value on Unique side of the bridge. NFT deposits work in the same way. When a trade happens, the Matcher smart contract exchanges NFT deposit for KSM deposit and starts a withdraw process so that the buyer gets the NFT, and the seller gets the KSM. The bridge reads the withdraw command from the smart contract (in particular, the KSM balance and seller address in Kusama) and signs transactions to unlock send KSM value in Kusama and NFT in Unique.

Previous post

Next post