Aggregation Layer

The Aggregation Age is Coming

The Aggregation Layer solves blockchain fragmentation by enabling sovereign chains to securely share liquidity, users, and state

Learn

TESTNET
Aggregation: A New Thesis

What is the AggLayer?

Aggregated blockchain design borrows the best of the monolithic and modular approaches to scaling. In its endstate, the AggLayer will provide a common language for secure, atomic interoperability among heterogeneous chains.

The AggLayer will be a decentralized protocol with two components: a common bridge + the ZK-powered mechanism that provides a cryptographic guarantee of safety for seamless, cross-chain interoperability. With ZK proofs providing security, chains connected to the AggLayer can remain sovereign and modular while preserving the seamless UX of monolithic chains

COMING FEATURES

Chain Aggregation

Aggregated blockchain design enables unified liquidity and shared user bases, while preserving chain sovereignty

Unified Liquidity

The TVL of all connected chains is shared, allowing developers to focus on use-case and product-market fit, not bootstrapping users

Sovereignty

The AggLayer will be compatible with shared sequencers and third-party DA solutions. Connected chains can even use their native token for gas

ZK Security & Low-cost

Yes, actually. With aggregation, the cost of verifying ZK proofs will be amortized among connected chains

BridgeAndDepositToKEOM.s.sol

From the library of bridge and call smart contracts for the AggLayer, this script will allow users to deposit into a token vault on Keom—coming to Astar zkEVM—from any chain connected to the AggLayer. A claim script then executes the deposit on the destination chain. Seamless cross-chain interoperability gives aggregated blockchains an internet-like UX

1// SPDX-License-Identifier: UNLICENSED
2pragma solidity ^0.8.20;
3
4import "forge-std/console.sol";
5import {Script} from "forge-
6std/Script.sol";
7import {IERC20} from "forge-
8std/interfaces/IERC20.sol";
9
10import {BridgeExtension} from 
11"@bridge-and-call/BridgeExtension.sol
12";
13
14contract AGG is Script {
15    function run() public {
16        vm.startBroadcast(vm.envUint("DEP
17LOYER_PRIVATE_KEY"));
18
19        // the bridge extension that 
20        // implements bridgeAndCall
21        address bridgeExtension = 
22            vm.envAddress("ADDRESS_BRIDGE
23_EXTENSION");
24
25        // the token we're bridging
26        address lxAGG = 
27            vm.envAddress("ADDRESS_LX_AGG");
28        // the contract that gets called
29        address lyKeomHelper = 
30            vm.envAddress("ADDRESS_LY_KEOM_
31HELPER");
32
33        // arguments to KEOMHelper.
34        // depositAndTransfer(...) - these 
35        // are values in Ly
36        address lyAGGbw = 
37            vm.envAddress("ADDRESS_LY_AGG_B
38W"); // the token to deposit
39        address lyKAGGbw = 
40            vm.envAddress("ADDRESS_LY_KAGG
41_BW"); // the keom market (specific 
42               // for the token)
43        uint256 amount = 
44            vm.envUint("AMOUNT_IN_DECIMAL
45S"); // the amount
46        address receiver = 
47            vm.envAddress("ADDRESS_DEPLOY
48ER"); // the receiver of the kTokens
49
50        // this happens in Lx
51        // allow bridge extension to spend 
52        // the lxAGG for bridge and call
53        IERC20(lxAGG).approve(address(
54bridgeExtension), amount);
55        // do the bridge and call
56        BridgeExtension(bridgeExtension)
57.bridgeAndCall(
58            lxAGG, // token to bridge 
59                   // (in Lx)
60            amount, // amount to bridge
61            "", // not using permit
62            uint32(vm.envUint("LY_NETWORK
63_ID")), // destination network id
64            lyKeomHelper, // contract to 
65                         // call (in Ly)
66            receiver, // fallback address
67            abi.encodeWithSelector( // the 
68                                   // call data
69                bytes4(keccak256("depositA
70ndTransfer(address,uint256,address,
71address)")),
72                lyAGGbw,
73                amount,
74                lyKAGGbw,
75                receiver
76            ),
77            true
78        );
79
80        vm.stopBroadcast();
81    }
82}
83

Projects building together on the AggLayer