everPay Protocol Light Paper

everPay[1] is a real-time financial protocol for blockchains made by everFinance. Locking up crypto assets from public chains into smart contracts can help map them into its protocol for users to make transfers and payments. everPay reduces the transaction cost to as few as 1 dollar for up to a million transactions. The storage-based Consensus paradigm frees everPay from performance limitations and makes it a rival for traditional internet applications in TPS, which depends on nothing but the application architecture and server performance.

everPay is used for token payment as Stripe[2] is for fiat payments. The everPay protocol has important blockchain properties —— transparency, trustworthiness and immutability. It allows anyone to become a detector in order to monitor ledger changes within the system. Besides, an explorer is available for any user to view the everPay ledger, thus ensuring one-to-one mapping between locked-up assets and its wrapped counterparts in circulation.

Storage-based Consensus Paradigm

The storage-based Consensus paradigm[3][4] (Abbreviated as SCP) is the next-generation paradigm for blockchain application development proposed by everFinance. In Ethereum’s model, computations are executed by all the full nodes, which then generate and store the global state for query. Different from it, the SCP manages to separate computation from storage. To be more specific, the blockchain is merely used for data storage, while the off-chain clients/servers are responsible for executing all the computations and storing all the states generated.

The SCP uses off-chain smart contracts, which can be written in any programming language, with all the inputs coming from a storage-based blockchain. In this paradigm, the blockchain is very much like a hard drive and the off-chain smart contracts can be run on any device with computing capabilities. Using a blockchain as a hard drive ensures the immutability and traceability of the stored data, which is thus guaranteed to be trusted. As a result, off-chain smart contracts can ensure the ultimate consistency of state by performing computations on trustable data.

The applications built on top of the SCP feature both the transparency and trustworthiness of blockchains as well as the high performance and availability of traditional internet applications. The SCP has the following advantages:

Empowerment by SCP
Empowerment by SCP
  1. Composability: Business operations between traditional financial services requires account checking, which is complex and error-prone. Using a SCP can include all the financial transaction records in the blockchain, thereby converting the traditional financial services into blockchain applications. This facilitates not only automated account checking, but also rapid coordination and efficient combination of applications.
  2. Low Development Barriers: Smart contracts are required to be written in Solidity using an EVM, while off-chain computation programs can be written in any programming language. That Makes it so developers can convert traditional applications into blockchain applications.
  3. No Performance Limitation: Off-chain computation delivers superior performances similar to traditional applications because the off-chain servers can process massive transactions. In this way, the TPS merely depends on the machine performance of servers and the technical architecture of applications.
  4. Low Consensus Cost: It’ll only cost 1 dollar to process up to a million transactions.

The SCP is designed by the inspirations of Arweave’s smart contract SmartWeave and Ethereum’s L2 scaling solution Rollup, which improves their availability.

Improvements on SmartWeave

SmartWeave is a smart contracting platform built on top of the Arweave network. It allows users and developers to build programs whose execution is trustable and decentralized. One of the unique features of SmartWeave is the process of lazy evaluation, which removes the burden of processing smart contracts from the nodes and moves it to the users. This means that, instead of running every piece of code on every machine in the network, contract states are computed locally on the machines that request them.

SmartWeave[5] is a decentralized contract platform that is open to all. The off-chain computation enabled by SmartWeave delivers higher scalability at the expense of introducing a new problem. The problem lies in that SmartWeave is prone to DDoS attacks, which means a large amount of invalid data is transmitted to all the computing nodes via Arweave, leading to latency in consensus and unavailability. When DDoS attackers maliciously send massive false transactions to the blockchain, node clients have to download them before verifying, therefore taking up a large part of bandwidth. In this case, valid transactions are submerged in the flood of false transactions, lowering the accuracy rate of data. To some extent, DDoS attacks may even lead to latency in client state computation.

To prevent DDoS attacks and ensure the availability of applications, everFinance has introduced a coordinator to compute and verify all the data of applications for the first time, and then includes batches of data into the chain. The coordinator acts like a rollup built on top of Ethereum by packaging transactions in batches, then including them into the chain. All the data packaged can be verified, SmartWeave’s “lazy evaluation” ensures verifiability, and Rollups guarantee the data accuracy which helps avoid DDoS attacks.

Technical Architecture

The everPay protocol operates on top of a DAO with complete transparency and verifiability. The DAO applies the SCP in both data sharing and computation. The DAO members fall into three categories —— a coordinator, detectors and watchmen. The DAO has an independent component ProposalHub, which is used to collect and aggregate the proposals and signatures of the DAO members and then execute proposals.

How we work
How we work

