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
Currently Opium's Matching and SwapRateMatching contracts support only orders signed with EIP712 compatible signatures. This makes impossible few use cases of Opium orders settlement mechanisms.
1. Smart contract wallets
Smart contract wallets can't sign messages, thus require different mechanism for order validation such as external call to smart contract wallet.
Verifying contract should call external function of smart contract wallet and pass the order to it.
Smart Contract Wallet should has implemented special interface in order to support such calls.
This verifying function should return whether it permits settlement of the order or no.
2. Legacy and Hardware wallets
Legacy and Hardware wallets (i.e. Ledger and Trezor) doesn't have implementations of EIP712 thus only support personal signatures
In current firmware of Trezor and Ledger JSON RPC method eth_sign adds prefix
"\x19Ethereum Signed Message:\n" + len(message)
to the message before it's being signed making signature incompatible with EIP712 and require this signature to be verified differently.
So we need to implement additional check for signatures made using eth_sign JSON RPC call.
Implement SignatureType property in the order for wider support of different signature types
Implement Upgradability with Proxy contract in order to prevent orders invalidity after upgrades (see AAVE's versioned initializer and OZ's Upgradability Proxy)
The text was updated successfully, but these errors were encountered:
Alirun
changed the title
Extend orders signatures support
OIP-1 Extend orders signatures support
Sep 23, 2020
Alirun
changed the title
OIP-1 Extend orders signatures support
Extend orders signatures support
Sep 23, 2020
Extend orders signatures support
Problem
Currently Opium's
Matching
andSwapRateMatching
contracts support only orders signed with EIP712 compatible signatures. This makes impossible few use cases of Opium orders settlement mechanisms.1. Smart contract wallets
Smart contract wallets can't sign messages, thus require different mechanism for order validation such as external call to smart contract wallet.
Verifying contract should call external function of smart contract wallet and pass the order to it.
Smart Contract Wallet should has implemented special interface in order to support such calls.
This verifying function should return whether it permits settlement of the order or no.
2. Legacy and Hardware wallets
Legacy and Hardware wallets (i.e. Ledger and Trezor) doesn't have implementations of EIP712 thus only support
personal signatures
In current firmware of Trezor and Ledger JSON RPC method
eth_sign
adds prefixto the message before it's being signed making signature incompatible with EIP712 and require this signature to be verified differently.
So we need to implement additional check for signatures made using
eth_sign
JSON RPC call.Solutions
Reference implementation: 0x
SignatureType
property in the order for wider support of different signature typesThe text was updated successfully, but these errors were encountered: