Skip to content

Gas Protocol: Unlocking gasless on-chain transactions for new Web3 users. Using Safe AA and GelatoRelaySDK to abstract web3 for your users effortlessly.

Notifications You must be signed in to change notification settings

kamalbuilds/Gas-Protocol

Repository files navigation

logo

Problem Statement:-

Gas transactions are a massive friction point for onboarding new users. To get someone onboarded, who is entirely new to Web3, they have to create a wallet and possess a native token just to get started with their first transaction. If you are a developer with a new protocol, game, or NFT project, this can be where a lot of potential users drop off; as usual, they have to buy the native token with a fiat on-ramp, and usually, that requires KYC.

Demo Video

demo

Features

  1. Users generate a safe with the help of Account Abstraction SDK provided by Safe. This holds their native assets and allows them to do all the gasless onchain transactions.
  2. Protocols register on our dapp by filling up a form and generating an api key for their specific protocols with the help of 1balance and fill up a form on our Dapp. 3.Thereby encrypting their Relay api key using Lit protocol and storing it securely with the help of TableLand.
  3. They can even setup different onchain conditions like having an NFT or a token or github account etc to filter their intended users.
  4. The users inturn can prove all the required conditions sufficient by their different protocols using Sismo and get whitelisted to access the gasless services.
  5. This is how Protocols enable Gas less transactions for their users.
  6. We have live integrations with SparkDAO showing how they make SDAI interactions smooth and gasless for their users and ApeCoin DAO where they have their minting and ape staking functions gasless.
  7. Protocols can also see their users onchain Data and all their relations in the online arena using the Mask's RelationService. This helps the protocols in verifying that their users are actual users and not bots.

Protocols used and the Files where the Code is used.

Name Description Code Location
Safe and Gelato By Account Abstraction we generate a Safe for our Users. EIP 712 - for signing the meta txns. EIP 2773 - Use Gelato and 1Balance for relaying transactions. Code
Code
Code
APE Protocol Our Live Integration with APE Protocol makes the staking of APE coin for New users gasless ⛽ Code
Link
MakerDAO Protocol sDAI is an ERC-4626, yield-bearing stablecoin, and we make the deposit and withdrawal functions gasless. Code
TableLand For Storing the Encrypted Relay APIs of the user in a secure and easily retrievable on-chain form. Code
Code
Lit Protocol For Encrypting the relay API key using the v3 Encryption Lit SDK and mapping the protocols with their contract address, whitelisted address, and other values. Programatic Signing - Code
Code
Sismo Connect Users can generate zk proofs and submit them to get access to gasless transactions as per the different conditions set by the protocols. For example, the condition of having an NFT as a sign of being a member of that DAO. Code

Protocol Integrations in Detail

1. Safe and Gelato

By Account Abstraction we generate a Safe for our Users. EIP 712 - for signing the meta txns EIP 2773 - Use Gelato and 1Balance for relaying transactions

https://github.com/kamalbuilds/Gas-Protocol/blob/master/src/app/login/page.tsx#L29

https://github.com/kamalbuilds/Gas-Protocol/blob/master/src/components/SafeAccount.tsx

https://github.com/kamalbuilds/Gas-Protocol/blob/master/src/components/SafeAccountInfo.tsx

7 png

2. APE Protocol

Create Custom Zk proofs to filter your real intended users , can request proofs using sismo like are you a member of oyac guild ? have twitter followers > 1000.

This helps new users onboarding gasless.

https://goerli.etherscan.io/tx/0x6f68ed6f68ec721dd15a09be71f5046c1bc2890b206781ad45b8b0583dbafd7d

https://github.com/kamalbuilds/Gas-Protocol/blob/master/src/app/protocol/page.tsx#L103

3. MakerDAO Protocol

sDAI is an ERC-4626 , yield bearing stablecoin and we make the deposit and withdrawl functions gasless.

Makerdao- https://github.com/kamalbuilds/Gas-Protocol/blob/master/src/app/protocol/page.tsx#L117

4. TableLand - For Storing the Encrypted Relay APIs of the user in a secure and easily retrievable onchain form.

0xkamal7/Gas Protocol Dev Address- 0xCF8D2Da12A032b3f3EaDC686AB18551D8fD6c132

https://tablescan.io/gaslessprotocols_80001_8204

https://github.com/kamalbuilds/Gas-Protocol/blob/master/src/components/TableLand.tsx

https://github.com/kamalbuilds/Gas-Protocol/blob/master/src/app/transactions/%5Baddress%5D/page.tsx#L38

5. Lit Protocol

For Encrypting the relay API key using the v3 Encryption Lit SDK and mapping the protocols with their contract address , whitelisted address and other values.

Programatic Signing - https://github.com/kamalbuilds/Gas-Protocol/blob/master/src/api/conditionalsign.ts

https://github.com/kamalbuilds/Gas-Protocol/blob/master/src/components/Litencrypt.tsx

image

5. Sismo Connect

Users can generate zkproofs and submit it to get access to the gasless transactions as per the different conditions set-up by the protocols.

For eg - The condition of having an NFT as a sign of being a member of that DAO.

https://github.com/kamalbuilds/Gas-Protocol/blob/master/src/components/Sismo.tsx

https://github.com/kamalbuilds/Gas-Protocol/blob/master/src/app/protocol/%5Bprotocol%5D/page.tsx

https://github.com/kamalbuilds/Gas-Protocol/blob/master/src/components/ProtocolCard/ProtocolCard.tsx

https://github.com/kamalbuilds/Gas-Protocol/blob/master/src/contexts/ClaimRequestContext.js

https://github.com/kamalbuilds/Gas-Protocol/blob/master/src/sismo-connect-config.ts

image

Protcols setup their custom zk proofs to filter their intended users. image

image

Users submit their onchain proofs in the form of zkproofs using sismo image

About

Gas Protocol: Unlocking gasless on-chain transactions for new Web3 users. Using Safe AA and GelatoRelaySDK to abstract web3 for your users effortlessly.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages