Technology

Consensus

Loom SDK has 2 layers of consensus. One at the P2P layer.

Loom Backend supports different BPFT engines, like Tendermint. In future we will support Raft for PoA chains.

Loom Consensus layer supports Loom DPoS or a configurable PoS/DPoS contract per Chain. Once Casper becomes available they will add support for this

Source

LOOM Delegated Proof of Stake

The delegated proof of stake algorithm allows token holders to elect witnesses. Witnesses act as validators of the blockchain, proposing blocks and verifying that transactions are correct. These witnesses serve a standard term length before being subject to elections again.

Candidate Registration

All candidates must register by specifying the public key matching their address.

Voting

Each coin account has up to a specified number of votes, generally equal to the number of witnesses. However, the power of each vote is proportional to the balance of coins the account holds. This ensures that accounts with more at stake have a greater voice in how the network is run. In the current implementation votes do not expire. This means that unless a vote is explicitly changed it is assumed that the account holder is satisfied with the job of the witness and will receive the account holder’s vote again in the next election. Unlike traditional elections, voting can be done any time so there is no “election day”, however votes are not counted until the election time.

Proxying Votes

In addition to voting directly for witness candidates, accounts can also proxy their vote to a trusted party. This means the proxy ends up with a vote power proportional to proxy balance + sum(balance of principals).

Elections

Any account can trigger an election if enough time has passed by sending a transaction to the network. Witnesses are elected by summing up the total voting power given to them and taking the top N candidates where N is the witness count specified in the initial parameters. This means that all witnesses end up with an equal chance of proposing a block no matter how many votes they received. If the minimum number of power required specified by the minimum power fraction is not reached then the witness set does not change.

Future Improvements

Bonding

In the future witnesses may lock up a specified number of coins that can be seized for bad behavior. This adds an additional incentive for good behavior beyond the witness salary.

Proof of Authority

Right now candidates do not have to proof their identity, but in the future it may be useful to enable on-chain notarization to verify candidates’ identities.

Alternating Election Cycle

Currently all witnesses are up for reelection at every election. It may be better to have an election cycle that differs from the term length.

Vote Expiration

Currently votes never expire, however, one can imagine a scenario in which votes expire after a certain time period. This would prevent lost or stolen accounts from having undue influence in elections. This can be done either by looking at the time the vote was cast or by looking at the last activity on the account.

Source

Loom Network Is Now Running 3 Sidechains in Production

1. GameChain: A Highly-Performant Sidechain Optimized for Interactive Mobile Games

GameChain is the chain that they’re currently using to run the Zombie Battleground. This chain is actually a sidechain to PlasmaChain, and doesn’t connect directly to Ethereum mainnet. This is because doing so allows users to earn new cards through playing, and trade them on the marketplace instantly, without needing to pay gas fees.

Users can choose to transfer their cards off PlasmaChain onto Ethereum mainnet whenever they want to, but having the PlasmaChain layer in between allows to provide a much better (and free) user experience — which is an ESSENTIAL step if Loom wants to onboard millions of new users into the crypto universe.

So what happens on GameChain itself? While the cards themselves are stored on PlasmaChain, GameChain is where everything else in the game takes place. Matchmaking, tournaments, ladders and player rankings, the individual moves in the matches themselves, and everything else that would traditionally happen on a backend web server happens on GameChain.

In the future, they will open up this chain to third-party game developers to deploy their games on, making it a dedicated sidechain for high performance mobile and PC games.

2. SocialChain: A Sidechain Optimized for Social Applications

SocialChain is the chain Loom is currently using to run DelegateCall. It was the very first sidechain Loom team has built, and is also their longest-running sidechain — in production since March 2018.

On DelegateCall, users can earn ERC20 tokens for their contributions (instead of useless karma points), which they can then withdraw to Ethereum mainnet. Loom detailed its infrastructure in this post.

In the future, they plan to open up SocialChain to other social network DApps that share similar feature requirements. (ERC20-based karma, sybil resistance, reputation-based transaction limiting, and so on).

Having dedicated chains tailored to particular kinds of applications allows us to optimize each chain for those types of DApps — whereas on Ethereum mainnet, you might have someone sending a Tweet competing in gas fees with someone sending a million dollars.

