MELD Staking

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
) 

Last updated