bcnmy / mexa-sdk

Repository contains mexa sdk code that can be plugged into your dapp and can leverage meta transaction feature.
MIT License
106 stars 41 forks source link

Signature Modification to Show Custom Messages on Wallet Popup #128

Open lovejeet opened 2 years ago

lovejeet commented 2 years ago

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:

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:

https://lh6.googleusercontent.com/Jo0whDrqFejIM4poF6go0fDNAHjhLeDMBM-ppXDsLhNtD3V0SyuwJGpuL3uifKzRKA42J0BvGHAIE6yEj6QHrpvVuLtigt-otpHB4hSA7JRhiYoPyuEdPA8kP7lHU4O3Gy3rhryO

Evaluation Criteria (Submission Requirements)

Resources:

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.

gitcoinbot commented 2 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This issue now has a funding of 1000.0 BICO (1130.0 USD @ $1.13/BICO) attached to it.

gitcoinbot commented 2 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work has been started.

These users each claimed they can complete the work by 2 months, 3 weeks ago. Please review their action plans below:

1) leykun10 has started work.

Project aims to solve the problem of on boarding new users to Dapps by leveraging gassless transacions funcionality to allow users with eth to be onboarded easily. 2) mpoulhazan has started work.

Signature builder to show custom messages in pop up. Currently 2 examples with generic message (EIP-712) and NFTs message. Working on next examples. Signature verification available. Project developped in React. Possibility to add more examples if approuved.

Learn more on the Gitcoin Issue Details page.

aahutsal commented 2 years ago

@lovejeet any update from @sherifahmed990? I would take that project in case he does not respond. Have some notes on it that we could discuss.

By the way #EIP712 has a security drawback. Are you aware?

ghost commented 2 years ago

@lovejeet Hi, I am in the process of making it, but won't be finishing this during the hackathon time, would you still be interested in PR?

aahutsal commented 2 years ago

@lovejeet any update?

lovejeet commented 2 years ago

If anyone has completed the work then please submit the PR