ICX delegation script
If you're an ICON validator, learn how to use this script to track the votes you receive through Omm.
bOMM holders can participate in ICON’s voting system by delegating ICX from the ICON market towards up to 5 ICON validators (see Vote for ICON validators).
Some validators offer voting incentives to ICX stakers. bOMM has more voting power than staked ICX – and it's cheaper – so validators can use the ICX delegation script to offer incentives to bOMM holders.
The delegation script (view on GitHub) fetches the wallet addresses used to vote for a specific validator, and their voting power in ICX. The output is saved to a JSON file using this format:
{
"hx04c8c5e5f412aa7c1986514bbbef2d269a2733fc": 466204891016976169228621,
"hx989fa78200b23ca042e52e370128ee141187f443": 438638739301371746761613,
"hx1be60841025db1b22126ba08ba519326603029c9": 342672743228696263962315,
"hx5933fba534f5152ab435e02f7067e4729affa92e": 250278905329592107143901,
"hx90899b65c16139ad4983a7a570c17db84c5162c4": 217572371437773081042390,
"hx1747aeab5afbdabd85af027ae249897cd5165146": 199561909138062903960000,
"hxa777652bb82b6e6a88678f2b5ccda93e3163ebc2": 156338462634667962819797
}
First, make sure you have Python 3 and PIP installed on your device. Then:
- 1.Install the required libraries:
pip3 install -r requirements.txt
2. Run the script to fetch a list of wallet addresses and their voting power for a specific validator (also known as a P-Rep):
python3 prep-icx-delegations.py -prep PREP_ADDRESS
python3 prep-icx-delegations.py -prep hx0000000000000000000000000000000000000000
3. Open the
timestamp_prepaddress_delegations.json
file the script created, then divide the number beside each wallet address by 1,000,000,000,000,000,000 (10^18) to get the ICX amount.
Community trackers don't pick up the votes cast via Omm, because the votes are routed through the Balanced staking contract before they're assigned to a validator.
- 1.
- 2.Find
getAddressDelegations
, then query Omm's lending pool contract address:cxfb312bbd0a244b9e7bb5794c91f4e4acc41dea94
. - 3.Locate your validator address, then copy the value beside it.
- 4.
Vote for ICON validators includes details about validator incentives that support Omm users. The app also indicates which validators offer incentives, so it's easier for voters to choose.
Last modified 25d ago