Overview
The Distribution precompile provides access to Sei’s staking reward distribution system, allowing you to claim delegation rewards, set withdrawal addresses, and query pending rewards directly from EVM contracts. This bridges EVM functionality with Cosmos SDK distribution module. Contract Address:0x0000000000000000000000000000000000001007
Key Features
- Reward Claiming: Withdraw staking rewards from validator delegations
- Batch Operations: Claim rewards from multiple validators in a single transaction
- Reward Queries: Check pending rewards before claiming
- Withdrawal Management: Set custom withdrawal addresses for rewards
Available Functions
State-Changing Functions
withdrawDelegationRewards(string) → bool
withdrawDelegationRewards(string) → bool
Withdraw staking rewards from a specific validator.Parameters:
validator
(string): The validator’s operator address
withdrawMultipleDelegationRewards(string[]) → bool
withdrawMultipleDelegationRewards(string[]) → bool
Withdraw staking rewards from multiple validators in a single transaction.Parameters:
validators
(string[]): Array of validator operator addresses
setWithdrawAddress(address) → bool
setWithdrawAddress(address) → bool
Set a custom address to receive withdrawn rewards.Parameters:
withdrawAddr
(address): The EVM address to receive rewards
View Functions
rewards(address) → Rewards
rewards(address) → Rewards
Query pending staking rewards for a delegator.Parameters:
delegatorAddress
(address): The delegator’s EVM address
Usage Examples
- Viem
- Ethers.js
- Manual
Common Use Cases
Automated Reward Claiming
- DeFi Protocols: Automatically claim and reinvest staking rewards
- Yield Optimization: Compound rewards to maximize returns
- Portfolio Management: Regular reward harvesting across multiple validators
Liquid Staking Protocols
- Reward Distribution: Distribute claimed rewards to token holders
- Fee Collection: Set withdrawal addresses to protocol treasury
- Automated Compounding: Reinvest rewards to increase staking positions
Staking-as-a-Service
- Client Management: Claim rewards on behalf of clients
- Fee Deduction: Set withdrawal addresses for fee collection
- Performance Tracking: Monitor reward generation across validators
Reward Optimization Strategies
Timing Optimization
Validator Selection for Claiming
Batch Claiming Strategy
Reward Tracking and Analytics
Error Handling
Common errors when using the Distribution precompile:- No rewards available: No pending rewards to claim
- Invalid validator: Validator address doesn’t exist
- Withdrawal address error: Invalid withdrawal address format
- Insufficient gas: Complex multi-validator claims need more gas
Related Precompiles
- Staking: Delegate tokens to earn rewards
- Bank: Check reward balances after claiming
- Governance: Participate in governance with staked tokens