Skip to main content

Configure Economy Chain

Module arguments​

The Economy Chain has the following module args:

NameDescriptionTypeRequiredDefault
evm_asset_network_idIdentifier for the EVM network where the asset resides.int✅
evm_asset_addressAddress of the asset on the EVM network.text✅
evm_asset_nameName of the asset as defined on the EVM network.text✅
evm_asset_symbolSymbol representing the asset on the EVM network (e.g., "ETH").text✅
evm_asset_decimalsNumber of decimal places used by the asset on the EVM network.int✅
asset_nameName of the asset within the Chromia network.text✅
asset_symbolSymbol representing the asset on the Chromia network (e.g., "CHR").text✅
asset_decimalsNumber of decimal places used by the asset in the Chromia network.text✅
asset_iconURL for the icon representing the asset in the Chromia network.text✅
amount_to_mintAmount of the asset to mint when a new account is registered.int✅
pool_amount_to_mintMaximum amount of the asset that can be minted to the pool account within a defined time interval (pool_refill_limit_ms).int✅
admin_pubkeyPublic key of the administrator responsible for managing the chain.pubkey✅
staking_initial_reward_rateInitial reward rate applied to staking activities.decimal✅
staking_rate_change_delay_msMinimum time interval (in milliseconds) between staking reward rate adjustments.int✅
staking_withdrawal_delay_msMinimum time interval (in milliseconds) required for staking withdrawals to be processed.int✅
staking_rewards_payout_interval_msTime interval (in milliseconds) between successive staking reward payouts.int✅
staking_withdrawals_payout_interval_msTime interval (in milliseconds) between successive staking withdrawal payouts.int✅
staking_rewards_start_timeStart time (as a timestamp) for when staking rewards begin accumulating.timestamp0
pool_refill_limit_msMinimum time interval (in milliseconds) between consecutive refills of the pool account.int✅
max_bridge_leases_per_containerMaximum number of bridge leases that can be accommodated per container.int✅
evm_transaction_submitters_bonusBonus coefficient used to calculate rewards for submitting EVM transactions.decimal✅
max_dapp_providers_per_leaseMaximum number of decentralized application (dapp) providers that can be associated with a single lease.int100

FT4 configuration​

The module args for FT4 configuration are:

NameDescriptionTypeRequired
activeEnables or disables the FT4 rate limit functionality. Configured under the lib.ft4.core.accounts.rate_limit parameter.int✅
max_pointsMaximum number of rate limit points allowed per account. Configured under the lib.ft4.core.accounts.rate_limit parameter.int✅
recovery_timeTime (in milliseconds) required to recover one rate limit point. Configured under the lib.ft4.core.accounts.rate_limit parameter.int✅
points_at_account_creationInitial rate limit points assigned to a new account. Configured under the lib.ft4.core.accounts.rate_limit parameter.int✅
auth_pubkeyPublic key for the FT4 authorization server, used for account authentication. Configured under the lib.auth parameter.int✅

ICMF configuration​

In addition, you need to set up the ICMF configuration to listen to the following topics:

From the anchoring chain:

  • G_node_availability_report

From the Directory Chain:

  • L_create_cluster_error
  • L_ticket_container_result
  • L_cluster_update
  • L_provider_update
  • L_provider_auth_update
  • L_node_update
  • L_cluster_node_update
  • L_token_price_changed
  • L_blockchain_rid_topic
  • L_subnode_image_update
  • L_cluster_subnode_image_update

From the EVM transaction submitter chain:

  • G_evm_transaction_submitter_cost_topic

EIF configuration​

The Economy Chain configuration also includes the configuration for EIF.

Example:

