[D1] - CrossFuel 🏅

CrossFuel is a payment system that simplifies gas fees for dApps on different blockchains using Account Abstraction. It eliminates the need to swap or bridge tokens, making transactions across multiple chains effortless.

0
3

Challenges

Covalent Unified API Bounties

Pool 10,000 ETH

For further details, please refer to the following information. https://github.com/taijusanagi/CrossFuel/blob/main/docs/covalent.md In our data retrieval process across multiple chains, Covalent plays a pivotal role. On the frontend, we gather supported tokens across various chains, while on the backend, we use Covalent to obtain balance data to ensure validation prior to conducting swaps and cross-chain bridge transfers. The integration of Covalent allows for the retrieval of data across multiple chains, ensuring the validation of tokens and balances prior to conducting swaps and cross-chain bridge transfers. Process for Investigating Chains and APIs: https://github.com/taijusanagi/CrossFuel/issues/1 Endpoint: We utilize the following endpoint for both the frontend and backend. https://api.covalenthq.com/v1/${covalentKey}/address/${verifyingPaymasterSigner}/balances_v2/ We retrieve multichain and multitoken balances on the Account Abstraction wallet for the frontend, and paymaster signer token balances for bridge and swap on the backend. Challenge: The Covalent API response may include "dust" balances, which are very small amounts of tokens that are not worth tracking. Although we can remove these balances to improve efficiency, it's currently not feasible to do so for ETH on the Goerli network. Therefore, we will temporarily retain them in the response. Benefit: The Covalent API model significantly simplifies the process of querying each token balance on each chain, resulting in improved efficiency and ease of use.

Best Multi-Network Deployment using Infura

Pool 5,000 ETH

For more comprehensive information, such as demo video, please consult the following details. https://github.com/taijusanagi/CrossFuel/blob/main/docs/infura.md Our team utilizes Infura, a multichain node service, for deploying multichain contracts, including the Account Abstraction infrastructure contract, which we are deploying to each chain. Meanwhile, Truffle, a core development tool, provides a starter kit for Metamask Snap and smart contract. Defining Target Chains: Thought Process: https://github.com/taijusanagi/CrossFuel/issues/1 The final target network can be found at https://github.com/taijusanagi/CrossFuel/blob/main/implementations/metamask-snap/packages/truffle/networks.json Defining Target Chains - Thought Process: To address the increased risk of encountering vulnerabilities when deploying a contract across multiple networks, we take several measures to ensure the security of the contract. Firstly, we use an audited Account Abstraction smart contract that was released during ETHDenver. This ensures that the contract has undergone a thorough security review and any potential vulnerabilities have been identified and addressed. Secondly, we use create2 to ensure the contract is verified and not modified across chains. This helps to reduce the risk of an attacker exploiting vulnerabilities in one network to gain access to another network where the same contract is deployed. To ensure consistency of the service wallet across all chains, we use a custom development script that deploys the contract using create2. The script can be found at https://github.com/taijusanagi/2023-eth-denver-submission/blob/main/implementations/metamask-snap/packages/truffle/scripts/deploy-all-contracts.js We also utilize the truffle config located at https://github.com/taijusanagi/CrossFuel/blob/main/implementations/metamask-snap/packages/truffle/truffle-config.js#L27 To ensure all contract addresses are the same, we use create2. The deployed contracts can be found at https://github.com/taijusanagi/CrossFuel/blob/main/implementations/metamask-snap/packages/truffle/deployments.json

Security 🔒& Scalability 🌱

Ranked 7,000 ETH

For further details, please refer to the following information. https://github.com/taijusanagi/CrossFuel/blob/main/docs/metamask-snap.md Metamask Snap simplifies the Account Abstraction function by automating the signature process and providing a transaction simulator for improved security. This extension feature of Metamask enhances the user experience by eliminating the need for multiple signatures, which was previously cumbersome and difficult to comprehend. To create a project template, we utilized the Metamask Snap Truffle Box, which can be found at https://github.com/taijusanagi/2023-eth-denver-submission/tree/main/implementations/metamask-snap Scalability & Improved User Experience with Metamask Snap: In this application, the user creates two transactions - one for cross-chain gas payment and one for the actual transaction. Both transactions utilize Account Abstraction verifying paymaster function, which previously required the user to sign four times. To improve the user experience, we utilize snap_getBip44Entropy to enable the user to sign four times in one prompt, making the process smoother and more seamless. This reduces network workload and enables a cross-chain gas payment model. Security: To ensure security, we leverage Tenderly to mitigate security risks and guarantee the safety of the application. The transaction simulator feature in Tenderly allows us to test the application's functionality without deploying it on the live network.

