Feature: Delegation program stake checker and adjuster #5980
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Stake Adjustment Program (
stake_adjustment.py)Overview
This simple argument based program is designed primarily for Delegation program management.
The main goal is to generate a csv of which first two columns without headers can be passed to nym-cli as input for a quick delegation adjustment, using this command:
The default values are in sync with DP rules:
--wallet_address: Nym Team DP wallet address--saturation: 250k NYM--stake_cap: 90% as per DP rules--adjustment_step: 25k NYM as per DP rules--max_wallet_delegation: 125k NYM as per DP rules--denom: NYM not uNYM to make it smoother and aligned with delegate-multi command of nym-cliAdditionaly the program scrapes api.nym.spectredao.net/api/v1/nodes and validator.nymtech.net/api/v1/nym-nodes/described endpoints and returns a sheet with 20 values per eacvh node passed in the csv input.
The outcome is a table with these values:
NODE ID, SUGGESTED WALLET DELEGATION, CURRENT WALLET DELEGATION, SUGGESTED TOTAL STAKE, CURRENT TOTAL STAKE, SUGGESTED SATURATION, CURRENT SATURATION, UPTIME, VERSION, T&C, BINARY, ROLE, WIREGUARD, IP ADDRESS, HOSTNAME, WSS PORT, MONIKER, IDENTITY KEY, BONDING WALLET, EXPLORER URL.
Install and Run
wget https://raw.githubusercontent.com/nymtech/nym/refs/heads/feature/operators/delegation-program-adjuster/scripts/delegation-program/stake_adjustment.py && chmod u+x stake_adjustment.pynode_ids(for DP, use all the DP nodesnode_idcolumn, and save it to the same dir, example can beinput.csv:input.csvpositional arg (for DP use the default values without any optional args):csvwith bunch of useful dataNODE_IDandSUGGESTED_WALLET_DELEGATIONwithout the headers and save them as adp_update.csvdp_update.csvas an input withnym-clito adjust the DP delegations:./nym-cli mixnet delegators delegate-multi --mnemonic "<MNEMONIC>" --input dp_update.csvHelp
To preview all commands and arguments, run it with
--helpflag:This change is