-
Notifications
You must be signed in to change notification settings - Fork 41
Description
About the Bounty
EIP712 is a standard to have a structured signature in your contract & verify it.
We need the ability to customize the signature such that a custom message can be displayed to the user during the wallet sign message popup (your users can see what they are signing). You can choose 5-6 methods that are commonly used in DEXs, NFT marketplaces, etc for example:
- ERC20TokenTransfer
- Swaps on a DEX
- Adding liquidity
- NFT methods like OpenSea sale, Rarible sale
- Bridge Transfers
The message section of the signatures for each of these methods must be broken down into a structure suited to that context. The structure could be generic (universal that any dapp can use for transaction template) or customized (specific to method parameters of a particular contract e.g. Permit). This structure can then accept parameters relevant to that generalized / custom method and our message is constructed.
For generic, you must implement an instance of the Trusted Forwarder(EIP2771) and for more customized, you must make the necessary changes in your contract (EIP712 type hashes) to verify transaction signatures.
Example:
Evaluation Criteria (Submission Requirements)
- Signature format must depict clear meaning to the end user basis method context.
- Signatures must be verifiable by either the Trusted Forwarder or the smart contract.
- Once user signs, gasless transactions should work using Biconomy or through your test cases
- How re-usable, secure and neat your implementation is.
Resources:
- https://eips.ethereum.org/EIPS/eip-712
- https://eips.ethereum.org/EIPS/eip-2771
- Biconomy Trusted Forwarder : https://github.com/bcnmy/mexa/blob/master/contracts/6/forwarder/BiconomyForwarder.sol
- https://github.com/bcnmy/mexa/blob/forwarder-contracts-v2/contracts/forward-v2/forwarder/BiconomyForwarderV2.sol#L36
- Permit method of DAI / USDC for gasless approvalshttps://etherscan.io/address/0x6b175474e89094c44da98b954eedeac495271d0f#code
- https://github.com/bcnmy/metatx-standard/blob/master/src/contracts/EIP712MetaTransaction.sol#L9
- https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/metatx/MinimalForwarder.sol
About Biconomy
Biconomy is a developer platform that empowers blockchain developers to enable a simplified transaction and onboarding experience for their Web3 projects. Our product suite includes Gasless and Hyphen, Gasless abstracts transaction-related complexities for the end-user, and the Hyphen bridge allows for faster and cheaper cross-chain transfers.
The plug-n-play solution allows Web3 interactions to be smooth and seamless between dApps and end-users by removing blockchain complexities. We do this by providing a multi-chain non-custodial, and gas efficient relayer infrastructure network that enables meta transactions at scale.