Agalta Protocol white paper
Since the birth and operation of Bitcoin, blockchain has been affecting and changing our real lives. Digital currencies such as Bitcoin (BTC) and Litecoin (LTC) have made programmable trustless currencies a reality. Ethereum (ETH) with Turing’s complete smart contract function has opened up a wide range of blockchain applications. Monero (XMR) and Zcoin (ZEC) allow users’ privacy to be protected to a greater degree due to their unique technologies…
However, while gaining the rights and asset freedom granted by the blockchain, we pay greater costs and sacrifice the efficient processing methods of centralization. Take Ethereum as an example, the data has exploded in the past year (2020). The number of new addresses stayed at around 200,000 per day, and the average gas price reached the highest level of 342.14 GWei, an increase of 22 times throughout the year. As the largest public chain Ethereum with a strong ecology, TPS’s status quo of only 20–30 will be difficult to support its continued development.
There are many technical routes to solve the problems of public chain performance and gas fees. We follow the basic law of the ternary paradox (It refers to at most two of decentralization, security, and scalability. In other words, the three attributes cannot reach the best state at the same time. There should be trade-offs, prioritization, or dynamic optimization) . The layer-2 Agalta solution is proposed: a high-performance cross-chain protocol that supports multi-chain ecology.
1 . Agalta Protocol
1.1 Introduction to the Protocol
Agalta Protocol is a high-speed, secure, and credible decentralized cross-chain protocol. It is the first batch of layer-2 expansion protocols that support Ethereum. It efficiently solves the two core problems of Ethereum congestion and high gas fees. It expands the scale of the internet to existing and future blockchains through side chain expansion technology, which helps developers to quickly build Dapp applications and carry out large-scale commercial applications.
In the future, Agalta Protocol will continue to focus on the construction of the public chain Layer-2 cross-chain DeFi ecosystem, and launch a multi-chain and cross-chain research and development plan, gradually open the Layer-2 high-speed cross-chain network of multiple public chains including Binance Smart Chain, Huobi Ecological Chain, Polkadot Main Chain, and OKT, gradually open up the enterprise development toolkit, support DeFi projects and products on the one- click Fork Ethereum, and become the cornerstone of the global public chain DeFi ecology.
Core advantages of Agalta Protocol:
Due to the continued popularity of DeFi projects, public chains supporting DeFi projects such as Ethereum have encountered many problems such as long block time and slow confirmation speed, which limits the further expansion of the transaction scale of many Dex projects such as Uniswap. Decentralized exchanges face pain points such as low throughput, slow processing speed, and high gas costs, which directly lead to the users’ poor trading experience, making the trading experience of decentralized exchanges incomparable to traditional centralized exchanges.
Agalta Protocol supports ETH and the ERC20 tokens on it to quickly recharge to the Agalta chain by adopting the underlying technology of the AgaltaAPI framework, and supports the exchange transactions of the latest AMM model, so that all exchanges are completed on Layer-2. This reduces the users’ transaction costs while ensuring the users’ overall transaction experience. Compared with traditional DEX, DEX products using Agalta Protocol have the following advantages:
· Decentralized network: an efficient, safe, and credible decentralized side chain network. The first batch of layer-2 expansion protocols that support Ethereum features scalability and robustness.
· Cross-chain anchoring: AGAT provides a two-way anchored Aga-adapter (adapter) for ETH and other ERC-20 tokens to transfer them to the Agalta chain and provide an EVM- compatible execution environment for DeFi applications.
· AMM model: The newly optimized AMM model automatically prices assets by using the pricing algorithm in the smart contract and creates a liquidity pool for each transaction token. The AMM pool provides liquidity for asset transactions in an automated manner.
· Ultra-high TPS: On the high-performance cross-chain network based on the AgaltaAPI framework, the theoretical TPS performance is as high as 140,000+, far exceeding the existing blockchain transaction performance.
· 0 Gas fee: The unique layer-2 architecture avoids network congestion and the high gas fee. The 0 gas fee allows users to trade freely without worrying about high handling fees and network delays
· Real-time transactions: All transactions are migrated to Layer-2. Users can conduct realtime transactions without waiting for the confirmation time of a block.
· Privacy and security: Based on the advantages of blockchain distributed structure, anonymity and non-tamperable data, the data privacy of transaction users is fully protected, which avoids personal data leakage and data loss
1.2 Cross-Chain Architecture
The Agalta Protocol cross — chain architecture consists of Aga — adapter, Aga -Hub cross — chain gateway, ACCP cross — chain communication protocol, and Layer- 2 Agalta chain relay cross — chain network.
• Aga-adapter: the application chain adapter. It listens to the ETH Layer-1 main chain event information, and transmits the information to the Aga-Hub gateway through the ACCP cross-chain communication protocol.
• Aga-Hub: the cross-chain gateway. It provides communication routing and other functions for Layer-1 and Agalta relay chains according to the ACCP communication standard.
• ACCP: Agalta Cross-chain protocol. The cross-chain communication interaction under the Agalta Protocol all adopts the ACCP standard.
• Agalta chain: Agalta relay cross-chain network. It carries all transactions and clearing settlement as a Layer-2 network. It features ultra-high TPS (theoretical 140,000+), 0 Gas feez and low latency.
1.3 Technical Comparison
In recent years； more and more blockchain researchers and developers have devoted themselves to the research of the underlying technology, trying various technical means to improve the state of the entire network. So far, in the Layer 2 expansion solution, the most discussed topics include stateful channels, Plasma, ZK Rollup, and Optimistic Rollup. The following table lists the comparison of the main indicators of the common blockchain La yer-2 expansion technology Agalta Protocol.
1 .4 Creating an Account
Before formally using the Agalta protocol, users need to register a personal account in the Agalta relay cross — chain network. The account is completely decentralized. The users needs to keep their private key or mnemonic by themself. The accounts will continue to be optimized and improved in the subsequent development process. The account creation process is integrated into the original account system, which simplifies the use process.
1.5 Asset Recharge
When monitoring that the user transfers the assets on the ETH public chain to the specified receiving address, Aga-adapter immediately transmits the recharge information to Agalta through Aga-Hub. The cross — chain anchored smart contract on the Agalta chain mints the same amount of Tokens under its account. The recharge process is complete.
1.6 Asset Withdrawal
Asset withdrawal is the reverse process of asset recharge. The user initiates and calls the wallet signature, and transmits the signed data to Aga -hub through the ACCP protocol channel. The forwarding of the routing information triggers the event to Aga-adapter, and then Aga- adapter signs the withdrawal information and sends it to the ETH public network for packaging.
Users will receive the corresponding Token assets in the Layer-1 main chain. At the same time, the Token corresponding to the user on the Agalta chain is destroyed. The withdrawal process is complete. Users can check the type and quantity of the tokens that have been withdrawn in their wallets.
1.7 L2 Asset Transfer
L2 asset transfer refers to the user’s transfer in Layer-2. Agalta relay cross-chain network transaction TPS exceeds 140,000+, with low latency and 0 gas fee. Asset transfer on the Agalta chain of Layer-2 has a silky experience that cannot be achieved on Layer-1.
1.8 Data Browser
All historical data and real-time market data of transactions through the Agalta protocol can be queried and obtained in the data browser.
Historical data: Users can query each transaction’s details (Transactions), account assets (Accounts), token assets (Tokens), transaction pair assets (Pairs), and main chain block data (Blocks).
Market data: Users can query the asset distribution (TVL, Total Value Locked) of Dapp applications that apply the Agalta protocol, real-time liquidity distribution of transaction pairs (Liquidity), transaction data (Swaps), deposits (Deposits) and withdrawal data (Withdrawals)) and fee data (Fees), etc.
1.9 Multi-Chain and Cross-Chain Mode
The Agalta protocol preferentially supports the layer-2 expansion of Ethereum, and efficiently solves the two core problems of Ethereum layer-1 network congestion and high gas fees. In the future, we will expand the scope of layer-2 applications, connect to multiple public chains such as Binance Smart Chain, Huobi Ecological
Chain, Polkadot Main Chain, and OKT, and persistently build a more prosperous layer-2 ecological network.
2. Application Scenarios
The development of DeFi has made the “ceiling” of Layer-1 more obvious. When the Ethereum 2.0 mainnet is officially launched, the second-tier expansion is imminent. Many DeFi applications expect to be built on Layer-2, and the Layer-2 DeFi ecosystem will continue to grow. The Agalta protocol solves the problems of low ETH Layer-1 performance and high gas cost, so it is more suitable for more application scenarios.
2.1 Digital Currency Exchange Transactions
The Agalta protocol preferentially supports the most advanced AMM model exchange transactions in the industry. It transfers ETH and other ERC-20 tokens to the layer-2 cross-chain network for fast transactions through a combination of key technologies such as smart contracts, cross-chain gateways, and atomic exchanges. It provides safer operations and more transparent clearing and settlement than centralized asset trading models.
2 . 2 Mortgage Lending
The Agalta protocol supports one-click aggregated lending services of the layer-2 network, which aggregates current mainstream DeFi lending platforms, such as Compound, MakerDAO, Aave, Cream, and dYdX. This will greatly expand the underlying assets that can be used for lending, enhance the liquidity of users’ assets, optimize the best interest rate, and reduce users’ borrowing cost.
2.3 Financial Management and Insurance
Wealth management can increase the value of users’ assets, and insurance can make users’ assets at ease. The Agalta protocol adds investment, wealth management and insurance services to the existing layer-2 network digital transaction exchange service. The corresponding fund companies and commercial banks operate their wealth management and insurance business. The aggregated farm and earn of the underwriting pool and the insured pool are added on the basis of insurance. This allows the insurer to obtain additional income on the basis of the basic premium income, and allows the insured to obtain a certain income on the basis of risk transfer.
2 .4 Asset Custody
Compared with the traditional financial market, the digital currency market is still in its infancy. Many infrastructures are immature and there is a lot of room for development in the future. Digital asset custody is one of the most important basic settings. The Agalta protocol supports the custody of digital assets on the layer-2 network, and ensures the safety of user funds through multi-signature verification.
2.5 DeFi Machine Gun Pool
The concept of machine gun pool originated from PoW mining. In the DeFi field, the principle of the machine gun pool is similar to that of the traditional machine gun pool. It is a strategic mining pool that achieves optimal returns through intelligent scheduling.
After Layer-2 is officially launched, it will gather a large number of users’ assets. Developers can access excellent machine gun pool products, and automatically select and configure products that are most in line with the interests of investors from the complex DeFi liquid mining products based on factors such as annualized rate of return, safety factor, and financial management cycle, which makes complex liquidity mining extremely simple and trouble-free. In addition, under the continuous turbulent market conditions, the machine gun pool has brought stable and continuous investment income to crypto investors.