Trust Machines Logo

Trust Machines App Spotlight: LNSwap

How LNSwap creates a decentralized swap protocol between Bitcoin and Stacks.
Read Time 4 min
Featured Image
Table of Contents
Share This Article

*** As of May 31st, 2024, the LNSwap front end will be taken down and will not process further swaps. The website, Discord, and social media will also no longer be operational or monitored and will redirect to the open-source project on GitHub. ***

Crypto users and participants in decentralized finance seek ways to facilitate rapid and seamless swaps. Whether those swaps are on Bitcoin, Ethereum or other L1s, users actively need solutions that bring productivity to their assets. 

LNSwap, a protocol developed in part by Trust Machines, is solving this for Bitcoin DeFi.

What is LNSwap?

LNSwap is an atomic swap protocol that speaks to the very foundations of Bitcoin and the security, decentralization, and stability that the blockchain provides. Every user should have full transparency and control over their flow of funds, especially given that current centralized financial systems are prone to big security risks for users. 

LNSwap’s mission is to give users direct control over their funds and increased privacy.

How LNSwap Works

LNSwap is made up of three parties: users, liquidity providers and an aggregator.

Users looking to swap assets benefit from LNSwap. Once users begin swapping, their funds are locked into a very basic hash time-locked contract (HTLC) only for the duration of the swap which – through the use of a primitive or simple smart contract – enables a direct transaction between users without third party involvement. 

In short, LNSwap users experience a truly trustless transaction where they retain full control over their funds. This is complementary with the core ethos of Trust Machines – building resources that prioritize the values of the Bitcoin network.

Liquidity providers provide funds to the LNSwap protocol with assets that they own to facilitate swaps on our exchange. In return for providing their assets, liquidity providers are rewarded with fees that are generated by swaps that happen on the platform.

The aggregator essentially helps users find liquidity providers and communicate with them. Currently, LNSwap’s aggregator is a router that is used to forward swap information between users and liquidity providers. 

In the future, LNSwap’s aggregator will actually be an on-chain contract. Effectively, allowing anyone to spin up a frontend that would interact with the on-chain aggregator, providing an extra layer of censorship resistance to the protocol. 

The Future of LNSwap

The LNSwap team is currently working towards a roadmap that involves adding additional Bitcoin layer functions to preserve the security and integrity of transactions on its exchange. 

Integrations taking advantage of the latest improvements to Bitcoin and Lightning Network – like Taproot and Taproot Assets, and supporting Layer 2 advancements including Stacks 2.1 and the launch of Stacks Nakamoto Release.

Creating the bridge between Bitcoin, Stacks and other access points to Bitcoin DeFi is a mission that Trust Machines is proud to be a leader in, and our dedication to providing applications for Bitcoin users is helping to unlock the true potential of the Bitcoin blockchain. 

For more information, resources, or to try LNSwap for yourself, visit To see the full roster of applications and protocols being built by Trust Machines, visit our Products page.