LiquidLink Gas Fee Bounty

DAPP Network
The DAPP Network Blog
3 min readAug 25, 2021

At present, using LiquidBridges requires the DAPP Service Providers, who run the service, to cover the gas fees for their users. An on-chain method for direct gas payment that takes into account the constant fluctuation of the price of resources has yet to be created. Enters the LiquidLink Gas Fee Bounty.

Developers — create a solution that allows bridge users to pay their gas and resources payments directly, and you could win up to 200,000 DAPPs.

LiquidLink Gas Fee Bounty: Specific Details & Requirements

The DAPP Network Gas Fee Bridge Bounty is concentrated around the link library, which is the EOSIO<>EVM library that enables cross chain communication.

At present, the gas fees are covered by the DAPP Service Providers running the LiquidLink service. There is not an on-chain method for direct payment that takes into account the constant fluctuation of the price of resources on Ethereum, Binance Smart Chain, Polygon (Matic), Moonbeam (Polkadot) as well as gas.

For the fungible token contracts ethtokenpeg.cpp and binancetokenpeg.cpp, deposit of payment should be acceptable in the system token of the chain (EOS, WAX, etc.) as well as the token being bridged.

For the non fungible contract atomictokenpeg.cpp, deposit of payment should be accepted in a token that exists on swap.defi as well as the system token.

There should be a deposit / withdrawal action added to each of the 3 contracts for users to deposit funds and withdraw the remaining balance. The requested fee should show as an assertion message when transferring to the bridge contract if the user has not deposited funds, it should also be available by get table row call. If multiple sources of funds are deposited, subtract the max balance possible from each account until the desired amount is achieved.

Developers should be able to configure an adjustable multiplier on the desired amount to charge above returned values. For example, if the gas price is $10 and there is a 50% multiplier, the total price would be $15 in whatever token is being deposited.

Example Macros:

  • setupOracle(uri,symbol,isGas)
  • setupGas(uri,gasLevel) — gas level: fast,fastest,safeLow,average
  • setupOnChain(code,scope,id)

Please note: LiquidScheduler crons must support on/off chain oracles listed below. If using off-chain data, use LiquidHarmony oracles.

On-chain price:

Any existing pairing (e.g. DAPP-USD) defi box/newdex: https://bloks.io/account/swap.defi?loadContract=true&tab=Tables&table=pairs&accou[…]p.defi&scope=swap.defi&limit=100&lower_bound=193&upper_bound=193

Off-chain gas/price using LiquidHarmony oracles:

  • Gas price from: https+json://average/ethgasstation.info/api/ethgasAPI.json?api-key=…
  • ETH price from: https+json://data.1027.quote.USD.price/pro-api.coinmarketcap.com/v1/cryptocurrency/quotes/latest?CMC_PRO_API_KEY=…&id=1027
  • EOS price from EOS at CoinMarketCap.

Submissions must include:

  • Modified link.hpp file including macro logic.
  • Added unit tests for ensuring oracle and gas values are available on-chain (for all of the following boxes: atomictokenpeg, binancetokenpeg, ethtokenpeg)

Optional Bonuses:

Add the following functionalities and you could win an additional bonus:

  • Support registering multiple tokens/oracle URIs for payment
  • Add DSP ability to store API keys for account:action:network so API keys do not need to be passed on-chain.

Create a solution that allows LiquidBridge users to pay their gas and resources payments directly — and you could win up to 200,000 DAPP tokens!

Unlisted

--

--

DAPP Network
The DAPP Network Blog

DAPP Network aims to optimize development on the blockchain by equipping developers with a range of products for building and scaling dApps.