In the protocol, all of the DAO members integrate the same off-chain smart contract code, and conform to uniform business rules. Without independent data communication, the contract programs among different members completely rely on Arweave for data communication and downloading. The contract programs will connect Arweave for data downloading, and transactions will be processed in the same sequence as they are stored in Arweave. After obtaining transaction data, the contract programs will compute them in the off-chain smart contracts to generate the final state with consistency.

The Coordinator

The coordinator verifies transactions and then includes valid ones onto the blockchain. Each and every transaction is verified in real time, a batch of verified transactions will eventually be packaged into a batch that will then go onto the blockchain. When receiving users’ transactions, the coordinator’s server will perform computation and verification in real time, and then update its balance to the latest state. The coordinator is a highly available back-end service program that guarantees the sequence and validity of transactions. It will include a batch of transactions into the chain according to the time order every few minutes.

Despite its ability to verify transactions and include them onto the chain, the coordinator is unable to attack the DAO ledger. The reason for it is that all the DAO members verify the ledger on their own. A consensus is reached on the basis of the off-chain smart contract programs and trustable data instead of being determined by the coordinator. With the SCP ensuring its objectivity, the consensus is actually not affected by any of the DAO members. In the DAO, the coordinator is just like an accountant who only maintains the ledger, but has no access to the assets. The cross-chain transfer of assets is handled by watchmen. For in-depth details, go to the “Watchmen” section.

To ensure an optimal user experience as well as real-time transactions, the coordinator has an independent node for now. It can censor transactions when putting them in order. However, the censorship timeframe can be as little as 10 minutes from transaction collection to inclusion onto the chain. It is important to note that a single-node coordinator may result in transaction censorship and ordering. To limit these risks, an everPay token will be created in order to enable mechanisms like staking and slashing.

Detectors

The off-chain everPay protocol smart contract code will be open sourced so that it can be run on anyone’s device to compute the everPay transactions.

Anyone can be a detector in everPay’s protocol as long as they download the off-chain smart contract code. It will automatically load the transaction data onto Arweave, then they’ll be able to compute and verify transactions. When their programs sync to the latest Arweave block, detectors will obtain the final state of the application. Since all the detectors run the same everPay protocol code with immutable and traceable on-chain data as an input, the final state obtained by each detector is consistent.

Watchmen

In the everPay protocol, watchmen play a crucial role in multi-sig governance. They are responsible for creating and signing proposals. A proposal will be executed only when it is signed by most of (i.e. more than 51% of) the watchmen.

The ultimate everPay protocol security is ensured by the objectivity of the SCP and the Arweave network. Watchmen can manage the assets locked by users through proposals. When creating a proposal, watchmen need to handle it with the off-chain smart contract code. Moreover, proposals are created and signed in automated ways. Since the final state generated via the off-chain smart contract and on-chain trustable data is immutable, the everPay protocol will automatically detect it and create a quick response if any watchman submits any invalid proposals.

Watchmen guarantee the legitimacy of multi-sig governance. In the SCP, the consensus is secured by Arweave’s perpetual storage. Even if there are only a few watchmen, a strong consensus can be built around the application. However, just as any upgrade of an Ethereum node needs to be accepted by miners, any change to the off-chain smart contract requires approval of watchmen. If a program to be upgraded is agreed upon by watchmen, the process of creating proposals needs to be adapted to it.

ProposalHub

The proposalHub is used to collect the signed proposals from watchmen in order to be executed. Despite the fact that it is not required, ProposalHub can boost the efficiency in collecting and executing the signed proposals.

Account System

The everPay account system is a highly flexible support to account systems of various blockchains.

When a blockchain wallet that everPay supports is connected to everPay, the wallet address will be set as the ID of the corresponding everPay account by default. For example, if the Ethereum wallet 0x263…859 is connected to everPay, the ID of the corresponding everPay account will be same as the Ethereum wallet address; if the Arweave wallet 5NP...HXo is connected to everPay, the ID of the corresponding everPay account will be same as the Arweave wallet address. Furthermore, all the everPay transactions are signed using the private keys that correspond to the everPay account IDs.

everPay currently supports Ethereum and Arweave. As a growing number of blockchains are supported, everPay will allow more blockchain addresses to be set as everPay account IDs in the near future.

Internet Account

everPay also supports traditional internet accounts so that your email addresses or phone numbers can be set as account IDs. In addition, the WebAuthn[6] technology allows everPay to use the encryption chip embedded in devices like phones to be the private key of an everPay account. To ensure account security, your everPay account can be bound to your hardware device. When making an everPay transaction, you need to sign it by calling in the encryption chip in your hardware through biological recognition. If your device is lost or needs to be changed, your everPay account can be recovered through your email account in a secure way. Take the Gmail account recovery for example. To avoid forgery, all the emails are signed using Google’s security key, which can be verified with cryptography. With the signature verification functionality of emails, everPay’s account system can verify the signed email content for account recovery.

