CLV Documentations
CLV DOC
CLV DOC
  • Intro to CLV
    • About CLV 🍀
    • Clover Finance Rebrands to CLV
    • What is CLV Chain?
    • What is CLV Wallet?
    • What is $CLV Token?
    • 📣 CLV Official Channels
    • 🏘 CLV Community Channels
  • Use CLV Chain
    • 📚 Beginner’s Guide
      • Setup CLV Wallet
      • Setup Metamask Wallet
      • How to Get $CLV
      • Bridge Other Assets to CLV P-Chain (Parachain)
    • 🌐 Network Details
    • 🏦 Economics
      • Tokenomics
      • Inflation Design
    • 🗳️Governance
    • 🙋🏻 CLV Chain FAQ
    • CLV P-Chain EVM Explorer
    • $CLV Cross-Chain Explorer
    • $CLV Cross-Chain Transfer
  • CLV Validator & Staking
    • What are Nominator & Validator?
    • Stake as a Nominator
    • Running a Validator or RPC Node
    • Staking FAQ
  • Use CLV Wallet
    • 💰 Download CLV Wallet
      • Browser Extension (Google Chrome & Brave)
      • Apple iOS (Mobile)
      • Android (Mobile)
      • Web Wallet (Universal)
    • 📱 CLV Mobile Wallet
    • 🖥 CLV Extension Wallet
    • 🕸️ CLV Web Wallet
  • CLV Chain Developer Guide
    • Getting Started
    • Using Local Node
      • Using MetaMask
      • Using Remix
      • Using Web3.js
    • Using Testnet
      • Create an account
      • Faucet
      • Run a Testnet Node
      • Connect to Testnet
    • dApp Example
      • Setup dApp project
      • Setup truffle
      • The Counter Contract
      • Deploy Contract
      • Counter Webapp
    • Test Cases
    • Technical Documentations
      • CLV EVM
      • Developers Incentive
      • CLV Accounts Binding
      • Virtual Ethereum Address Binding
      • Query Balance
      • Transaction Finality
      • 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
      • CLV P-Chain Integration
  • CLV Wallet Developer Guide
    • EVM dApp Integration
    • Substrate dApp Integration
    • Solana dApp Integration
    • Kadena dApp Integration
    • Aptos dApp Integration
    • Web Wallet dApp Integration
    • dApp Interaction Protocol
    • Wallet Integration QA
  • CLV Ecosystem
    • 🏞️ Ecosystem Partners
      • CLV Chain
      • CLV Wallet
    • 🌱 Incentive Programs
      • CLV Ecosystem Grant
      • CLV Wallet Integration Grant
      • CLV Bug Bounty Program
    • Whitelist Assets on Clover P-Chain
    • Bridge assets into CLV P-Chain
  • Assets
    • 🔤 Glossary
      • Blockchain (in General)
      • Polkadot
      • Wallet
    • 🎟️ CLV - Polkadot Parachain Auction 2021
      • Parachain Auction Rule Announcement
      • Parachain Winning Reward Announcement
    • 🛍️ Brand Pack
    • 📄 Whitepaper
Powered by GitBook
On this page
  • Coinbase Rule Activation
  • Smart Contract Implementation
  • Registration
  • Invocation
  • Reward Distribution
  1. CLV Chain Developer Guide
  2. Technical Documentations

Developers Incentive

PreviousCLV EVMNextCLV Accounts Binding

Last updated 2 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

CLV 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 CLV parachain. This implementation is made of three main phases; registration, invocation and reward distribution.

Registration

Third party CLV 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 CLV network which can be called internally within the external contract with the additional data provided. Whenever a CLV 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 CLV 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