Bribes
The x/bribe
module implements a protocol-level mechanism that allows applications to reward vRISE holders for directing votes to specific pools. This creates an efficient market for liquidity allocation through a bribe-based incentive system.
Key Features
LEVEL 1: FOR APP DEVELOPERS
Protocol-Level Bribes:
Applications can offer bribes to attract liquidity to specific pools
vRISE holders are incentivized to direct votes to pools with higher bribes
Creates an efficient market for liquidity allocation
Epoch-Based System:
Bribes are tied to specific epochs
System tracks expired epochs
Unclaimed bribes from expired epochs are processed and sent to fee collector
Weight-Based Distribution:
Fair allocation based on vote weights
Prevents double claiming
Transparent and verifiable on-chain
Economic Efficiency:
Creates a market for liquidity allocation
vRISE holders can maximize returns by directing votes
Unclaimed rewards are recycled to fee collector
Core Functionality
Bribe Management
Each bribe is defined by several parameters:
id
: Unique identifier for the bribeepoch_id
: The epoch for which the bribe is validpool_id
: The pool to which the bribe appliesamount
: Total amount of the bribeclaimed_amount
: Amount already claimed by voters
Bribe Allocation
The system tracks how bribes are allocated to voters:
address
: Voter's addressepoch_id
: Epoch for which the allocation is validpool_id
: Pool to which the allocation appliesweight
: Weight of the voter's votesclaimed_bribe_ids
: List of bribe IDs already claimed
Bribe System Architecture & Flow
Key Components and Flows
Bribe Registration
User registers a bribe by sending coins to the Bribe module.
The system creates a Bribe record (with unique ID, epoch, pool, amount, and claimed amount).
Bribe allocations are created for voters based on their vote weights for the pool in that epoch.
Funds are stored in the Bribe Account (module account).
Bribe Claiming
User initiates a claim for their bribe allocation.
The system:
Verifies the bribe exists and is valid for the epoch/pool.
Checks the user's allocation and ensures the bribe hasn't been claimed.
Calculates the claimable amount based on the user's vote weight.
Transfers the appropriate amount from the Bribe Account to the user.
Updates the claimed amount and allocation records.
Fee Processing
Unclaimed bribes from expired epochs are returned to the Fee Collector.
Fees are processed:
Transferred from the Fee Collector to the module account.
Converted to the bond denomination if needed.
Distributed to liquidity pools as incentives.
Cleanup (Unclaimed Bribes)
At the end of each epoch, the system:
Processes expired epochs.
Calculates unclaimed bribe amounts.
Returns unclaimed funds to the Fee Collector.
Cleans up expired bribe and allocation records.
State Transitions
Bribe: Created → Active → Claimed/Expired
Allocation: Created → Active → Claimed/Expired
Funds: User → Bribe Account → User/Fee Collector
Data Structures
Bribe
BribeAllocation
Bribe System Flowchart
Flow Explanation:
The user registers a bribe, which is deposited into the Bribe Account.
The system allocates bribe shares to eligible voters based on their voting weights.
Users can claim their allocated bribe rewards from the Bribe Allocation.
Claimed rewards are transferred to the user's account.
Any unclaimed bribes after the claim period are sent to the Fee Collector for redistribution or burning.
Querying Bribes
The system provides endpoints to:
BribesByPoolId
: Query all bribes for a poolBribesByEpochAndPoolId
: Query bribes for a specific epoch and poolBribeAllocations
: Query all bribe allocationsBribeAllocation
: Query allocation for a specific address/epoch/poolBribeAllocationsByAddress
: Get allocations for specific addressQuery claimable amounts and claimed status
Query expired/cleaned up bribes
Integration Points
The bribe module integrates with several other modules:
Bank module for coin transfers
Account module for address handling
Staking module for vRISE holders
Governance module for parameter updates
Parameters
The system has configurable parameters:
Bribe claim epochs (time window for claiming)
Other governance-controlled parameters
Last updated