gasfee

package
v0.0.0-...-fd10465 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 14, 2022 License: MIT Imports: 22 Imported by: 0

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:
      1. get bnb/usdt, fra/usdt, btc/usdt, eth/usdt price from gate.io regularly (every 10 mins)
      2. every 24 hours get transfer to address value more than 50 usd
      3. send him XXX * price(bnb/usdt) / price(fra/usdt) FRA
      4. XXX = a. 1200000000000000 wei or a fixed wei b. dynamic gasfee * fixed wei

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotOverThreshold = errors.New("transaction value is not over the threshold")
	ErrAlreadyRefunded  = errors.New("address has been refunded already")
)

Functions

This section is empty.

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

func New

func New(c client.Client, conf *config.GasfeeService) (*Service, error)

func (*Service) Close

func (s *Service) Close()

Close stops the fork out goroutines from Start method

func (*Service) Start

func (s *Service) Start()

Start spawns two goroutines: 1. a crawler ---> crawling gate.io to get the usdt price 2. a refund ---> do the refunding action to recipients

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL