CLV Documentations
Portal
Portal
  • Welcome to Clover
  • Useful Links
  • CLV Token
  • Quick Start
    • Clover Networks
    • Sakura Networks
    • Using Local Node
    • Using Testnet
      • Create an account
      • Faucet
      • Run a Testnet Node
      • Connect to Testnet
  • Development Guide
    • Introduction
      • Prerequisites
      • Setup environment
    • Using MetaMask
    • Using Remix
    • Using Web3.js
      • Query Balance
      • Send Transaction
    • Counter Tutorial
      • Setup dapp project
      • Setup truffle
      • The Counter Contract
      • Deploy Contract
      • Counter Webapp
  • Clover Wallets & Dapps
    • Clover Extension Wallet
      • Getting Started
      • Switch Networks
      • Add Tokens
      • Send Tokens
      • Cross-Chain Transfer
      • View Seed Phrase
      • Import Account
      • dApp Integration
      • Substrate dApp Integration
      • Solana-dApp-Integration
      • dApp Interaction Protocol
      • Wallet Integration QA
    • Clover Mobile Wallet
    • Clover Web Wallet
      • dApp Integration
    • Clover Assets Explorer
    • Clover Cross-Chain Explorer
  • Maintain
    • Running a validator on Clover Network
    • Running a RPC node
    • Staking on Clover
      • Staking via Apps
      • Staking via Clover Wallet
  • Technical Documentation
    • Web3 compatibility
      • eth_protocolVersion
      • eth_syncing
      • eth_hashrate
      • eth_coinbase
      • eth_mining
      • eth_chainId
      • eth_gasPrice
      • eth_accounts
      • eth_blockNumber
      • eth_getBalance
      • eth_getStorageAt
      • eth_getBlock
      • eth_getTransactionCount
      • eth_getBlockTransactionCount
      • eth_getBlockUncleCount
      • eth_getCode
      • eth_sendTransaction
      • eth_sendSignedTransaction
      • eth_call
      • eth_estimateGas
      • eth_getTransaction
      • eth_getTransactionByBlockHashAndIndex
      • eth_getTransactionByBlockNumberAndIndex
      • eth_getTransactionReceipt
      • eth_getUncle
      • eth_getLogs
      • eth_getWork
      • eth_submitWork
      • eth_submitHashrate
      • eth_subscribe
      • eth_unsubscribe
      • net_version
      • net_peerCount
      • net_listening
      • web3_clientVersion
      • web3_sha3
    • Clover Test Cases
    • Clover EVM
    • Clover Accounts Binding
    • Query Balance
    • Transaction Finality
  • Clover Eco Incentive Program
    • Introduction
    • Clover Developer Incentive Program
    • Virtual Ethereum address binding
    • Clover User Incentive Program
  • Parachain Auction
    • About Polkadot Parachain Auction
Powered by GitBook
On this page
  • Coinbase Rule Activation
  • Smart Contract Implementation
  • Registration
  • Invocation
  • Reward Distribution
  1. Clover Eco Incentive Program

Clover Developer Incentive Program

PreviousIntroductionNextVirtual Ethereum address binding

Last updated 4 years ago

The Developer Incentive Program (DIP) is made of two respective implementations, a foundational-layer coinbase rule activation and a following smart contract implementation.

Coinbase Rule Activation

Clover users contribute to the program indirectly with transaction fees, this is so that a new fee schedule is not committed to the transaction structure itself. Wallet softwares functions the same as usual without breaking backwards compatibility.

The coinbase transaction which spends the block reward and all transaction fees to an address of the validators choosing follows a subsequent transaction where 49 percent of txFee reward is respectively transferred to DIP contract. The amount of total CLV a successful validator can claim for himself is therefore changed from blockReward + txnFees to blockReward + txnFees51/100. Whenever a block is propagated, every node will check whether the block adheres to the rules where the sum of all transaction outputs in a block must be equal or smaller than all transaction inputs and the block reward: sum(blockOutputs) ¡ sum(blockInputs) + (blockReward + txnFees51/100) + txnFees*49/100

Smart Contract Implementation

External contract registration and reward distribution are done through DIP contract, a trust- less autonomous contract that lives on the Clover parachain. This implementation is made of three main phases; registration, invocation and reward distribution.

Registration

Third party Clover developers can benefit from the Developer Incentive Program upon registering their compiled contract with DIP contract pre-deployment. An external contract willing to register Developer Incentive Program should include an internal method called transactAndInvokeDIP which is used to trigger reward incrementation, and another internal method called claimRewards which is used to trigger reward settlement.

Right before contract deployment, the respective developer submits contract ABI and contract hexadecimal representation to DIP contract via registerExternalContract method. Given parameters registerExternalContract registers submission upon checking whether the contract is well-formatted and transactAndInvokeDIP is well-structured.

Invocation

transactAndInvokeDIP adds a new standard to contracts on the Clover network which can be called internally within the external contract with the additional data provided. Whenever a clover user interacts with a registered external contract, transactAndInvokeDIP invokes DIP contract’s function listenInvokeDIP and triggers an event incrementRewardNonce(address), following the convention set in ERC677.

Reward Distribution

Registered third party Clover developers can claim their rewards, in a predefined period of time, upon calling internal claimRewards function which triggers a set of events to distribute a portion of associated rewards based on external contract’s reward nonce and DIP contract’s total reward pool from coinbase txFee rewards.

New Contract Registration Logic
Invocation Logic
Reward Distribution Logic