Best Use of Polygon

Ranked 10,000 ETH

For further details, please refer to the following information. https://github.com/taijusanagi/CrossFuel/blob/main/docs/polygon.md Including Polygon in our platform is crucial as it has one of the largest user bases among blockchain networks. With Polygon integrated, users can pay gas fees in Polygon for other chains such as zkEVM, making it a convenient payment layer for many users. In fact, having Polygon as a payment gateway can open up opportunities for a vast number of users. That's why we made the decision to include Polygon right from the start, as documented in our thought process for selecting chains which can be found here: https://github.com/taijusanagi/CrossFuel/issues/1

Deploy your smart contract on Scroll

Pool 10,000 USDC

For further details, please refer to the following information. https://github.com/taijusanagi/CrossFuel/blob/main/docs/scroll.md We are planning to incorporate our Account Abstraction infrastructure onto Scroll. This is because Scroll is transitioning to zk EVM, which lacks native support for Account Abstraction. By deploying our infrastructure on Scroll, we can bridge this gap. You can find all the contract information here: https://github.com/taijusanagi/CrossFuel/tree/main/implementations/metamask-snap/packages/truffle/scroll.json The challenge we face is that Scroll does not yet have a deployment proxy. Therefore, we must deploy it to the network to use our service. However, we have devised an alternative way to interact with the contract other than through the main app.

Raise utilization of 1inch network fusion protocol through using Fusion API

Ranked 10,000 ETH

We are utilizing 1inch for the swap and attempting to incorporate 1inch swap into our platform. However, since 1inch does not support testnet, we are testing its functionality in a separate file and designing its architecture on testnet. You may find the transaction details by following this link https://github.com/taijusanagi/CrossFuel/blob/main/docs/one-inch.md It's worth mentioning that our platform is also a gasless payment platform, making 1inch Fusion an ideal integration choice.

Build a MetaMask snap using the Truffle Snaps Box

Pool 1,000 ETH

We utilized Truffle Snaps Box to create a Metamask boilerplate, which allowed us to start hacking without the need to learn about Metamask Snap. The Metamask unbox process can be found at https://github.com/taijusanagi/CrossFuel/issues/3 which was beneficial as it allowed us to have a rocket start and begin developing Metamask Snap on the first day. However, we faced a challenge with the use of StyleComponent with React, as this was new technology for us and it took some time to get accustomed to developing on it.

OpenZeppelin Defender Integration

Ranked 10,000 USDC

For further details, please refer to the following information. https://github.com/taijusanagi/CrossFuel/blob/main/docs/defender.md Defender is an automated tool that verifies the signature within the paymaster contract, checks the paymaster deposit balance, and facilitates any necessary fund transfers. CrossFuel has chosen Defender because it requires a stable infrastructure for signing and health checks. Verifiying Paymaster Signer Key with Relayer: We are using the Defender relayer key as the signer in the Verifying Paymaster Contract. The address 0x7f5aa4c071671ad22edc02bb8a081418bb6c484f is used to verify the paymaster signer key and fund manager. By enabling the "Clone to another network" option, we can use the same signing key for multiple chains. This is highly beneficial as the address used can impact the deployed paymaster contract's address. Paymaster Balance Tracking with Autotasks: We use the Defender auto task to monitor paymaster deposits in the Account Abstraction entrypoint. This is essential to ensure that there is always sufficient deposit available.

Tenderly Simulation API Integration

Pool 6,000 USDC

For more comprehensive information, such as screenshots, failed transactions, and unwanted transactions, please consult the following details. https://github.com/taijusanagi/CrossFuel/blob/main/docs/tenderly.md Communicating the inner workings of Account Abstraction to users is challenging. To enhance the user experience, we're using Tenderly to simulate transaction results. This allows users to review the transaction outcome before submitting it to the bundler, thereby ensuring the security of the process. This security feature is critical in making the Account Abstraction wallet widely accepted. We've chosen option 1, which allows users to discard unwanted transactions in the dapp UI. Our UI, developed with Metamask snap, displays relevant information about transaction execution, including event logs. Users can either approve sending the transaction to the chain or discard it.

Prize for using Axelar GMP for sending Interchain Messages / Tokens

