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
+9-5Lines changed: 9 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -82,10 +82,11 @@ On EVM, two new contracts will be introduced.
82
82
1.`updateQuoterContract(bytes calldata gov)` allows a Quoter to set their `ExecutorQuoter` contract via signed governance (detailed below). This MUST
83
83
1. Verify the chain ID matches the Executor’s `ourChain`.
84
84
2. Verify the contract address is an EVM address.
85
-
3. Verify the governance has not expired.
86
-
4. Verify the signature `ecrecover`s to the quoter address on the governance.
87
-
5. Assign the specified contract address to that quoter address.
88
-
6. Emit a `QuoterContractUpdate` event.
85
+
3. Verify the sender matches the sender on the governance.
86
+
4. Verify the governance has not expired.
87
+
5. Verify the signature `ecrecover`s to the quoter address on the governance.
88
+
6. Assign the specified contract address to that quoter address.
89
+
7. Emit a `QuoterContractUpdate` event.
89
90
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.
90
91
3.`requestExecution` allows an integrator to request execution via Executor providing a quoter address in place of a signed quote. This MUST
91
92
1. Call `requestQuote` from that Quoter’s registered contract.
@@ -143,13 +144,16 @@ Relay Providers will need to change their verification for Executor requests. If
143
144
144
145
### Governance
145
146
146
-
This design introduces a new concept of a Quoter’s on-chain governance
147
+
This design introduces a new concept of a Quoter’s on-chain governance.
148
+
149
+
The governance includes a sender address and expiry time in order to prevent replay attacks in lieu of a nonce and hash storage. The intention being that a short enough expiry time along with a pre-designated submitter mitigates the event where a quoter could be rolled back to a previous implementation by replaying their governance even when two governance messages are generated in short succession.
147
150
148
151
```solidity
149
152
bytes4 prefix = "EG01"; // 4-byte prefix for this struct
150
153
uint16 sourceChain; // Wormhole Chain ID
151
154
address quoterAddress; // The public key of the quoter. Used to identify an execution provider.
152
155
bytes32 contractAddress; // UniversalAddress the quote contract to assign.
156
+
bytes32 senderAddress; // The public key of address expected to submit this governance.
153
157
uint64 expiryTime; // The unix time, in seconds, after which this quote should no longer be considered valid for requesting an execution
154
158
[65]byte signature // Quoter's signature of the previous bytes
0 commit comments