Another method of account recovery is contact verification. You can set multiple key contacts as guards for your account in advance. For account recovery, you can replace the public key of your everPay account by using signatures of multiple guards. The method is very similar to that of the smart contract wallet Argent.

Payment OpActions

To adapt to different payment scenarios, everPay supports a variety of opActions. Users and merchants can use different payment opActions according to their demands. As the payment businesses expand, everPay will support more payment opActions.

All the payment opActions can be integrated into applications by downloading the everpay-js SDK. It requires only a few lines of code to call the opActions in order to make transactions.

Basic OpActions

Mint

Before making payments, you need to deposit native assets from other blockchains into everPay first. When making deposits, you only need to pay the transaction fees charged by the blockchains where the deposits come from. Different chains have different mint times, deposits from Ethereum require 6 blocks to confirm, while those from Arweave require 15 Arweave blocks. When successful, the balance on your everPay account will increase accordingly.

Burn

You can burn the assets in your everPay account to get them back to their native blockchains. For this to occur, you have to wait for watchmen to detect your burn transaction after it is packaged with other transactions and included into Arwearve. Watchmen will verify all the burn transactions independently and then create corresponding burn proposals. As long as a burn proposal is signed by over 51% of watchmen, it will be executed on the native blockchain to unlock the original assets. After it succeeds, the balance on your everPay account will decrease accordingly. The burned assets will then return to their native blockchain.

Transfer

You can make a transfer as long as your everPay account holds assets. However, the transfer differs from a blockchain transfer, which charges you a gas fee in order to pay miners. An everPay transfer in its essence is a meta transaction, which means you can pay the transaction fee with the assets to be transferred. It needs you to sign with your own everPay private key. All the transfers sent to the coordinator are verified instantly, and the invalid ones dismissed.

To date, everPay has supported the account models for Ethereum and Arweave. Making it that recipient address in a transfer can be either Ethereum or Arweave addresses, but the recipient is not required to register in everPay, which supports any valid Ethereum or Arweave address by default. In the future, everPay will integrate more blockchains to support their account systems. Integrating Internet accounts in the future will allow assets to be transferred between blockchain accounts and Internet accounts.

Bundle

everPay allows multiple transfers to be bundled in a single transaction for execution, which is equivalent to the transactional execution of multiple transfers. When you make a bundle transaction, each of the transfers bundled in it must be executed successfully. If any of them fail, the whole bundled transaction will be reverted.

In addition to making payments to multiple recipients at once, a bundled transaction can be used in decentralized token swaps where the transfers among multiple counterparties are bundled in a single transaction. This can help ensure that the transfer bundles will be settled only after each of them are done successfully.

Aswap

Aswap is a transaction opAction specially designed for the orderbook mode. Different from a bundled transaction, an aswap transaction refers to an atomic swap of assets between a makers and a takers. If the makers and takers transaction amounts do not match, the aswap transaction will be reverted.

Timelock

In certain trading scenarios, before a transaction is settled between two parties, one’s assets may need to be locked for a period of time until the other provides proof.

Let’s see how a time lock protects both buyers and sellers from fraud during online shopping. For example, Buyer A pays Seller B some money for Item c. After Seller B receives the order, it will take 3 days to send Item c to Buyer A. In this case, there may be two kinds of fraud:

  1. When Seller B is dishonest: After being paid, Seller B does not send Item c to Buyer A.
  2. When Buyer A is dishonest: After receiving Item c, Buyer A does not pay Seller B.

A timelock can help protect them from these types of fraud cases. With a timelock, the payment from Buyer A to Seller B can be locked for up to 4 days, which requires proof in order to be unlocked. If Seller B provides a proof within a specified period, he will receive the payment; if not, the payment will be returned to Buyer A.

everPay supports a variety of proof-to-unlock payment timelocks, such as the information on Ethereum, third-party arbitration, etc.

Use Cases

Real-time Payment

everPay provides you with nearly the same transfer experience as traditional payment service providers.

When making a blockchain transaction, you need to wait for the transaction to be packaged into a block, which may take several seconds to a few minutes varying with different blockchains. Such transaction experience is far from satisfying daily demands. However, everPay assigns the task of collecting transactions to a coordinator, thereby ensuring all the transfers can be verified in real time. When receiving users' transactions, the coordinators server will compute and verify them immediately, and then return the transaction state within milliseconds.

everPay's Ecology
everPay's Ecology

Cross-chain Token Transfer

The SCP empowers everPay with the native feature of cross-chain[7] token transfer. By integrating Ethereum and Arweave, everPay can map AR, which is Arweave’s native token, to WAR 1:1 on Ethereum. WAR(Wrapped AR)[8], which is the ERC20 format of AR, is governed by the everPay DAO with transparency and 100% verifiability. everPay offers a user-friendly cross-chain transfer experience. You can deposit AR to your everPay account via Arweave’s wallet ArConnect and withdraw its ERC20 counterpart to any Ethereum address. The whole process can be completed within an hour.

