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
+56-47Lines changed: 56 additions & 47 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,17 +65,30 @@ On EVM, two new contracts will be introduced.
65
65
66
66
1.**ExecutorQuoter** represents the on-chain quoting logic of a particular Quoter / Relay Provider. It may implement any logic desired by the Relay Provider as long as it adheres to this interface. It SHOULD be immutable.
2.**ExecutorQuoterRouter** replaces **Executor** as the entry-point for integrators. It MUST be immutable and non-administered / fully permissionless. This provides three critical functionalities.
81
94
@@ -86,39 +99,39 @@ On EVM, two new contracts will be introduced.
86
99
4. Verify the governance has not expired.
87
100
5. Verify the signature `ecrecover`s to the quoter address on the governance.
88
101
6. Assign the specified contract address to that quoter address.
89
-
7. Emit a `QuoterContractUpdate` event.
102
+
7. Emit a `QuoterContractUpdate` event (on applicable runtimes, e.g. EVM).
90
103
2.`quoteExecution` allows an integrator to quote the cost of an execution for a given quoter in place of a signed quote. This MUST call `requestQuote` from that Quoter’s registered contract.
91
104
3.`requestExecution` allows an integrator to request execution via Executor providing a quoter address in place of a signed quote. This MUST
92
-
1. Call `requestQuote` from that Quoter’s registered contract.
105
+
1. Call `requestExecutionQuote` from that Quoter’s registered contract.
93
106
2. Enforce the required payment.
94
107
3. Refund excess payment.
95
108
4. Request execution, forming a `EQ02` quote on-chain.
@@ -134,11 +147,9 @@ Other platforms are not in-scope at this time, but similar designs should be ach
134
147
135
148
## Protocol Integration
136
149
137
-
Relay Providers will need to change their verification for Executor requests. If the prefix is `EQ02`, they MUST check the following event to ensure it is an `OnChainQuote` emitted by the canonical `ExecutorQuoterRouter` on that chain in place of verifying the signature.
150
+
Relay Providers will need to change their verification for Executor requests. If the prefix is [`EQ02`](#quote---version-2-eq02), they MUST check the following event to ensure it is an `OnChainQuote` emitted by the canonical `ExecutorQuoterRouter` on that chain in place of verifying the signature.
138
151
139
-
<aside>
140
-
⚠️ TBD, if the 32 byte body from `EQ01` is added, no additional changes will be required.
141
-
</aside>
152
+
Since the 32 byte body from `EQ01` is added, no additional changes will be required apart from the above.
142
153
143
154
## **API / database schema**
144
155
@@ -158,7 +169,7 @@ uint64 expiryTime; // The unix time, in seconds, after which this quote s
158
169
[65]byte signature // Quoter's signature of the previous bytes
159
170
```
160
171
161
-
### Quote - Version 2
172
+
### Quote - Version 2 (EQ02)
162
173
163
174
This introduces a new Quote version to the [Executor spec](../README.md#api--database-schema). It has the same body as `EQ01` sans signature. This is useful for parsing and validating off-chain.
164
175
@@ -188,9 +199,7 @@ It is possible to keep the same or similar interface as Executor in the Executor
188
199
189
200
## ExecutorQuoter ABI
190
201
191
-
<aside>
192
-
🤔 Further investigation required to determine if the return should change. Document the results here.
193
-
</aside>
202
+
While it was not strictly necessary to return the quote body for on-chain execution purposes, it is useful for off-chain integrations to validate and display price information. In order to slightly reduce costs and allow the quoter contract to differentiate between the quote and execute paths, two different functions are used with different modifiers and return values.
0 commit comments