Ranked 25,000 USDC

For further details, please refer to the following information. https://github.com/taijusanagi/CrossFuel/blob/main/docs/axelar.md Axelar Network is a crucial component of our cross-chain gas payment service. In the event of insufficient funds, we leverage the cross-chain bridge to transfer funds from a chain with a surplus. Additionally, we utilize Squid, the cross-chain swap and liquidity routing protocol, on the Axelar Network to facilitate our operations. Details of the Transaction: We sent aUSDC from the Goerli network to the Mumbai network. You can view the transaction details at these links: https://goerli.etherscan.io/tx/0x7190acb605bd71d5c34e6883c4d895201f1e234fec0a61d8bd2dc9acbedd8a2a https://testnet.axelarscan.io/gmp/0x7190acb605bd71d5c34e6883c4d895201f1e234fec0a61d8bd2dc9acbedd8a2a Integration: Originally, we attempted to use Axelar from within our smart contract, as seen in this code: https://github.com/taijusanagi/CrossFuel/blob/main/implementations/metamask-snap/packages/truffle/contracts/GasPaymentGateway.sol However, after receiving mentorship in a Discord channel, we learned about Squid. We now utilize Squid in the backend process to perform bridge and swap functions. Challenge: The amount of testnet tokens available in the faucet is limited, so we must be mindful of how much we use during testing. Additionally, I discovered a bug in the Squid library related to hex formatting, but I was able to find a workaround and shared it with the Squid official Discord channel. Benefit: We've experienced several benefits while working with Axelar: The transaction process is straightforward and easy to track using the Axelar explorer. Our Goerli to Mumbai aUSDC bridge test yielded good response times. Integrating the smart contract and third-party SDK has been a smooth process.

#BUIDLathon 2023 Infrastructure + Scalability

Pool 15,000 USDC

CrossFuel is a game-changing payment system that provides a seamless and effortless experience for users making cross-chain transactions with dApps. The system's use of Account Abstraction eliminates the need for token swaps or bridges, simplifying transactions across multiple chains. The system is designed to be user-friendly, involving just two user operations: paying the gas fee and executing the transaction. The backend automates the verification of deposit amounts and adjusts balances using a cross-chain bridge and swap mechanism. Additionally, batching transactions allows for cost efficiency and savings. The smart contract and bundler are fully compatible with the latest version of Account Abstraction, making CrossFuel a secure and easy-to-use platform for cross-chain gas payments. By providing a seamless and secure user experience, users can interact with dApps across multiple chains without worrying about managing tokens across different chains. Overall, CrossFuel is an excellent infrastructure solution that provides scalability and security, enabling anyone to make cross-chain transactions with ease. Its compatibility with the latest version of Account Abstraction makes it a top choice for anyone looking for an efficient and user-friendly payment system.

Project details

Description

CrossFuel is a payment system that simplifies gas fees for dApps on different blockchains using Account Abstraction. It eliminates the need to swap or bridge tokens, making transactions across multiple chains effortless.


How It Works

Our system involves two user operations: one for paying the gas fee, and the other for executing the actual transaction. The backend automatically verifies the deposit amount of the paymaster and adjusts the balance using a cross-chain bridge and swap mechanism. By batching transactions, we achieve cost efficiency and can benefit from the resulting savings.

By working together, these services provide a seamless and secure user experience, allowing users to interact with dApps across multiple chains without worrying about managing tokens across different chains.


Account Abstraction

Our smart contract and bundler are fully compatible with the newly released version of the Account Abstraction contract from Ethereum Foundation, which was activated during ETHDenver 2023.
https://www.coindesk.com/tech/2023/03/01/ethereum-activates-account-abstraction-touted-by-founder-buterin-as-key-advance/

With its compatibility with the latest version of Account Abstraction, CrossFuel provides a secure and easy-to-use platform for cross-chain gas payments. It is an ideal solution for anyone looking to make cross-chain transactions with ease.

By working together, these services provide a seamless and secure user experience, allowing users to interact with dApps across multiple chains without worrying about managing tokens across different chains.


Technical Detail

For technical details regarding the project, please refer to the README file on Github at the following link. The file contains information on the project's setup, dependencies, and usage instructions. Additionally, it provides a detailed overview of the project's architecture and implementation details, making it an essential resource for anyone looking to understand the technical aspects of the project.

https://github.com/taijusanagi/CrossFuel