You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ecosystems are parent entities for groups of apps operating across different blockchains or standalone layer 2 networks. Openfort [**ecosystem wallets**](https://www.openfort.xyz/docs/guides/ecosystem) enable seamless interoperability between applications, allowing ecosystems to design their ideal, unified wallet experience. The next evolution is consolidating user liquidity across apps, providing a single, unified balance instantly spendable across the ecosystem. This vision will be powered by Openfort's chain abstraction implementation based on[MagicSpend++](https://ethresear.ch/t/magicspend-spend-now-debit-later/19678/9) hosted in this repository.
4
+
Ecosystems are parent entities for groups of apps operating across different blockchains or standalone layer 2 networks. Openfort [**ecosystem wallets**](https://www.openfort.xyz/docs/guides/ecosystem) enable seamless interoperability between applications, allowing ecosystems to design their ideal, unified wallet experience. The next evolution is consolidating user liquidity across apps, providing a single, unified balance instantly spendable across the ecosystem. This vision will be powered by Openfort's chain abstraction implementation of[MagicSpend++](https://ethresear.ch/t/magicspend-spend-now-debit-later/19678/9) hosted in this repository.
5
5
6
6
With this setup, ecosystems can deploy tailor-made 4337 chain abstraction infrastructure.
7
7
They become Liquidity Providers (LPs) for their users, sharing with them the value that would otherwise have been captured by solvers/fillers.
8
8
They own their users' experience from the wallet to the chain.
9
9
10
10
11
-
You will find *at least* the following contracts:
12
-
13
-
* Chain Abstraction Paymaster
14
-
* Time-locked Vault
15
-
* Vault Manager
16
-
* Invoice Manager
17
-
18
11
## System Architecture
19
12
20
13

@@ -23,69 +16,59 @@ You will find *at least* the following contracts:
- Define any ERC20 / native asset (each asset must have a correspondence in dollars)
32
-
- Define the yield strategy
33
-
34
-
_Note:_ "locking" can be simplified into a **SEND** transaction from an EOA to the Smart Contract Account. A backend watcher service could listen for `received` events and automatically lock the funds (i.e., transfer them to the time-locked vault). This approach would require users to sign a session key for the watcher service.
35
-
36
-
37
-
### Chain Abstraction Paymaster
38
-
39
-
The Paymaster fronts the funds on the destination chain for the user if they _HAVE_ enough locked balance (checked by Openfort Backend).
40
-
The Paymaster contract will then be reimbursed on the source chain(s). Ni1o: user has 100@A, 50@B, and spends 130@C
22
+
- Tokenized Vaults with a single underlying EIP-20 token
23
+
-*not*[4626](https://eips.ethereum.org/EIPS/eip-4626) compliant (does *not* implement EIP-20 to represent shares)
24
+
- only the VaultManager can interact with the Vault
25
+
- Define locking period when initialiaing the vault
26
+
- Deploy on any supported source chains
27
+
- Can be yield-bearing (e.g deposit to Aaver or Morpho)
41
28
42
-
* Set/update the Paymaster owner address (ecosystem *MUST* own the Paymaster).
43
-
* Fund/withdraw Paymaster balance (Openfort crafts the transaction, but the ecosystem owner _MUST_ sign it).
44
-
* Ragequit > withdraw all funds from all Paymasters
45
-
* Receive webhook alerts when the Paymaster balance falls below a certain threshold to enable rebalancing.
29
+
_Note:_ "locking" can be simplified into a **SEND** transaction from an EOA to the Smart Contract Account. A backend watcher listens for `received` events and automatically lock the funds (i.e., transfer them to the time-locked vault). This approach requires users to sign a session key for the watcher service.
46
30
47
-
### Trust assumptions
31
+
### Vault Manager
32
+
- Manage Vaults
33
+
- Manage withdrawals and deposits
48
34
49
-
* The system relies on cross-L2 execution proofs enabled by [Polymer](https://docs.polymerlabs.org/docs/build/examples/chain_abstraction/), eliminating the need for Users to trust Openfort or the Ecosystem. To recover funds locked in source chain vaults on behalf of the ecosystem, Openfort must prove the execution of the userOp on the remote chain. There is no refund on source chain without the corresponding remote chain execution proof. The InvoiceManager track invoices onchain to prevent double-refund.
50
-
* Openfort does not have custody of funds in the Ecosystem Paymaster because the userOp is co-signed within a secure enclave, following predefined policies set by the ecosystem.
35
+
### Invoice Manager
36
+
- Settlement of invoices
37
+
- Prevent double-repayment of invoices with state proof verification
38
+
- authorize paymasters and paymaster verifiers
51
39
40
+
### Chain Abstraction Paymaster (CABPaymaster)
52
41
53
-
### Onchain deployments
42
+
The CABPaymaster fronts funds on the destination chain for the user if they _HAVE_ enough locked balance (checked by Openfort Backend).
54
43
55
-
One time action by Openfort: Deploy Vaults, VaultManager and InvoiceManager.
44
+
The Paymaster contract will get repaid on the source chain(s). Ni1o: user has 100@A, 50@B, and spends 130@C
56
45
57
-
->> LP as a Service: Deploy the Chain Abstraction Paymaster *on each* blockchain supported by the ecosystem.
46
+
- Set/update the Paymaster owner address (ecosystem *MUST* own the Paymaster)
47
+
- Fund/withdraw Paymaster balance (Openfort crafts the transaction, but the ecosystem owner _MUST_ sign it)
48
+
- Ragequit > owner withdraw all funds from all Paymasters with one signature
58
49
50
+
Paymaster Owner can subscribe to webhook alerts when the Paymaster balance falls below a certain threshold, before automatic rebalancing is implemented.
59
51
60
-
# Local Development
52
+
### Paymaster Verifiers
53
+
- Permissionless verification of remote event (InvoiceCreated) or storage proof (invoices mapping in the invoiceManager)
54
+
- Permissionless verification of invoice
61
55
56
+
As part of chain abstraction activation, an account registers a Paymaster Verifier, which is subsequently called by the InvoiceManager before processing repayments.
62
57
63
-
Launch tests:
64
-
```
65
-
forge test
66
-
```
58
+
One of the system’s key strengths is its modular approach to proof verification. We envision a future where state proofs play a crucial role in Ethereum interoperability, with more proof providers emerging. Our design allows for seamless integration of new proof verification strategies, giving advanced users the flexibility to choose the one that best suits their use case.
67
59
68
-
Deploy local node:
69
-
```
70
-
anvil
71
-
```
60
+
## Trust assumptions
72
61
73
-
Deploy two mock ERC20:
62
+
* The system relies on cross-L2 execution proofs enabled by [Polymer](https://docs.polymerlabs.org/docs/build/examples/chain_abstraction/), eliminating the need for Users to trust Openfort or the Ecosystem. To recover funds locked in source chain vaults on behalf of the ecosystem, Openfort must prove the execution of the userOp on the remote chain. There is no refund on source chain without the corresponding remote chain execution proof. The InvoiceManager tracks invoices onchain to prevent double-refund.
63
+
* The system supports [Hashi](https://crosschain-alliance.gitbook.io/hashi/introduction/what-is-hashi) as a fallback proving mechanism if Polymer or Openfort cease operations. Liquidity providers (LPs) can generate a proof for their fronted funds by running a [Hashi RPC API locally](https://github.com/gnosis/hashi/tree/main/packages/rpc#getting-started) and submit it to `fallbackRepay` along with the invoice. This enables refunds using only public data, without relying on any third party. Note that the fallback proving strategy might evolve in the future but will always remain permissionless.
64
+
* Openfort does not have custody of funds in the Ecosystem Paymaster because the userOp is co-signed within a secure enclave executing predefined policies set by the ecosystem. At any time, the ecosystem can disable a signer to immediately block any new userOp from being sent.
0 commit comments