Enable REStake Auto-Compound for Your Validator
REStake is a powerful tool that allows validators to auto-compound staking rewards for their delegators. This guide will walk you through the process of enabling REStake for your validator node.
How to Enable REStake Auto-Compound for Your Validator
Introduction
REStake is a powerful tool that allows validators to auto-compound staking rewards for their delegators. This guide will walk you through the process of enabling REStake for your validator node.
Prerequisites
- A running validator node
- Access to your validator's wallet with sufficient funds for gas fees
- Your validator operator address
- Basic knowledge of command-line operations
What is REStake?
REStake enables validators to automatically claim and re-stake rewards on behalf of their delegators. This provides several benefits:
- 📈 Compound Interest: Delegators earn more through automatic compounding
- ⚡ Gas Efficiency: Batch operations reduce individual gas costs
- 🤝 Better Delegator Experience: Set-it-and-forget-it convenience
- 💰 Validator Commission: Earn commission on auto-compounded rewards
Step 1: Grant Authorization
Delegators must grant authorization to your validator to claim and restake their rewards.
For Delegators
Connect your wallet to the REStake app and grant permission:
# Visit REStake website
https://restake.app
# Select your network
# Find your validator
# Click "Enable REStake"
# Approve the authorization transaction
Authorization Message
The authorization allows the validator to:
- Claim staking rewards
- Delegate rewards back to the validator
- Execute these actions on your behalf
Note: You can revoke authorization at any time through the REStake interface.
Step 2: Register Your Validator
Before configuring REStake, you need to register your validator in the official registry.
Fork the Validator Registry
- Go to https://github.com/eco-stake/validator-registry
- Click "Fork" to create your own copy
- Clone your forked repository:
git clone https://github.com/YOUR-USERNAME/validator-registry.git
cd validator-registry
Add Your Validator Profile
Create a new folder with your validator name in the chains/ directory:
mkdir -p chains/cosmoshub/validators/winnode
cd chains/cosmoshub/validators/winnode
Create a profile.json file with your validator information:
{
"name": "Winnode",
"identity": "YOUR_KEYBASE_ID",
"address": "cosmosvaloper1xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"active": true,
"hex_address": "VALIDATOR_HEX_ADDRESS",
"operator_address": "cosmosvaloper1xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"consensus_pubkey": {
"@type": "/cosmos.crypto.ed25519.PubKey",
"key": "YOUR_CONSENSUS_PUBKEY"
},
"jailed": false,
"status": "BOND_STATUS_BONDED",
"tokens": "1000000",
"delegator_shares": "1000000.000000000000000000",
"description": {
"moniker": "Winnode",
"identity": "YOUR_KEYBASE_ID",
"website": "https://winnode.com",
"security_contact": "security@winnode.com",
"details": "Professional blockchain infrastructure provider"
},
"unbonding_height": "0",
"unbonding_time": "1970-01-01T00:00:00Z",
"commission": {
"commission_rates": {
"rate": "0.050000000000000000",
"max_rate": "0.200000000000000000",
"max_change_rate": "0.010000000000000000"
},
"update_time": "2024-01-01T00:00:00Z"
},
"min_self_delegation": "1",
"rank": 100,
"mintscan_image": "https://raw.githubusercontent.com/cosmostation/chainlist/master/chain/cosmos/moniker/winnode.png",
"keybase_image": "https://s3.amazonaws.com/keybase_processed_uploads/xxxxx.png",
"slashes": [],
"services": {
"staking_rewards": {
"name": "Winnode",
"verified": false,
"slug": "winnode"
}
},
"delegations": {
"total_tokens": "1000000",
"total_count": 100,
"total_tokens_display": "1.00",
"total_usd": 10000
},
"signing_info": {
"address": "",
"start_height": "0",
"index_offset": "0",
"jailed_until": "1970-01-01T00:00:00Z",
"tombstoned": false,
"missed_blocks_counter": "0"
},
"image": "https://your-validator-logo.png",
"restake": {
"address": "cosmos1xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"run_time": "every 1 hour",
"minimum_reward": 1000
}
}
Important Fields for REStake
The most critical section is the restake object:
"restake": {
"address": "cosmos1xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"run_time": "every 1 hour",
"minimum_reward": 1000
}
address: Your bot wallet address (NOT validator operator address)run_time: How often REStake will run (e.g., "every 1 hour", "every 6 hours")minimum_reward: Minimum reward in base denom to trigger restaking
Get Your Validator Information
To get your validator details:
# Get validator info
gaiad query staking validator cosmosvaloper1xxxxx --output json
# Get consensus pubkey
gaiad tendermint show-validator
# Get hex address
gaiad keys parse $(gaiad tendermint show-address)
Submit Pull Request
- Commit your changes:
git add .
git commit -m "Add Winnode validator profile for Cosmos Hub"
git push origin main
- Go to your forked repository on GitHub
- Click "Pull Request" → "New Pull Request"
- Submit PR to
eco-stake/validator-registry - Wait for approval from REStake team
Note: Your validator will appear on REStake.app after the PR is merged (usually 24-48 hours).
Step 3: Configure Your Validator
Install REStake Script
Clone the REStake repository:
cd $HOME
git clone https://github.com/eco-stake/restake.git
cd restake
Install Dependencies
npm install
Create Configuration File
Create a networks.json file with your validator details:
{
"cosmoshub": {
"name": "Cosmos Hub",
"prettyName": "Cosmos Hub",
"chainId": "cosmoshub-4",
"prefix": "cosmos",
"denom": "uatom",
"restUrl": "https://api.cosmos.network",
"rpcUrl": "https://rpc.cosmos.network",
"validators": [
{
"address": "cosmosvaloper1xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"restake": {
"address": "cosmos1xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"run_time": "every 1 hour",
"minimum_reward": 1000
}
}
]
}
}
Configuration Parameters
address: Your validator operator addressrestake.address: Your bot wallet address (for signing transactions)run_time: How often to run auto-compound (e.g., "every 1 hour", "every 6 hours")minimum_reward: Minimum reward amount to trigger restaking (in base denom)
Step 4: Set Up Bot Wallet
Create a New Wallet
# Create a new wallet for the REStake bot
gaiad keys add restake-bot
# Or recover existing wallet
gaiad keys add restake-bot --recover
Fund the Bot Wallet
The bot wallet needs funds for gas fees:
# Send tokens to bot wallet
gaiad tx bank send <your-wallet> <bot-wallet-address> 1000000uatom \
--chain-id cosmoshub-4 \
--gas auto \
--gas-adjustment 1.5 \
--fees 5000uatom
Tip: Keep at least 0.1-1 token in the bot wallet for gas fees.
Step 5: Test REStake
Dry Run
Test the configuration without executing transactions:
npm run restake -- --dry-run
Manual Run
Execute a manual restake operation:
npm run restake
Check Logs
Monitor the output for any errors:
# Successful output should show:
# ✓ Claimed rewards for X delegators
# ✓ Restaked Y tokens
# ✓ Total gas used: Z
Step 6: Automate with Cron
Create Cron Job
Set up automatic execution:
# Edit crontab
crontab -e
# Add REStake job (runs every hour)
0 * * * * cd /path/to/restake && npm run restake >> /var/log/restake.log 2>&1
Cron Schedule Examples
# Every hour
0 * * * * cd /path/to/restake && npm run restake
# Every 6 hours
0 */6 * * * cd /path/to/restake && npm run restake
# Every day at 2 AM
0 2 * * * cd /path/to/restake && npm run restake
# Every 4 hours
0 */4 * * * cd /path/to/restake && npm run restake
Step 7: Monitor Operations
Check REStake Status
# View recent logs
tail -f /var/log/restake.log
# Check bot wallet balance
gaiad query bank balances <bot-wallet-address>
# View delegator authorizations
gaiad query authz grants <bot-wallet-address> <delegator-address>
Monitor Metrics
Track important metrics:
- Number of delegators with REStake enabled
- Total rewards claimed and restaked
- Gas fees spent
- Bot wallet balance
Step 8: Promote REStake
Update Validator Profile
Add REStake information to your validator description:
gaiad tx staking edit-validator \
--details "Auto-compound enabled via REStake. Visit restake.app to enable!" \
--chain-id cosmoshub-4 \
--from <your-wallet> \
--gas auto \
--fees 5000uatom
Social Media
Announce REStake availability:
- Twitter/X announcement
- Telegram/Discord notifications
- Website/documentation updates
Troubleshooting
Common Issues
1. Insufficient Gas Fees
Error: insufficient fees
Solution:
# Add more funds to bot wallet
gaiad tx bank send <your-wallet> <bot-wallet-address> 1000000uatom
2. No Authorizations Found
Error: No grants found
Solution: Delegators need to grant authorization first through restake.app
3. RPC Connection Failed
Error: Failed to connect to RPC
Solution:
- Check RPC endpoint in
networks.json - Verify RPC is accessible
- Try alternative RPC endpoints
4. Invalid Configuration
Error: Configuration error
Solution:
- Validate JSON syntax in
networks.json - Check all required fields are present
- Verify addresses are correct format
Best Practices
Security
✅ Do:
- Use a dedicated bot wallet
- Keep bot wallet private keys secure
- Monitor bot wallet balance regularly
- Set reasonable minimum reward thresholds
❌ Don't:
- Use your validator operator key for REStake
- Share bot wallet credentials
- Run REStake too frequently (wastes gas)
- Ignore error logs
Optimization
- Frequency: Run every 1-6 hours depending on network activity
- Minimum Reward: Set to avoid wasting gas on small amounts
- Gas Prices: Monitor and adjust for network conditions
- Batch Size: Process multiple delegators per transaction when possible
Advanced Configuration
Multiple Networks
Support multiple chains:
{
"cosmoshub": { ... },
"osmosis": { ... },
"juno": { ... }
}
Custom Gas Settings
{
"restake": {
"address": "cosmos1xxx",
"run_time": "every 1 hour",
"minimum_reward": 1000,
"gas_price": "0.025uatom",
"gas_adjustment": 1.5
}
}
Notification Webhooks
Set up alerts for important events:
{
"restake": {
"address": "cosmos1xxx",
"webhooks": {
"success": "https://your-webhook.com/success",
"error": "https://your-webhook.com/error"
}
}
}
Monitoring Dashboard
Create Status Page
Track REStake performance:
# Install monitoring tools
npm install -g pm2
# Run REStake with PM2
pm2 start npm --name "restake" -- run restake
# View dashboard
pm2 monit
Metrics to Track
- ✅ Successful restake operations
- ⚠️ Failed transactions
- 💰 Total rewards compounded
- ⛽ Gas fees spent
- 👥 Active delegators with REStake
Resources
Official Links
- 🌐 REStake Website: https://restake.app
- 📚 Documentation: https://docs.restake.app
- 💻 GitHub REStake: https://github.com/eco-stake/restake
- 💻 GitHub Registry: https://github.com/eco-stake/validator-registry
- 💬 Discord: https://discord.gg/restake
Community Support
- Telegram: REStake Community
- Twitter: @REStakeApp
- Forum: forum.cosmos.network
Conclusion
Enabling REStake for your validator provides significant value to your delegators through automatic reward compounding. By following this guide, you've:
✅ Configured REStake for your validator ✅ Set up automated execution ✅ Implemented monitoring and alerts ✅ Promoted the feature to delegators
Remember to:
- Keep your bot wallet funded
- Monitor logs regularly
- Respond to delegator questions
- Update configuration as needed
Happy staking! 🚀
Need Help?
If you encounter issues or have questions:
- Check the troubleshooting section above
- Review REStake documentation
- Ask in the community Discord/Telegram
- Contact Winnode support
Last Updated: January 2025