project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4
project screenshot 5
project screenshot 6

Cross-ChAAin

Cross-ChAAin: Simplifying blockchain interactions. Swap ERC20s, deposit to L2, or convert tokens without ETH. Powered by our custom smart contract wallet and unique paymaster logic. #UX #Gasless

Cross-ChAAin

Created At

ETHGlobal Paris

Winner of

❌ Polygon — 🥇 Best LxLy Bridge Extension

🧠 Ethereum Foundation — Best ERC-4337

Project Description

At its core, Cross-ChAAin is powered by a custom smart contract wallet that offers users the flexibility to carry out various operations that are typically dependent on Ether (ETH). This proprietary wallet breaks down barriers by allowing operations such as:

  1. Swapping ERC20 Tokens: Users can directly exchange one ERC20 token for another, bypassing the traditional need to first convert to ETH.
  2. Converting ERC20 to ETH: Users can efficiently swap their ERC20 tokens for ETH without the usual complications.
  3. Depositing to L2: With the rising prominence of Layer 2 solutions for their scalability and cost-effectiveness, our wallet makes it a breeze for users to move their assets from Layer 1 to Layer 2.

An integral part of our solution is the unique paymaster logic we've developed. This logic addresses and overcomes several constraints. It ensures:

  1. That the paymaster is compensated at the end of every transaction.
  2. The token's value adequately covers transaction fees, reducing the risks associated with underfunded operations.
  3. An additional buffer of 2% in ERC20 tokens is taken to counter potential risks, ensuring that operations are smooth and secure.

A central challenge we've tackled is the traditional dependence on ETH for various token operations. With Cross-ChAAin, users can hold ERC20 tokens in their wallet and perform various actions without maintaining an ETH balance. This is particularly significant for users who may not wish to hold ETH or find the process of acquiring it cumbersome or counter to their investment strategy.

For users keen on operating within the L2 environment, Cross-ChAAin is tailored to be a game-changer. Our vision extends to enabling users to deposit assets directly to L2 and then swap to their desired token—all within a single user interaction. By seamlessly deploying account abstraction across both L1 and L2, the boundaries traditionally separating these two layers are significantly blurred, creating a more fluid and user-friendly experience.

In essence, Cross-ChAAin is not just a tool but a paradigm shift in how users can interact with blockchain and ERC20 tokens. By focusing on user-centric challenges and creating tailored solutions, we're setting a new standard for simplicity, efficiency, and flexibility in the blockchain world.

While the Proof of Concept is well-established, our current implementation primarily encompasses functionalities like L2 deposits and ETH swaps. A notable achievement has been the intricate design and implementation of our paymaster logic, a novelty in its approach and efficiency. We believe that with each step, we're paving the way for a more integrated and efficient blockchain ecosystem.

How it's Made

Cross-ChAAin's foundation hinges on an intricate understanding of account abstraction—comprehending the nuanced interplay between entry points, bundlers, paymasters, and the smart contract wallet (SCW). We dedicated a significant chunk of our efforts in shaping this proof of concept, a fact underscored by our collaboration with Dror Tirosh for its validation.

Paymaster—Our Project's Cornerstone: Cross-ChAAin's standout feature is unquestionably its custom paymaster. This component, through its symbiotic relationship with the SCW, ensures a balanced and seamless flow of operations. This dual-validation system operates in tandem:

  • The paymaster validates parameters like the SCW bytecode hash against a whitelist, specific function calls in the SCW, accuracy of paymaster addresses in the calldata, and gas stipulations.
  • Subsequently, the SCW is vigilant about maintaining an ample token balance. If the user's specified amount won't leave sufficient tokens for the paymaster, the SCW autonomously adjusts this balance during execution.

Extension to Trampoline: We've modified Trampoline and enhanced it with a bespoke user interface, tailored to the limited set of operations we've incorporated. This interface allows users to craft userOps aligned with our paymaster and SCW effortlessly.

Sponsor Integrations:

Ethereum Foundation: With their support, we've been able to implement our unique paymaster and SCW, while also building upon the foundational elements of Trampoline.

Chainlink: Integrating with Chainlink's esteemed price feeds guarantees the precision of our token valuations. Cross-referencing the cached token value against transaction fees, and subsequent cache updating post-operation, are pivotal in our system's success.

Polygon: For our Layer 2 interface, we've zeroed in on PolygonZKEVM. This allows Cross-ChAAin to deposit ERC20s gaslessly. Additionally, an ERC4337 deployed on PolygonZKEVM is primed to receive these tokens, streamlining L1-L2 interactivity.

Hacky Nuances: The intricate validation dance between the paymaster and SCW is arguably our most clever hack. Devised to adhere to the ERC4337 standard's confines and prevent potential paymaster griefing, this interplay ensures Cross-ChAAin's security and efficiency.

To encapsulate, with the indispensable support from sponsors like Ethereum Foundation, Chainlink, and Polygon, Cross-ChAAin stands as a testament to sophisticated design meeting functional simplicity.

background image mobile

Join the mailing list

Get the latest news and updates