Docs

tokenDelegate - Stake Tokens to Validators

Delegate tokens to Hyperliquid validators for staking rewards. Participate in network security and earn yield.

Delegate (stake) tokens to a validator or undelegate them. This enables token holders to participate in network security and earn staking rewards.

Sample Data

JSON
{
  "signature": {
    "r": "0xd3d8ea7bf5d7699274f77d6527be0a78f137cb7f41e8b90b87de639b1f4d5704",
    "s": "0x7041f94160b4b38e516507a201e5f65872fb7e9ce2522b901b31621048fbb653",
    "v": 27
  },
  "action": {
    "type": "tokenDelegate",
    "signatureChainId": "0xa4b1",
    "hyperliquidChain": "Mainnet",
    "validator": "0xa23b4556090260828ff3f939d2dbdd4f318b5f1f",
    "wei": 10000000000,
    "isUndelegate": false,
    "nonce": 1768148103446
  },
  "nonce": 1768148103446
}

View this transaction on Hypurrscan

Field Reference

Action Fields

FieldTypeDescription
typestringAlways "tokenDelegate"
signatureChainIdstringChain ID for EIP-712 signing
hyperliquidChainstringTarget chain: "Mainnet" or "Testnet"
validatorstringValidator address to delegate to
weinumberAmount in wei (smallest unit)
isUndelegatebooleantrue to undelegate, false to delegate
noncenumberTransaction nonce

Amount Conversion

The wei field is in the smallest token unit:

  • 14494791496000 wei = 14.49 tokens (assuming 12 decimals)

Use Cases

Staking Analytics

Track delegation and undelegation patterns:

Python
def process_tokenDelegate_action(action):
    validator = action.get('validator')
    amount_wei = action.get('wei')
    is_undelegate = action.get('isUndelegate')

    direction = 'undelegated from' if is_undelegate else 'delegated to'
    print(f"Tokens {direction} validator {validator[:10]}...")

Validator Monitoring

Track which validators are gaining or losing stake.

Network Security Analysis

Monitor total stake and distribution across validators.