Discover Packages
github.com/FindoraNetwork/refunder
gasfee
package
Version:
v0.0.0-...-fd10465
Opens a new window with list of versions in this module.
Published: Jul 14, 2022
License: MIT
Opens a new window with license information.
Imports: 22
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
README
¶
Type 2: Gas Refund
triggered on UTC+0 specific HH:MM time everyday
User will be refunded once only
User to transfer more than a threshold of USDT amount from BSC or Ethereum
Pick Min price from the previous day, No need for reducing factor.
the lowest BNB_USTD (or ETH_USTD) price
the highest FRA_USTD price
actions:
get bnb/usdt, fra/usdt, btc/usdt, eth/usdt price from gate.io regularly (every 10 mins)
every 24 hours get transfer to address value more than 50 usd
send him XXX * price(bnb/usdt) / price(fra/usdt) FRA
XXX =
a. 1200000000000000 wei or a fixed wei
b. dynamic gasfee * fixed wei
Expand ▾
Collapse ▴
Documentation
¶
View Source
var (
ErrNotOverThreshold = errors .New ("transaction value is not over the threshold")
ErrAlreadyRefunded = errors .New ("address has been refunded already")
)
Close stops the fork out goroutines from Start method
Start spawns two goroutines:
1. a crawler ---> crawling gate.io to get the usdt price
2. a refund ---> do the refunding action to recipients
Source Files
¶
Click to show internal directories.
Click to hide internal directories.