everPay will expand its cross-chain functionality to more blockchains and tokens. In the future, it is expected to be a token relay and payment layer that supports multiple blockchains.

Smart Account

everPay supports both blockchain accounts and internet accounts. Off-chain computation maximizes the flexibility of the everPay account system.

The threshold of the existing blockchain accounts is too high for average users. Asymmetric cryptography proves to be difficult to comprehend and the mismanagement of seed phrases leads to frequent leak of private keys. To solve these problems, everPay has built smart accounts with higher security ensured by binding accounts with hardware devices, and better usability enhanced by the biometric technology of hardware devices. Smart accounts offer the same experience as the existing internet accounts, making it easier for users to use blockchains.

Swap

In the payment opActions, bundle transactions and aswap transactions are basic tools in building a decentralized exchange[9].

A bundled transaction allows swaps among multiple counterparties. If one of the swaps fails, the entire bundled transaction will be rolled back. With bundle transactions, users and market makers can swap tokens in a decentralized manner. After a bundle transaction is signed by all the transfer parties, all of the transfers included in it can be concluded only when the requirements on both sides are met.

An aswap transaction is a basic payment opAction for decentralized exchanges in orderbook mode. A user can place an order at a given price with his signature, and any third party that accepts the price can fulfill the order. Both the maker and the taker can make a swap only at a given price.

Financial Management

everPay will provide users with cross-chain aggregated financial management services. Using off-chain computation to aggregate the financial management demands of users and execute them at once on Layer 1 can greatly reduce the cost of on-chain financial management. Plus with everPay’s smart accounts, the threshold of on-chain financial management is also lowered, bringing users the same experience as that of traditional financial products.

When users sign the financial management contracts using their private keys, the corresponding assets will be locked in everPay with a timelock. Watchmen will interpret these financial management contracts and create proposals. Valid proposals signed by over 51% of watchmen will be executed on Ethereum.

Token and Governance

At an early stage, everPay uses a DAO joined by established organizations to govern consensus. With the development of use cases and technologies, everPay will gradually replace the current governance model with a token governance model while ensuring security and ease of use.

For now, everPay will not develop a detailed token offering plan and will focus on the infrastructure build as well as the ecological construction. We will actively explore the token governance model and transition to a full DAO when appropriate.

Roadmap

2021

  • Support the bundle opAction
  • Support decentralized token swaps
  • PST cross-chain
  • Seek for watchmen partners

2022

  • Payment opActions
    • aswap
    • timelock
  • Internet account system
    • Gmail accounts can be used to register and manage everPay accounts.
  • Integrate more blockchains
    • Ethereum’s homogeneous chains like BSC
    • Cardano
    • Solona
    • Polkadot
    • Near

2023

  • Aggregated wealth management services
    • Support aggregated wealth management on Ethereum
    • Support aggregated wealth management on other blockchains
  • Fiat payment and OTC
    • everPay will support fiat payment.
    • OTC on/off-ramp

Reference

[1] everPay: A Trusted Cross-chain Payment Protocol. URL: https://medium.com/everfinance/everpay-a-trusted-cross-chain-payment-protocol-eba4a0af7d66

[2] Stripe. URL: https://stripe.com

[3] Storage-based Consensus Paradigm. URL: https://mirror.xyz/0xDc19464589c1cfdD10AEdcC1d09336622b282652/KCYNKCIhFvTZ1DmD7IpXr3p8di31ecC283HgMDqasmU

[4] A Storage-based Computation Paradigm Enabled by Arweave. URL: https://medium.com/everfinance/a-storage-based-computation-paradigm-enabled-by-arweave-de799ae8c424

[5] SmartWeave: Arweave smart contracts. URL: https://arwiki.wiki/#/en/smartweave

[6] WebAuthn. URL: https://webauthn.io

[7] Arweave to Ethereum cross-chain system design. URL: https://mirror.xyz/0xa2026731B31E4DFBa78314bDBfBFDC8cF5F761F8/Xqv0FgTzmKpgUymYYm19tz9svO-rsg_xR4aQqBCoNc4

[8] What is Wrapped AR? URL: https://medium.com/everfinance/what-is-wrapped-ar-c4b4375290b9

[9] Build DEX on everPay using Bundle transactions. URL: https://medium.com/everfinance/build-dex-on-everpay-using-bundle-transactions-bbd8e4bd0268

Subscribe to everpay.io
Receive the latest updates directly to your inbox.
Verification
This entry has been permanently stored onchain and signed by its creator.