Humming Human: a technical collaboration between Hummingbot and HUMAN Protocol

Author: fengtality 0x352

Original Post Date: 8 Jun 2022

Hummingbot Foundation is incredibly excited to announce a partnership with our friends at Human Protocol to incentivize our respective developer communities to build a system that verifies and rewards on-chain work .

Initially, the system will focus on verifying DEX liquidity and volume , enabling projects to incentivize on-chain “proof of liquidity.”

Together, we aim to build public infrastructure that rewards proven, verified work from any source, bot or human .

Announcing Humming Human - a technical collaboration between Hummingbot and HUMAN Protocol

Hummingbot Foundation is excited to announce a technical partnership with HUMAN Protocol to incentivize our respective communities to collaboratively build Humming Human, a public infrastructure that verifies and rewards on-chain activity on decentralized exchanges (DEX) and other DeFi platforms. We believe that transparent, permissionless, on-chain incentive systems like Humming Human will power the future of on-chain work, for both humans and bots.

Humming Human combines on-chain smart contracts and an off-chain recording oracle layer to enable the creation of decentralized reward pools that enable anyone to earn token rewards for providing volume and/or liquidity to participating platforms. Initially, the system aims to:

● Verify on-chain trading volume and liquidity provided by a certain wallet address for a specific pool on a DEX on an EVM-compatible blockchain

● Enable a funder to fund a token reward pool held in the smart contract

● Enable wallet addresses that have provided verified volume and liquidity over a certain timespan to request and withdraw compensation from the reward pool

Once Humming Human goes live, any DEX will be able to crowdsource verified, on-chain liquidity and trading volume from a decentralized set of market participants using token rewards.

Within the next 2 weeks, Hummingbot Foundation will propose a governance proposal to allocate HBOT, and the HUMAN Grants committee will vote on allocating HMT tokens toward grants, respectively, to incentivize developers from our respective communities to work together on building this component. From a technical point of view, the system has two main pieces:

● A payouts contract that holds reward token deposits and allocates them to addresses that provide verifiable DEX activity

● An oracle contract and off-chain service that verifies DEX activity for the payouts contract

Please see below for initial specifications.

Payouts contract

create_campaign

Description:

Allows a funder to fund a campaign for a given trading pair on a DEX over a certain period. This will create an escrow contract on the human protocol of the particular liquidity campaign.

Parameters:

○ start_block: starting block

○ end_block: ending block

○ exchange: address of exchange contract

○ tokenA: first token in trading pair

○ tokenB: second token in trading pair

○ type: “volume” or “liquidity”

○ msg.value: ETH or ERC-20 tokens allocated as reward

Logic:

○ Deposits tokens in smart contract and instantiates campaign with a new campaign_id

○ Returns campaign_id if successful

claim

Description:

○ Enable a wallet that has provided volume and liquidity to a certain DEX to request compensation from the reward pool. This alerts the record oracle to start indexing transactions on this address and recording any liquidity activity.

Parameters:

○ msg.sender: calling wallet address

○ campaign_id: id of campaign issuing rewards

○ start_block: starting block

○ end_block: ending block

○ exchange: address of exchange contract

○ tokenA: first token in trading pair

○ tokenB: second token in trading pair

○ type: “volume” or “liquidity”

Logic:

○ Check if campaign_id exists

○ Call verify method on oracle contract to retrieve user activity

○ Compute reward amount based on user activity and reputation

○ Move amount of tokens from reward pool into account that user can extract from

Oracle contract and off-chain service

verify

Description:

○ Returns on-chain activity for a given address in a certain trading pair on a DEX. This can be used by the recording and reputation oracle to track how successful a given liquidity provider was at tracking the campaign.

Parameters:

○ msg.sender: calling wallet address

○ start_block: starting block

○ end_block: ending block

○ exchange: address of exchange contract

○ tokenA: first token in trading pair

○ tokenB: second token in trading pair

○ type: “volume” or “liquidity”

Logic:

○ If type == volume, return quantity of tokenA and tokenB swapped by msg.sender on exchange from start_block to end_block

○ If type == liquidity, return avg quantity of tokenA and tokenB added to pool by msg.sender over each block from start_block to end_block