MELD Dev Docs
  • Welcome to MELD
  • OVERVIEW
    • Core Concepts
      • EVM Compatible
      • Staking/Block Rewards
      • L1-Subnet
    • Bug Bounties
    • Careers
    • Security & Audits
      • Double Spend Prevention
  • DEVELOP
    • Developing on MELD
    • Basics
      • Kanazawa Testnet
      • Test Tokens & Faucet
      • MELD Mainnet
      • RPC connections
        • RPC Methods
      • Explorers
    • Tools
    • Oracles
      • Integrating Supra Oracles
    • Deploy a Smart Contract
      • Smart Contract Languages
      • Smart Contract Testing
      • Using Remix IDE
      • Using Hardhat
      • Verify Your Smart Contract
    • Token Standards
      • MLD-20: Fungible Tokens
        • Interacting With MLD-20 Tokens
      • MLD-721: NFTs
      • MLD-1155: Multi-token standard
      • MLD-404: Semi-fungible tokens
      • MDL-6551: Token Bound Accounts
    • Deploy NFTs
      • Using Remix
    • dApp
      • Develop a Full Stack dApp on MELD
      • Secure your dApp
    • Decentralized Storage
    • Cross Chain Bridging
      • Integrating Chainport
        • Bridging Between MELD and EVM Chains
          • Main Chain -> Side Chain
          • Side Chain -> Main Chain
          • Side Chain -> Side Chain
      • Akamon Bridge
      • Yield Boost
  • VALIDATORS
    • Overview
    • Consensus
    • Run a Validator node
    • MELD Staking
  • Tutorials
    • Using MELD with your metamask
    • Create a Token
    • Add a Token to Asomi DEX
    • Lock/Burn Liquidity
  • FAQ
    • General FAQ
    • Borrowing & Lending FAQ
    • MELD ISPO FAQ
Powered by GitBook
On this page
  • MELD dynamic staking - Goals and processes
  • Stake a new position
  • Withdraw a position
  • Change delegation
  1. VALIDATORS

MELD Staking

PreviousRun a Validator nodeNextUsing MELD with your metamask

Last updated 1 year ago

MELD dynamic staking - Goals and processes

Key points and takeaways

  • All staking is linked to a node validating the MELD network.

  • Nodes total staked amount can be between 100k and 20M MELD tokens.

  • Rewards are calculated in epochs of 5 days. Only the liquidity staked during the full length of the epoch will get rewarded.

  • All staking positions get represented by NFTs.

  • Staking positions can be liquid or locked in different modular tiers, therefore increasing the weight of rewards distributed to them

  • Users need to delegate stake to an active node operator to generate rewards.

  • Nodes will have the capacity to set a delegator fee when they register their node.

  • Users can change the node they delegate to at any time.

  • Nodes can be slashed if they misbehave or go offline. Users that delegate to that node will also get slashed.

MELD staking has been designed as a fully modular and composable protocol that can be integrated in different ways by users and third party protocols. All code is open sourced and can be found here:

All updated addresses can be retrieved from the Address Provider contract deployed in the network.

Key flows to integrate the protocol in other apps:

Stake a new position

// Interact with MeldStakingDelegator.sol contract

/**
* @notice  Creates an staking position for a user, delegating to a node
* @dev     Manages total stake and rewards calculation. Further info can be found on docs* @param   _amount  Amount of MELD tokens to stake. Full decimals
* @param   _nodeId  Node ID to delegate to.
* @param   _lockTierId  Lock tier ID.
*/
function stake(
    uint256 _amount, 
    bytes32 _nodeId,
    uint256 _lockTierId
)

Withdraw a position

// Interact with MeldStakingDelegator.sol contract

/**
* @notice  A delegator redeems their Staking NFT withdrawing their stake and unclaimed rewards
* @dev     Can only be done by owner of NFT
* @dev     Can only be done by a delegator
* @dev     If the staking position is locked and the lock period has not ended, it will revert
* @param   _nftId  Staking position NFT ID to redeem
*/
function withdraw(uint256 _nftId)

Change delegation

// Interact with MeldStakingDelegator.sol contract

/**
* @notice  Changes the delegation of a staking position to a new node
* @dev     Adapts staking info and rewards for old and new node. Can only be done by owner of NFT
* @param   _nftId  Staking position NFT ID to change
* @param   _newNodeId  ID of the new node to delegate to
*/
function changeDelegation(
   uint256 _nftId,
   bytes32 _newNodeId
) 

GitHub - MELD-labs/meld-staking-publicGitHub
Logo