Chikku is a blockchain built using Cosmos SDK and Tendermint and created with Ignite CLI.
Warning: This is a development version of the blockchain. Do not use in production.
-
EGV Token and Dynamic Rewards: Implement a system for distributing "egv" tokens to 10 pre-defined addresses. Design a reward mechanism that distributes additional egv tokens based on transaction volume, calculated as:
individual_reward = (individual_address_transactions / total_network_transactions) * (inflation_rate * total_supply).
-
Transaction-Weighted Governance(Bonus): Develop a governance system that allows for modification of the inflation rate via proposals and weighted voting. Voting weight should be determined by network contribution:
Voting weight = (individual_address_transactions / total_network_transactions)
-
x/egvmod: EGV Token and Dynamic Rewards
-
Predefined addresses that receive EGV tokens:
- Register the predefined addresses (10 operators with some egv tokens) from the config as module params file.
-
Params:
- InflationRate: The rate at which new tokens are minted.
- distrubutionInterval: The interval at which rewards are distributed.
- operators: The list of predefined operators.
-
Structs:
-
TotalTrxsCount: The total number of transactions in the network since genesis at given block height.
total_network_trxs = sum(operator_cumulative_trxs_count) (block_height => [(operator_address, cumulative_trxs_count), ...])
-
OperatorTrxsCount: The number of transactions for each operator, which would get updated after each transaction and reset after each distribution has happened.
[(operator_address, trxs_count), ...]
Also storing for future reference with key as block height.
(block_height => [(operator_address, individual_reward), ...])
-
lastDistributionBlock: The block height at which the last distribution happened.
-
-
Expected behavior:
-
while Gensis intialization, register the predefined operators with some egv tokens. (10 operators)
- Initialize the
OperatorTrxsCountfor each operator to 0. - Initialize the
distrubutionIntervalto 100 blocks through module params. so that it can be changed through governance. - Initialize the
inflationRateto 0.1 (default 10%) through module params. so that it can be changed through governance. - add export genesis to the module.
- Initialize the
-
Increment the
OperatorTrxsCountfor each operator after each transaction. Reset the count after each distribution. Currently it is using store to track theOperatorTrxsCountbut can be updated to use memStore.- use AnteHandler to update the
OperatorTrxsCountafter each transaction. - Can use MsgTypeURL to check the type of transaction and update the
OperatorTrxsCount.
- use AnteHandler to update the
-
Calculate & Mint new tokens and distribute them to the operators.
-
Distribute the rewards to the operators at
distributionIntervalblocks, atEndBlocker.if current_height% distributionInterval == 0: for operator in operators: individual_reward = (operator_trxs_count / total_network_trxs) * (inflation_rate * total_supply) operator_trxs_count = 0 mint_tokens(operator, individual_reward)
-
-
-
Permissions:
- x/bank
- x/mint
- x/auth
-
-
x/egov: Transaction-Weighted Governance
- Permissions:
- x/gov
- Expected behavior:
-
Create a
Proposalwith new InflationRate, distributionInterval, Or operators. -
Store each
Proposalwithsnapshot_trxs_countandtotal_network_trxs. -
A params change proposal to modify the
InflationRate,distributionInterval, andoperators.- Only the governance module can modify the
InflationRate. - Only the governance module can modify the
distributionInterval. - Only the governance module can modify the
operators.
- Only the governance module can modify the
-
The voting weight should be determined by the
operator_trxs_countof the operator.vote_weight = individual_address_transactions / total_network_transactions
-
The proposal should be accepted if the voting weight is greater than 50%
- Custom Tally that calculates the voting weight.
-
- Permissions:
- inflation_rate = 0.1 (default 10%) and is for a given
distributionInterval. - total_network_transactions = total number of transactions in the network since genesis.

