Universal Transaction Signing: Seamless Layer 2 Dapp Scaling for Ethereum 🔐

DR-Jason

3 years ago


TL;DR: Loom PlasmaChain now has the ability to verify and accept transactions signed by native Ethereum wallets — offering the most seamless user experience possible for Layer 2 dapp scaling. If you are curious about why this unique set of features are only possible on PlasmaChain — and why it is beneficial for both developers, and users — keep reading 😉

On March 31st, 2019 — PlasmaChain validators voted in favor of its first decentralized hard fork.

This hard fork added a set of functionality that allows any Ethereum user to use PlasmaChain dapps as seamlessly as any Ethereum dapp. Users can simply use their MetaMask account or any other native Ethereum wallet — further blending the line between Layer 1 and Layer 2.

If you are new here, you might be asking yourself…

What is PlasmaChain? 🤔

PlasmaChain is a Layer 2 hub that can bridge multiple sidechains to Ethereum mainnet — which allows for faster and cheaper transactions and a greatly improved UX for dapps that need quick confirmation times.
This is not mere conjecture either — it has been live and in production since late 2018.

PlasmaChain uses Delegated Proof of Stake (DPoS) for consensus — which means it's ideal for dapps with a user-facing component that require fast confirmations, while also maintaining a reasonable level of decentralization.

And since tokens are transferable to and from Layer 1 — it makes it the perfect complement to Ethereum.

Plus…

Dapps can issue their tokens on Ethereum — and move the more complex user-facing components to Layer 2.

But a major component in blockchains is that — you need to sign every transaction to prove your identity.

And the usefulness of a Layer 2 is limited if every user needs a separate account on that blockchain in order to use it.

For a bit of background, in case you are wondering…

How Does Transaction Signing Work? 🤔

Imagine that Vladimir wants to send $100 to Donald.

Vladimir tells the blockchain to send $100 to Donald, which will simultaneously deduct the same amount from his wallet.

The blockchain can easily read Vladimir's instructions — but it needs to first verify that Vladimir is actually who he claims to be, and not some bad actor pretending to be him.
So Vladimir encodes his instructions using his private key (which is protected by a password known only to Vladimir) — so that anyone can cryptographically verify that these instructions actually originated from Vladimir.

After the blockchain automatically (and cryptographically) verifies these instructions, $100 is deducted from Vladimir and credited to Donald.

T̶h̶e̶n̶ ̶D̶o̶n̶a̶l̶d̶ ̶p̶r̶o̶c̶e̶e̶d̶s̶ ̶t̶o̶ ̶s̶e̶t̶ ̶u̶p̶ ̶a̶ ̶s̶h̶e̶l̶l̶ ̶c̶o̶r̶p̶o̶r̶a̶t̶i̶o̶n̶,̶ ̶a̶n̶d̶

That's it 😉

As you might be already aware — most of the security on the modern web is protected by public key cryptography ¹ — and transaction signing on a blockchain works in a very similar fashion, with some important differences.

Let me tell you…

How PlasmaChain Became "Multilingual" and Why it's a Big Deal


So the technical differences of how different blockchains sign transactions vary quite a bit.

For example…

Ethereum and Bitcoin uses the elliptical curve secp256k1 ², which is good for backward compatibility.

On the other hand…

Tendermint and PlasmaChain use Ed25519 ³, which is 10x+ faster when performing verifications.

While a forked chain technically has the same source as the chain it forked from (like Ethereum Classic from Ethereum and Bitcoin Cash from Bitcoin), they remain incompatible, because otherwise — it could allow a bad actor to steal funds by submitting the same transaction to both chains.

PHEW.

Congrats — now you have a decent idea on the technical (and security) reasons on why Layer 1 chains all have different methods of signing and verifying transactions.
Here's the thing…
If our goal is to allow developers to write their code once and access users from multiple blockchains — then we need universal transaction signing.
Let me show you how we do…

Universal Transaction Signing in 3 Steps:

  1. First – PlasmaChain has been upgraded to be "multilingual" — meaning: it now has the ability to detect how a message is signed and use the appropriate elliptic curve (and our algorithms) to derive the correct identity. Plus, validators can vote to trust additional Layer 1s.
  2. Second – PlasmaChain contains a decentralized registry of wallet addresses that belong to the same user. So if a user can prove their identity using a Layer 1 wallet — it's also sufficient proof on Layer 2.
  3. Finally – PlasmaChain and loom-js ⁴ has special compatibility features that allow developers to sign universal transactions without having to change a single line of code in their dapp.
That might all seem complicated. But put simply:

When we combine all of the elements above — PlasmaChain will allow users to use ANY existing wallet compatible with ANY of our connected Layer 1s, without needing to do any extra steps.

What it feels like to use PlasmaChain
That's not all.

Those same users will be able to interact with dapps gas-free — and with speed (i.e. fast AF) on Layer 2 without leaving, switching wallets, OR downloading new software.

Then after you are done — you'd simply withdraw back to Layer 1 at your convenience.

The coolest part?
  • Verification is decentralized on PlasmaChain
  • There's no centralized service storing your keys anywhere
  • There are no extra tokens or plugins to install
  • There's nothing extra required by end users
Simply visit any UTS-enabled dapp on PlasmaChain and you'll be in business in no time.

Remember: you can just use your existing Ethereum wallets like MetaMask or any other mobile wallet 😉

This same functionality will be extended when we integrate Cosmos, EOS, and Tron — so users on those chains will be able to use their native wallets as well.

Question for you…

Are You a Developer? — Here's How to Get Started Right Now 🏁

If you are a developer, the simplest way to get started is to use web3.

If you are an existing PlasmaChain developer — simply change one line on your Loom Provider.

In other words…

Simply change this:


To this:

By default — the signer accepts any ethers-js signer.

Here's how to get one for MetaMask:


LOOM Dapps

https://dapp.review/explore/loom

More articles

1. Connecting Ethereum, EOS, and Tron: Making Blockchain Interoperability a Reality
2. ERC721x — A Smarter Token for the Future of Crypto Collectibles
3. Scalability Tradeoffs: Why "The Ethereum Killer" Hasn't Arrived Yet



Source: https://medium.com/loom-network/universal-transaction-signing-seamless-layer-2-dapp-scaling-for-ethereum-b63a733fc65c