3. PlasmaChain: A Plasma Cash-backed Hub for Transacting Between Sidechains and Ethereum Mainnet

At first, ZombieChain was announced as “An EOS-like DPoS sidechain for Ethereum DApps.” Since that announcement, ZombieChain has evolved considerably. What happened is, Loom started building the marketplace for Zombie Battleground on top of ZombieChain — and as their feature list grew, they realized this chain had potential to become something much larger than originally intended. So it was decided to upgrade this chain to have it play an even more important role in the future of Loom’s vision: It’s going to become a central hub for token transactions, linked to Ethereum by Plasma Cash. Think of it like a bridge to Ethereum mainnet with a built-in Decentralized Exchange (DEX), that other sidechains can use for faster and cheaper transactions without ever touching mainnet. Such an important role demands an important name. Thus, Loom have decided to rebrand ZombieChain to “PlasmaChain.”

Here are some of the features that will be built into PlasmaChain:

Plasma Cash link to mainnet for native ETH, ERC20, and NFT (ERC721) support

link to mainnet for native ETH, ERC20, and NFT (ERC721) support Built-in DEX / marketplace functionality

functionality Native payments in ETH and LOOM

and Plans to integrate BTC payments in the future

payments in the future Plans to enable Plasma Cash links to “Layer 3” chains, with PlasmaChain as the parent chain. (Think “sidechains of sidechains”, in which PlasmaChain is the clearinghouse that enables trading of tokens between multiple sidechains without hitting mainnet.)

Loom will also be deploying multiple testnets in the near future, which they will open to third parties to deploy their DApps. These testnets may later evolve to become their own specialized production chains. But in the meantime, they’ll help Loom test third-party DApps and experiment with new features to eventually incorporate into the production PlasmaChain.

As the central hub that acts as a bridge between multiple sidechains and Ethereum, PlasmaChain will be one of the most important pieces in Loom’s vision moving forward.

PlasmaChain: A Plasma Cash-backed Layer 2 hub that other sidechains can transact on more quickly and cheaply than Ethereum mainnet.

Source

Universal Transaction Signing in 3 Steps:

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 to derive the correct identity. Plus, validators can vote to trust additional Layer 1s. 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. Finally — PlasmaChain and loom-js as special compatibility features that allow developers to sign universal transactions without having to change a single line of code in their dapp.

Source

How PlasmaChain Works

Depositing ERC20 Loom tokens into PlasmaChain Contract on Ethereum Mainnet:

As validation will be taking place on Loom Network’s PlasmaChain, ERC20 Loom tokens has to be transferred from the Ethereum Mainnet onto the PlasmaChain (which is based on Tendermint) before you can vote and delegate. As such, you will be required to create a Tendermint account and map it with an existing Ethereum address via Loom Network’s PlasmaChain Dashboard which will be launching soon.

The PlasmaChain Contract serves as a gatekeeper to ensure that the right amount of Loom tokens are available for delegators to utilize on the PlasmaChain.

Transfer Gateway picks up deposit event and pushes instruction for Coin Contract to mint Loom tokens on PlasmaChain:

A deposit event will be emitted after ERC20 Loom tokens are deposited into the PlasmaChain Contract. The Transfer Gateway Oracle will pick up the deposit event and push new instructions for the Coin Contract to mint the exact amount of ERC20 Loom tokens that have been deposited into the PlasmaChain Contract. These Plasma Loom tokens will be stored in the Tendermint account you created through Loom Network’s PlasmaChain Dashboard.

Delegators interacting with DPOS contract on PlasmaChain to delegate with a validator:

Through Loom Network’s PlasmaChain Dashboard, delegators will be able to search for the list of validator nodes and select their choice of validator. Once confirmed on the amount of Plasma Loom tokens to delegate and the delegation period, the delegate will query the Coin Contract to approve the desired delegate amount for use by the DPoS contract.

The delegator will be required to sign twice — firstly, to allow the DPoS contract to deduct Plasma Looms from your wallet on the Coin Contract; secondly, to allow the DPoS contract to transfer the stated amount of Plasma Loom tokens from your wallet to the validator’s address. Once the transactions goes through, you will be officially delegating and playing your part to bootstrap Loom Network’s PlasmaChain!

Source