Hi, is there any function or some smart contract to take example from to do the following:
The idea is to take a small fee percentage (0.2%) before calling a transfer function and not spending on gas fee ?
The fee percentage function should be a separate function.

I searched on Google and the only one I came across was the Uniswap smart contract but it isn’t what I need

Aug 16, 2023, 8:08 PM
Gas fee is required no matter what to change any state on the blockchain
What is your end goal? Have the tax pay for the gas?
Aug 16, 2023, 8:15 PM
nope, the goal is to get a fee when a users use our dApp of reports, but the idea is to avoid that the users spend on gas fee for transfering a small amount of fee (0,25%) for the service
let's say a user has 100 $, he connect the wallet and create a report and before that the user do the creation we want to cut a 0,25% for the report generation so basically 0.25 $ of fees
checking the transfer in ETH it will cost 1.35 $ for the transfer + 0.25 $ for the fees, so 1.60 $ total on spending for the fees part which we ipotetically want the user don't spend
Aug 16, 2023, 11:07 PM
You could look into a relayer where you would pay the gas for them
Openzeppelin has one
Aug 16, 2023, 11:09 PM
so there is no way to spend less on transferring ?
Aug 16, 2023, 11:10 PM
if there would be a way to spend less- every wallet would use it. The current state is nash equilibrium
Aug 17, 2023, 6:41 PM
there is a minimum gas cost of 21k wei to make a tx
Aug 17, 2023, 6:45 PM

© 2024 Draquery.com All rights reserved.