economy_chain:
module: economy_chain
config:
config_consensus_strategy: HEADER_HASH
revolt:
fast_revolt_status_timeout: 2000
sync_ext:
- "net.postchain.d1.icmf.IcmfReceiverSynchronizationInfrastructureExtension"
gtx:
modules:
- "net.postchain.d1.icmf.IcmfReceiverGTXModule"
- "net.postchain.d1.icmf.IcmfSenderGTXModule"
- "net.postchain.eif.EifGTXModule"
icmf:
receiver:
anchoring:
topics:
- G_node_availability_report
directory-chain:
topics:
- L_create_cluster_error
- L_ticket_container_result
- L_cluster_update
- L_provider_update
- L_provider_auth_update
- L_node_update
- L_cluster_node_update
- L_token_price_changed
- L_blockchain_rid_topic
- L_subnode_image_update
- L_cluster_subnode_image_update
global:
topics:
- G_evm_transaction_submitter_cost_topic
eif:
# event processing
snapshot:
levels_per_page: 2
snapshots_to_keep: 2
# event receiver
chains:
bsc:
network_id: 97
contracts:
- "0x6e42297d0374B78b695bd7d91f92C76E24B551F4"
- "0x753218363422002DF74F3D0D8d67f6CB38bE32D0"
evm_read_offset: 3
read_offset: 3
events: !include config/events.yaml
moduleArgs:
lib.ft4.core.accounts:
rate_limit:
active: 1
max_points: 20
recovery_time: 5000
points_at_account_creation: 1
lib.auth:
auth_pubkey: x"" # Replace this with the FT4 authorization server private key
economy_chain:
evm_asset_network_id: 97
evm_asset_address: "8A2279d4A90B6fe1C4B30fa660cC9f926797bAA2"
evm_asset_name: "tCHR"
evm_asset_symbol: "tCHR"
evm_asset_decimals: 6
asset_name: "Chromia Test"
asset_symbol: "tCHR"
asset_decimals: 6
asset_icon: "https://s3.eu-central-1.amazonaws.com/www.chromiadev.net/assets/tCHR.png"
amount_to_mint: 1000000000
pool_amount_to_mint: 1000000000
admin_pubkey: x"" # Replace this admin key
staking_initial_reward_rate: 0.15
staking_rate_change_delay_ms: 604800000
staking_withdrawal_delay_ms: 1209600000
staking_rewards_payout_interval_ms: 31536000000
staking_withdrawals_payout_interval_ms: 31536000000
pool_refill_limit_ms: 86400000
max_bridge_leases_per_container: 10
evm_transaction_submitters_bonus: 0.1

libs:
ft4:
registry: https://gitlab.com/chromaway/ft4-lib.git
path: rell/src/lib/ft4
tagOrBranch: v1.0.0r
rid: x"FA487D75E63B6B58381F8D71E0700E69BEDEAD3A57D1E6C1A9ABB149FAC9E65F"
insecure: false
auth:
registry: https://bitbucket.org/chromawallet/auth-server-ft4.git
path: rell/src/auth
tagOrBranch: v2.1.0r
rid: x"7EC77529149B510F7863BA19CE2A8798AD8492A98A79F8B350FE8D774996F268"
insecure: false
priceoracle:
registry: https://bitbucket.org/chromawallet/priceoracle.git
path: src
tagOrBranch: "0.2"
rid: x"E0D3FAD15812941D2FD52A43BB3E4F2AA8BC8D795A5C27EBA4F9791CC43BE250"
insecure: false
eif:
registry: https://gitlab.com/chromaway/postchain-eif
path: postchain-eif-rell/rell/src/eif/
tagOrBranch: "0.3.8"
rid: x"B023B96EF2331FC912A39D56489810935E718D10BA8EE953BF09526250F6AB53"
insecure: false
eif_event_receiver_chain/messaging:
registry: https://gitlab.com/chromaway/postchain-eif
path: postchain-eif-rell/rell/src/eif_event_receiver_chain/messaging
tagOrBranch: "0.3.8"
rid: x"B635B3174B65768C88690382F1A08CF7E507D3CA5A5818A86B7A54D8D0E58978"
insecure: false