REMP: Fair technology for the fair blockchain

REMP: Fair technology for the fair blockchain

The Everscale network is soon going to be upgraded with the Reliable External Messaging Protocol (REMP).

This is a major technological milestone for Everscale, planned for Q2 2022. REMP is now being released ahead of schedule, and that’s good news, because it will immediately make the network faster and more reliable. The protocol has already been included in the Everscale SDK, and it will make it to the mainnet after the other security upgrades. While it’s not out yet, let’s try to give it an overview, so we can understand how important it is for the network.

Reliable message queue

First, we have to define what a message is in Everscale: it’s a means of delivering information and instructions from one smart contract to another, or from a user to a smart contract. Messages initiate transactions, which are executed by smart contracts.

There are two types of messages in Everscale:

  1. Internal — a message from one Everscale blockchain account to another Everscale account that can carry information about a transaction. It doesn’t require any cryptographic signature. After receiving this type of message, the smart contract located at the target address can execute the requested transaction.
  2. External — a message sent and received from an external source outside the blockchain, usually from the user’s device. External messages need to be signed with the user’s key.

There’s typically no problem with internal messages, but things can get chaotic with external ones. In other blockchains, there’s no way to define a strict queue of external messages. In Ethereum and pretty much every other blockchain, it’s up to miners to decide the priority and order of transactions in the blocks. That’s why blockchain users have to deal with frontrunning, when their messages with trading orders for DEXes receive lower priority than frontrunners’ orders. REMP solves this problem and makes Everscale the only blockchain in the world that guarantees a strict order of message execution.

How REMP changes the game

REMP’s main purpose is to guarantee that messages are delivered from any network participants in a particular order within a sub-second timeframe.

When a network participant sends a message to the network, it gets accepted by the current validators and included in the message queue catchain (MQC) with a timestamp. They send an acceptance confirmation to the user, and this message is guaranteed to be included in the block. Even if the block production fails, the messages will be included in the same order they were received in the next block. If the message fails to be included in the block, all validators are punished by having their stakes slashed.

There’s also replay protection and anti-spam protection. If any user sends too many messages to the network which fail to be executed, they are banned for increasing periods of time.

A unique user experience

The best thing about REMP, which isn’t so obvious at first glance, is the opportunity to replicate the user experience of the Web 2.0 era. Interactions with even the most advanced blockchains are very slow, taking from five to 60+ seconds, which doesn’t compare to the instant response from regular SQL databases. Everscale will also close this performance gap, making it possible for users to get a sub-second response.

Thanks to REMP, the message queue can’t be reorganized, so when a user clicks the button on, let’s say, a DEX, they can consider their request completed. Even while it’s not finalized, it’s possible to calculate the future state of the blockchain, send it to the dApp, and show the success status without waiting several seconds and having to look at a spinning loader on the screen. In practice, this means that the user will see the result of the operation within 0.2 seconds.

The REMP protocol thus makes it possible to simultaneously provide a better user experience, frontrunning protection, DDoS protection, and ensure that all external messages are received. Thanks to this, Everscale becomes not only the fastest blockchain in terms of TPS, but also the most interactive, blurring the lines between regular applications and dApps.

Read More