Contracts
Overview


Source code is available on Github at the following url: https://github.com/vechain/stargate-contracts
StargateNFT
Mainnet contract address: 0x1856c533ac2d94340aaa8544d35a5c1d4a21dee7
Upgradeable ERC721 with pauseable functionality and governed by role-based access control. It is a continuation of the legacy Token Auction (X-Node and Eco Nodes) collection. This contract allows users to stake VET and receive an NFT in exchange, which acts as a certificate of your staked VET. Whoever owns the NFT, also owns the staked VET associated to it.
This contract also supports the claim of VTHO rewards for user stakes generated by the balance of the VET contract (aka: base rewards) by the VeChain energy growth mechanism and the issuance of this reward to users.
Uses the following protocol libraries to implement the main functionality:
Clock
: Current block/timestamp/clock mode helper.
DataTypes
: Data structures.
Errors
: Custom errors definitions.
Levels
: Levels management.
MintingLogic
: Core stake/unstake & migration flow.
Settings
: Contract-parameter management.
Token
: Get tokens/users tokens data helper.
VetGeneratedVtho
: Support dual-token VeChain economic model. Distribution generated VTH0 rewards.
StargateDelegation
Mainnet contract address: 0x4cb1c9ef05b529c093371264fab2c93cc6cddb0e
Upgradeable contract that allows a user owning a StargateNFT
to start delegating, accumulate VTHO rewards, with governed by role-based access control.
The term "delegation" is used in the context of the Hayabusa protocol hardfork, when a user will delegate their staked VET to a validator. This contract, though, is used to simulate the delegation process, so it's not used in the Hayabusa protocol, and VET are not transferred.
When a user starts delegating, the contract will lock the NFT (done in the StargateNFT
contract by calling the isDelegationActive
function) and start accumulating rewards based on the NFT level.
When a user exits delegation, the contract will unlock the NFT and stop accumulating rewards.
Each delegation follows a delegationPeriod
, and it serves two main purposes:
It defines a mandatory minimum duration for delegation (users can't exit before this period ends)
It creates boundaries for when rewards can be claimed (only for completed periods)
NodeManagementV3
Mainnet contract address: 0xB0EF9D89C6b49CbA6BBF86Bf2FDf0Eee4968c6AB
This contract was originally created and used by VeBetterDAO to manage node ownership and delegation. It supports delegation (aka: adding another address that can use the ownership of your NFT to perform on chain actions), retrieval of managed nodes, and integration with legacy VeChain Nodes and token auction contracts.
Developers can use this contract to easily migrate from pointing to the legacy VeChain nodes contract to the new StargateNFT
contract, by pointing to both the legacy VeChain nodes contract and the new StargateNFT
contract, allowing an easy way to check node ownership and delegation for both.
This contract will be discuntinued with the release of Hayabusa, but the managers will be migrated.
ABIs
Last updated
Was this helpful?