SLP ship: unchain your SLP assets with Bitcoin Cash — Ethereum bridge

The beginning of 2021 appeared to be full of amazing events and one of the most remarkable is Coinparty Hackathon by Bitcoin Unlimited. The hackathon is focused on improving the Bitcoin Cash ecosystem and enhancement of the economical potential of the blockchain. We couldn’t help but join the party.

We got some SLP tokens a long time ago but still didn’t have any opportunity to use them. The assets are meaningful without quick and cheap dApps and as the technology-agnostic team, we decided to utilize the Ethereum platform for bringing the value for SLP tokens.

So, meet SLP Ship — the platform that enables transferring SLP tokens to Ethereum and back to Bitcoin Cash rewarding the original SLP holders.

Economics of asset travels

The first concern that might occur is something like:

Is the bridge even good for Bitcoin Cash community? If the asset is transferred to another blockchain, the users are engaged to use another platform, invest to it, use its software and if it is somehow more convenient the tokens may never come back to the original blockchain.

Meh, a good remark but it is only half-truths.

Simple Ledger Protocol isn’t new. There are hundreds of SLP tokens that are worth nothing or almost nothing because of a lack of use-cases. And the value won’t magically show up unless the users see growing numbers, raising profitability, arbitrage opportunities, rewards for lucky ones and so on so far.

The complexity of the solution that can be built with pure bitcoin script(and the high-level languages based on it) is limited which makes it challenging to build efficient dApps on Bitcoin Cash.

The easiest way to empower SLP tokens is to make them cross-platform: if the tokens issued 1:1 with original tokens are growing in price the original tokens are growing as well. Ethereum is just one of the appropriate platforms. And as a bonus, once the asset is eventually worth something the other parties are likely to find out how to utilize it on the native platform. And it seems to be good enough.

But the concept is a bit unfair for the true Bitcoin Cash enthusiasts who don’t migrate their assets to earn extra profit and who stick to the initial SLP ecosystem. So, to balance the issue the fee that raising with a duration of holding Wrapped SLP is introduced.

All the holders of the Wrapped SLP tokens on the Ethereum pay fees (that are currently about 1% per year) which is periodically burnt. Such an action causes inflation and thus increases the value of the tokens that left and makes holding wrapped SLP for a long time less proffitable.

In the scope of the economical model overview, the service fee should be mentioned: as the transactions for transferring the assets (looking ahead, that are done by multisignature wallets) cost some ETH and BCH the users are charged the fixed fees that covers such expenses and support the platform.

Explain as I am 7

To sum up, the assets crosschain transfers are economically rational and pretty favorable for all parties. So, let’s make tokens fly!

How it works

The SLP Ship allows migrating SLP tokens to Ethereum and back. The solution consists of the 4 main parts:

  • UI for user interactions.
  • Bitcoin Cash blockchian with SLP tokens and multisig for managing the assets.
  • Ethereum with ERC20 tokens that represent wrapped SLP tokens and multisig contract.
  • The backend that listens to the transactions and events in Bitcoin Cash and Ethereum and manages assets accordingly.

Let’s consider the flow of transfers in each direction separately.

Traveling abroad

If the user has some SLP tokens and eager for using them on Ethereum, he comes to our platform and chose the token, amount, and destination Ethereum address to receive the wrapped tokens.

The user connects to the Badger wallet and signs the transactions that transfer SLP tokens and BCH fee to the multisig. The destination address is stored in the transaction memo.

The backend instances notice the new confirmed UTXO of the BCH multisig, ensure the fee is paid, and confirm minting new wrapped tokens via the multisig contract on Ethereum. If the Wrapped asset contract doesn’t exist the new ERC20 is deployed beforehand. After all backend instances confirm the minting of new wrapped SLP tokens to the user address they can be used in an arbitrary way.

During the whole period while the wrapped SLP tokens exist the holding fee charged.

Actually, the fee calculation isn’t an automatic periodic process rather than the preprocess before any user’s action.

To the Motherland

Once the user doesn’t need the wrapped asset anymore he comes to the platform, specifies the wrapped SLP token, amount, and Simple Ledger address to receive the native SLP tokens.

The user connects to the Metamask wallet and signs the transaction that burns the wrapped SLP tokens and sends the service fee to the contract.

The backend instances that are subscribed to the events in the network notice the burning. One of the instances creates the raw transaction to the BCH multisig to send the SLP tokens, sign and distribute it to other instances. Once all the parties sign the transaction it is broadcasted to the network and the SLP tokens reach the destination address.

Welcome home, lovely tokens!

Summary

It is only a small part of the initial concept we came up with during the hackathon and were able to implement in time.

The list of possible features consists of but is not limited by:

  • adding transfer canceling;
  • implementing ERC20 transfer to the Bitcoin Cash and back;
  • implementing wrapped ETH on Bitcoin Cash;
  • implementing wrapped BCH on Ethereum.

We are really excited about the experience gained during the Coiparty Hackathon and believe in the bright future of the project!

Links

Demo:

Submission on Devpost:

Github:

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Announcing Cryptopal, a blockchain-based platform that reinvents how people and brands connect

To Avoid Suffering Over $308M Loss, Start from Crossing the Data Gap

Bitcoin — Common misconceptions about the invention of the century

Why This NFT Should Be Part of Your Collection!

Ways to Buy Real Estate in the Metaverse

metaverse

Measure decentralization of blockchains — a comprehensive approach

iBG Finance

Utilizing the voting features on ICONEX

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Anastasia Kondaurova

Anastasia Kondaurova

More from Medium

Breach MVP Sign Up Available NOW! Sign Up Today and Gain Exclusive Access!

Breach MVP is going live in Q2 2022, and we want to give up to 1000 community member exclusive access and chances to win digital assets. Breach MVP empowers gamers to find games and gamers, stream, matchmake and more!

GOORIDE — Leading the Ride and Earn, Share to Earn for Cyclist Community: Difference Creates…

CRYPTO SYZYGY : AMA Session With Metal Swap

Incube Chain the First Airdrop Event!