Risidio STX Lightning Swaps 2020
Fraud Proof Swaps
Enable Delegated Stacking via swaps of Lightning BTC to STX tokens using Lightning Service Authentication Tokens (LSAT/402) protocol. Our goals revolve around providing services to help small STX token holders participate in proof of transfer. Our project rStack is a fully decentralised application using Gaia for data storage.
The Clarity contract is part of a more ambitious project. Its purpose is to transfer STX tokens and register btc reward addresses, linked transparently to the STX holder address. One component of the solution enables fraud proof swaps of btc for stx over the Lightning network using the LSAT protocol.
The clarity contract here provides the transfer function of the stx tokens that have been purchased independently via a lightning transaction and also a register for the stackers reward address. The registration happens in conjunction with payment for STX tokens via LSAT generates and in so doing a macaroon is registered that proves the service level agreement by locking in some key information. Combining the macaroon with the Lightning payment preimage provides a proof of payment and locks in some meta data. Using this technique the user can authenticate their bitcoin address while purchasing stx tokens and then register this information with the Clarity contract.
In this application, rStack combines LSAT and Clarity to provide a fraud-proof swap. Here, a buyer can prove the transaction of Lightning network using the preimage and the Stacks 2.0 Blockchain. If the buyer doesn’t receive the STX, the evidence would be transparent e.g. via the Stacks 2.0 explorer. The user record of the payment and transaction details are stored via Gaia and available in their rStack transactions history page.
We're inspired by the potential of the technologies and are excited to be involved in opening up and bringing new people into it.
Working as early adopters of new technologies is always a challenge. We are still a long way from working out all the details here but feel this is a valuable project and look forward to making real contributions.
What we learned
We have learned a huge amount about Proof of Transfer and the Stacks 2.0 blockchain. The biggest win is the team of very bright people who are now starting to run with the ideas in the Blockstack and Blockchain ecosystems.
Check out our web application rStack.