pendulum-chain/pendulum

Update the Foucoco genesis configuration to latest on-chain values

Closed this issue · 7 comments

ebma commented

In order to prepare for the upcoming reset of our Foucoco runtime, we should update the genesis configuration of Foucoco in chain_spec.rs to the values that are currently set on-chain. If we don't do this now, we might miss some configuration parameters that were set in previous root user transactions and wind up with different configuration parameters than we have at the moment.

What needs to change

  • The Spacewalk-related parameters, ie. collateralization parameters for other currencies, etc.
  • The DIA oracle batching API and currencies
  • The initial sudo signatories, see here.

Other changes we executed to rollout Foucoco last time:

  • distribution of crowdloan rewards (not required this time as this was just for testing)
  • distribution of the genesis allocation to different tokenomics allocations (crowdloan reserve, ecosystem development, ...)
  • distribution of some funds for the multisig signatories (to pay for transaction fees)
  • removal of all funds from genesis
  • distribution of funds to collators
  • let collators stake minimum amount
  • set up collator nodes as initial authors
  • set up staking parameters for parachain staking pallet
  • register initial Spacewalk vaults

The Spacewalk-related parameters also need to include the Spacewalk Tier 1 set.

ebma commented

The following configuration items need to change:

fee

  • issueFee: 0.1%
  • issueGriefingCollateral: 0.5%
  • redeemFee: 0.1%
  • premiumRedeemFee: 5%
  • punishmentFee: 10%
  • replaceGriefingCollateral: 10%

oracle:

  • maxDelay: 604_800_000 (1 week)
  • oracleKeys: Native, XCM(0), Stellar-Native, Stellar-USDC, Stellar-BRL, Stellar-TZS

diaOracleModule:

  • authorizedAccount: can stay as authorized_oracles variable. But we should add 6m69vWMouLarYCbJGJisVaDDpfNGETkD5hsDWf2T7osW4Cn1 to the vector of authorized_oracles that is passed in the foucoco_config() function because that's the account of our off-chain worker, periodically feeding prices
  • supportedCurrencies: use all contained in the PDF
  • batchingAPI: https://dia-00.pendulumchain.tech/currencies
  • coinInfos: keep empty, will be filled automatically by the off-chain worker

stellar-relay pallet:

  • keep as is

vault-registry:

  • thresholds:
    • We need to add all 4 currencies here (USDC, XLM, TZS, BRL)
    • We should define them similar to this, ie. I would remove the usage and definition of default_pair and just build VaultCurrencyPair structs as needed.
    • The collateralization parameters can be found here.
  • minimum_collateral_vault: take data from PDF. ie. min collateral for XCM(0) is 3 units
  • punishment_delay: foucoco_runtime::DAYS * 2 (= 14_400)

issue:

  • issueMinimumTransferAmount: 1_000_000_000
  • issuePeriod: keep foucoco_runtime::DAYS
  • rest keep as is in chain spec

redeem:

  • redeemPeriod: keep foucoco_runtime::DAYS
  • redeemMinimumTransferAmount: 1_000_000_000

replace:

  • replacePeriod: keep foucoco_runtime::DAYS
  • replaceMinimumTransferAmount: 1_000_000_000

@TorstenStueber @ebma Here are the generated files for the chain-spec, genesis state, and runtime validation function. There are all compressed in the para-2124 zip file.

para-2124.zip

This is the zip file of the latest Foucoco spec.
foucoco-spec.zip

@ebma could you add retrospectively the estimate for this one?

ebma commented