Skip to content

Gas Fee Pool Hat is that gas fee is paid by relayer instead of users by utilizing rDAI and Biconomy. (=Amount that relayer pay for gas fee is provided from interest income via rDAI)

Notifications You must be signed in to change notification settings

masaun/gas-fee-pool-hat

Repository files navigation

Gas Fee Pool Hat

【Introduction of Gas Fee Pool Hat】

  • Gas Fee Pool Hat is that gas fee is paid by relayer instead of users by utilizing rDAI and Biconomy.
    • Amount that relayer pay for gas fee is provided from interest income via rDAI.
    • Users generate Interest income via specific Hat of rDAI
    • Users are staking generated "interest income" into Gas Fee Pool Hat .
    • Users can pay "Gas Fee" of users with generated "interest income" instead of users.
      • This structure is realized by "Meta-Transaction" by using Biconomy .

 

【User Flow】

[User Flow Guide of Gas Fee Pool Hat]

https://medium.com/@masanoriuno_75621/user-flow-guide-of-gas-fee-pool-hat-bfb713f3fcbc


[User Flow (briefly)]


  • ② Create new Hat for gas-fee-pool (=Called "gas fee pool Hat" )
    • At that time, user specify proportions between user's wallet address and registered Relayer Address
    • By specifying above, generated interest will be pooled into gas-fee-pool-Hat every time which interest are generated. (Pooled amount into gas-fee-pool-Hat is amount that proportion is specified)

  • ③ Redeem & Transfer (from "gas fee pool Hat" to "RelayerAddress" )

  • ④ Execute test function (Push a button of "Set Text" in the page of "Mete-Transaction")
    • At the same time with executing this function, Gas Fee is paid by registered relayer via meta-transaction of Biconomy. (Registered relayer pay with pooled interest income for gas fee which happen by executing test function)

 


【Setup】

Versions / Environment

$ truffle versions

  - Truffle v5.1.23 (core: 5.1.23)
  - Solidity v0.5.16 (solc-js)
  - Node v12.13.0
  - Web3.js v1.2.1

Setup wallet by using Metamask

  1. Add MetaMask to browser (Chrome or FireFox or Opera or Brave)
    https://metamask.io/

  2. Adjust appropriate newwork below

Kovan Test Network

 

Setup backend

  1. Deploy contracts to Kovan Test Network
(root directory)

$ npm run migrate:Kovan

 

Setup frontend

  1. Add an .env file under the directory of ./client.

  2. Add SKIP_PREFLIGHT_CHECK=true to an .env file under the directory of ./client.
    (Recommend to reference from ./client/.env.example

  3. Execute command below in root directory.

$ npm run client
  1. Access to browser by using link
http://127.0.0.1:3000/gas-fee-pool

 


【References】


About

Gas Fee Pool Hat is that gas fee is paid by relayer instead of users by utilizing rDAI and Biconomy. (=Amount that relayer pay for gas fee is provided from interest income via rDAI)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published