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
Copy file name to clipboardExpand all lines: design/02_On_Chain_Quotes.md
+27-6Lines changed: 27 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ Some would-be Executor integrators may need on-chain quotes as they do not neces
7
7
## Runtime Support
8
8
9
9
-[x][EVM](./evm/)
10
-
-[][SVM](./svm/)
10
+
-[x][SVM](./svm/)
11
11
12
12
# **Background**
13
13
@@ -91,7 +91,6 @@ interface IExecutorQuoter {
91
91
```
92
92
93
93
2.**ExecutorQuoterRouter** replaces **Executor** as the entry-point for integrators. It MUST be immutable and non-administered / fully permissionless. This provides three critical functionalities.
94
-
95
94
1.`updateQuoterContract(bytes calldata gov)` allows a Quoter to set their `ExecutorQuoter` contract via signed governance (detailed below). This MUST
96
95
1. Verify the chain ID matches the Executor’s `ourChain`.
-`RequestExecutionQuote` (discriminator `[3, 0, 0, 0, 0, 0, 0, 0]`): Returns `(required_payment, payee_address, quote_body)` as 72 bytes via return data.
142
+
143
+
The quoter reads pricing data from on-chain PDAs (`ChainInfo`, `QuoteBody`) maintained by an authorized updater.
144
+
145
+
2.**ExecutorQuoterRouter** is the entry-point for integrators. It provides three instructions:
146
+
1.`UpdateQuoterContract` registers or updates a quoter's implementation mapping. This MUST:
147
+
- Verify the chain ID matches `OUR_CHAIN`.
148
+
- Verify the sender matches `universal_sender_address` in the governance message.
149
+
- Verify the governance has not expired.
150
+
- Verify the secp256k1 signature recovers to the quoter address (20-byte EVM address).
151
+
- Create or update a `QuoterRegistration` PDA seeded by `["quoter_registration", quoter_address]`.
152
+
153
+
2.`QuoteExecution` gets a quote from a registered quoter via CPI. The quoter's return data is forwarded to the caller.
154
+
155
+
3.`RequestExecution` requests execution through the router. This MUST:
156
+
- CPI to the quoter's `RequestExecutionQuote` to get payment/payee/quote body.
157
+
- Verify payment amount is sufficient.
158
+
- Construct an `EQ02` signed quote on-chain.
159
+
- CPI to Executor's `request_for_execution`.
160
+
161
+
**Account Handling**: The router uses a fixed account layout for quoter CPIs. The quoter accounts (`config`, `chain_info`, `quote_body`) are passed by the client and forwarded to the quoter program. This allows different quoter implementations to use different account structures while maintaining a standardized router interface.
139
162
140
-
<aside>
141
-
⚠️ TODO: The primary additional consideration is how to handle the accounts used for fetching the quote from an ExecutorQuoter in a standardized way.
142
-
</aside>
163
+
**Quoter Identity**: Quoters are identified by their 20-byte EVM address (derived from secp256k1 public key). The `QuoterRegistration` PDA maps this address to a Solana program ID that implements the quoting logic.
0 commit comments