Coder Social home page Coder Social logo

kamalbuilds / gas-protocol Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 1.0 3.12 MB

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

Home Page: https://gas-protocol.vercel.app

JavaScript 0.74% TypeScript 98.59% CSS 0.66%
account-abstraction apecoin gelato makerdao safe sismo tableland zk-proofs lit-encryption

gas-protocol's Introduction

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

gas-protocol's People

Contributors

aarav1656 avatar abhishek-01k avatar kamalbuilds avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

yumikonakamura

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.