Skip to content

Delegation

Assign stake to a validator who earns on your behalf and takes a commission.

Contract: 0x8cb3420CbC4BddE84Ff1A38FB91e3861847fE176

For delegators

FunctionPurpose
delegate(address validator)Delegate, sending KNYX as value
undelegate(address validator, uint256 amount)Begin unbonding
withdraw()Collect unbonded principal
claimRewards(address validator)Collect your rewards
pendingRewards(address delegator, address validator)Rewards accrued
earned(address delegator, address validator)The same, raw
js
const delegation = new ethers.Contract(DELEGATION, [
  'function delegate(address validator) payable',
  'function pendingRewards(address,address) view returns (uint256)',
  'function claimRewards(address validator)',
], signer);

await (await delegation.delegate(validatorAddress, {
  value: ethers.parseEther('1'),
})).wait();

Choosing a validator

Commission is the number that matters most, and it is not the only one.

ConsiderWhy
Commission rateTaken from your rewards before you receive them
Whether they are activeAn inactive validator earns nothing
ReliabilityA validator that misses blocks earns less to share

maxCommissionPercent caps what any validator can charge, so there is a ceiling — but within it, the rate is theirs to set.

For validators

FunctionPurpose
registerValidator(string moniker, uint256 commissionPercent)Register
updateValidator(string moniker, uint256 commissionPercent)Change details
setValidatorActive(bool active)Accept or stop accepting delegations
claimCommission()Collect accrued commission
fundRewards()Add to the reward pool, payable
js
await (await delegation.registerValidator('my-validator', 10)).wait();

Application-level, not the chain validator set

Registering here does not make you a block-producing validator. That is a separate, chain-level process — see Running a validator. This contract is an application-level delegation market.

Commission

A validator's commission is deducted from rewards before they reach delegators:

delegatorReward = grossReward × (100 − commissionPercent) / 100
commission      = grossReward × commissionPercent / 100

The validator claims theirs with claimCommission().

Unbonding

As with staking, undelegate begins a delay and withdraw collects afterwards. The current state shows 5.25 KNYX in unbonding against 2.0 KNYX delegated, which is normal — unbonding balances persist until collected.

Real transactions

OperationTransactionBlock
Validator registered0x0d53985b0c2181e2bef3b3d49e9ef3f757222f03cf7f4c73e393b3474d34ffd25,808,901
Delegate0x5b9bf17803b37d88ec06b284003710a3ea93858eb58c3a2785fc526fec30d8e36,136,445

KriptoNyx testnet — chain ID 3009 (kriptonyx_3009-1)