There are many exciting upcoming changes for ICP.
Some of you may be wondering how you can ensure going forward you get the most out of your NNS participation.
The Problem:
The NNS requires voters to be active participants, this is to ensure the best interest of the protocol, aligning incentives with longterm interests. However, the reality is that most users, even most developers, do not have the time or technical ability to evaluate every proposal.
Therefore we follow people on the NNS, trusting that they have our best interests at heart. In reality, as stakers, what we really care about are the incentives.
Itâs possible that some participants may feel, that those they have been following might not actually have their best interests at heart. Itâs possible that some may even be actively campaigning to divert a percentage of your depreciating slashed rewards, to their own neurons.
The Solution
You could log into the NNS every day and manually click the buttons over and over. However this creates an issue because itâs time consuming, and it also forces you to look at the value of your assets which may be psychologically troubling. Fortunately thereâs another way.
Step 1.
If you havnât already, install dfx. If you arnât sure how you can find a tutorial in the official documentation.
Step 2.
Create your dfx identity, make sure you use --storage-mode=plaintext. This will prevent you from having to type a password everytime you issue a command, the reason for which will become clear soon.
Step 3.
Login to the NNS dapp and make your dfx identity a hotkey of your neuron. use the dfx identity get-principal command to retrieve your PID.
Step 4.
Simply run the following bash script once every 3 days. It will take care of voting for you. You never have to look at your account again, and you donât need to worry that even one penny will go to a named neuron. Because really what this about is peace of mind
#!/bin/bash
# --- CONFIGURATION ---
NEURON_ID="YOUR_NEURON_ID" # <--- Put your 2-year Neuron ID here
CANISTER_ID="rrkah-fqaaa-aaaaa-aaaaq-cai"
if [ "$NEURON_ID" == "YOUR_NEURON_ID_HERE" ]; then
echo "Error: Please set your NEURON_ID in the script."
exit 1
fi
echo "Fetching open proposals to reject..."
# 1. Get the IDs of all open proposals
# We use the same serialization-safe call from before
PROPOSAL_IDS=$(dfx canister --network ic call "$CANISTER_ID" list_proposals \
"(record {
include_reward_status = vec {1 : int32};
omit_large_fields = opt true;
include_status = vec {1 : int32};
before_proposal = null;
limit = 100 : nat32;
exclude_topic = vec {} : vec int32;
include_all_manage_neuron_proposals = opt true;
})" --output json | jq -r '.proposal_info[] | .id[0].id')
if [ -z "$PROPOSAL_IDS" ]; then
echo "No open proposals found."
exit 0
fi
# 2. Iterate and Vote
for PID in $PROPOSAL_IDS; do
echo "Processing Proposal ID: $PID"
# We call manage_neuron to register the vote
# vote = 2 is REJECT
dfx canister --network ic call "$CANISTER_ID" manage_neuron \
"(record {
id = opt record {id = $NEURON_ID : nat64};
command = opt variant {
RegisterVote = record {
vote = 2 : int32;
proposal = opt record {id = $PID : nat64}
}
}
})"
echo "Rejected $PID."
sleep 0.5 # Small delay to be kind to the network/rate limits
done
echo "Done. All retrieved proposals have been rejected."
