Smart Contract Reference

Technical reference for the XDC Staking NFTs smart contract.


Functions

Stake

Deposits psXDC into an NFT to begin earning rewards.

  • Increases the NFT's intrinsic value and level.

  • Starts accruing NFT-level rewards based on the total multiplier.

Withdraw psXDC

Removes staked psXDC from the NFT.

  • Partial or full withdrawal is supported.

  • The NFT is not burned - it can be restaked later.

  • psXDC is returned to the user's wallet.

Transfer

Moves the NFT to a different wallet.

  • Ownership is updated on-chain.

  • The new owner inherits staked psXDC, multipliers, and locked status.

Merge

Combines two same-rarity NFTs into a higher-rarity NFT.

  • Both originals are burned.

  • A new NFT with improved base multiplier is minted.

Lock

Locks the NFT for 1 year for an additional 1.25% APY bonus (up to 6% total).

  • While locked: burn, merge, and withdraw are disabled.

  • Rewards continue to accrue and are claimable monthly.

Claim XDC Rewards

Claims monthly XDC rewards generated by the NFT's staked psXDC and multiplier.

  • Rewards are paid in XDC.

Sell

Lists or auctions the NFT on PrimePortarrow-up-right.

  • The buyer inherits staked psXDC, pending rewards, and future yield rights.

  • Requirement: Seller must hold 100% of the NFT's linked psXDC.

Last updated