Omnichain paymaster - Particle Network
WARNING: This page is not fully validated, and is not writtenas a promotion of the protocol.
Last updated
WARNING: This page is not fully validated, and is not writtenas a promotion of the protocol.
Last updated
The Particle network works to run the Smart contract base wallet service. It is bulit as a module services, with the additional chain used in abstraction made by Particle Network. The chain's integration is quite similar to the ERC-4337, but it has additional operation on executing the TX. The paymaster receives the native token for the gas pay from the bridging in the omnichain operation.
There can be additional operations on the bundler because of the chA, but we will not discuss of that issue in this docs. Thus the EOA abstraction is a crucial part in the chA, it is not part of the paymaster's operation.
Before we start, let's overview the rough operation of the omnichain. The omnichain is a chain which acts as a hub by connected with the other chains. Each chain has a endpoint which is connected to each other, which is called as an omnichain.(The omnichain is not a single chain! It is more like a framework that can connect the chains.) If someone want to bridge A token to the B chain, the token A is locked up in the endpoint vault in the A chain, then bridge it to the B chain. The user can receive the locked token in the vault on the B chain. User can bridge the token as long as the sufficient amount locked in the endpoint.
To simply understand the paymaster's operation during the userOp execution, let's follow the control flow when you want to send 100 MATIC from one wallet to another on polygon chain, but you don't have ether on your wallet, but 100 USDC on the optimism chain. There are no other token balance on the other chain. In the userOp execution, the paymaster interacts with the entrypoint while using the "omnichain paymaster". The actual flow goes like this:
After the userOp's operation on the chain, the paymaster is compensated the USDT on the original vault where the USDT was initially deposited. The paymaster bridges the asset to the chainA to maintain the balance, and the compensation to the paymaster is operated on the core paymaster vault.
In this way, the paymaster can use the token balance of the other chain, thus increase the UX and the vault managemant easily. The only problem of this mechanism is the gas fee and the centralization of the guarentee to the second TX, which is operated to compensate the paymaster. The initial one is a major problem while using the ERC-4337, and the second one is the problem of the bridge connection mechanism.