Introducing Swingby: BTC on Ethereum
The decentralized lending protocol for issuing an ERC20 BTC Token.
The usage of Bitcoin on the Ethereum blockchain brings a number of benefits for both the Ethereum and Bitcoin ecosystems. It enables Bitcoin holders to use the wide variety of decentralized applications and exchanges that are already available on Ethereum and the extra liquidity will open up more opportunities for the whole network.
However, bridging two separate blockchains in a trustless and decentralized way is not an easy task. There are several possible approaches to tackling this problem each with their respective trade-offs.
Kyber Network has recently announced WBTC, their take on a Bitcoin token that works through a transparent custodian locking up 1 Bitcoin for each WBTC.
Another take on representing a currency on Ethereum is through a stablecoin. MakerDAO was able to create a soft-peg to the US dollar through their stablecoin DAI. MakerDAO was able to achieve a truly impressive model because of their approach. There is no central custodian and each DAI is minted independently with all its collateral spread over a decentralized network of custodians.
We have also been working on this problem and this is our take on it. An ERC20 token that is minted in a decentralized way with some aspects similar to MakerDAO.
What is Swingby
In one sentence:
Swingby is a decentralized cross-chain lending protocol which soft pegs Bitcoin and Ethereum using decentralized custodians.
Swingby’s goal is to create an ERC20 stable token for Bitcoin on Ethereum. This happens through a lending protocol where the main emphasis lies on decentralization. The decentralized lending mechanism keeps custody over bitcoin and lends it as ERC20 tokens. This results in a soft peg between the Bitcoin and Ethereum blockchains, and makes sure that the custodian is decentralized.
Decentralized lending mechanism
The Swingby protocol is a decentralized mechanism where users can either earn profit by lending out BTC or can come to mint BTC Tokens. Someone who mints BTC Tokens is actually borrowing regular Bitcoin from the lender, but is represented as a BTC Token.
The lender can earn profit from the protocol by lending out BTC. This is done by locking BTC. At this point a borrower is already decided and the BTC is locked inside a kind of Hashed timelock contract (HTLC). The HTLC used in the Swingby protocol achieves a trustless escrow between both parties. The mechanism is similar to an atomic swap. However, with the Swingby protocol this atomic swap is not immediately concluded. The BTC that is locked is instead passed on to the borrower in the form of debt. This means that 1 BTC Token owned now by the borrower represents the debt of 1 BTC, and thus the same value.
This being said, the borrower is only able to mint his BTC Token by providing ETH for collateral. This effectively makes his debt into a collateralized debt position (CDP); a concept also used in the stablecoin DAI by MakerDAO.
With the Swingby protocol however, it is possible for the borrower to clear his position and receive real Bitcoin by burning his BTC Tokens. This also concludes the atomic swap between the two parties, therefor passing the locked ETH collateral to the lender and adding a small interest amount.
This is how the Swingby protocol creates a 1–1 soft-peg between BTC and the BTC Token while keeping the custodian decentralized, which is the main focus of Swingby opposed to other solutions. Because in the Swingby protocol the lender is incentivised and anyone can participate it creates a situation with optimal custodian decentralization.
Similar to MakerDAO, Swingby utilises governance tokens. This is used for community voting on decisions concerning witnesses and the Oracle price feed to monitor the BTC value.
Here is a short demo of what you can do with Swingby.The source code can be found here on Github and be tested out locally.
Currently we are developing the first version of the Swingby protocol. In the first quarter of next year we plan to release on the Ethereum test-net. And in the future we want to bring the BTC Token also onto other chains.
The Swingby project has previously received a grant from the Ethereum Community Fund (ECF) and Zilliqa. We are very grateful for this and it allowed us to work on the architecture and model of the protocol for the past year. We are currently looking for partners and DEXes who are interested in our lending protocol. Please contact us if you’re interested.
In addition to this blog post we have also made our White paper available here. We are also doing further research on further improving our model with the usage of trusted execution environments.
- Website: https://swingby.network
- Email: firstname.lastname@example.org
- Twitter: @SwingbyProtocol
- Github: SwingbyProtocol/Swingby
- White paper: https://assets.swingby.network/statics/SwingbyWhitepaper.pdf