mirror of
https://github.com/luxfi/genesis.git
synced 2026-07-27 04:11:41 +00:00
Fees on every Lux C-Chain currently take the legacy path in
core/fee_split.go: the whole fee is credited to the block coinbase. On
mainnet that coinbase is 0x0100000000000000000000000000000000000000 —
no code, no key — so 3867.54 LUX of paid gas is sitting in an address
nobody can spend from, growing every block.
The policy we want is already implemented and already tested:
if cfg.IsFeeSplit(blockTime) {
rewardShare := new(uint256.Int).Rsh(fee, 1) // floor(fee/2)
stateDB.AddBalance(extras.FeeRewardVault, rewardShare, ...)
// burnShare = fee - rewardShare is left uncredited (true burn).
return
}
Half burns for real by never being credited; half accrues to
FeeRewardVault (0x0100…0002) for governance to fold into staking
rewards. What was missing is only the activation timestamp — nil means
never, and it was absent from devnet, testnet and mainnet alike.
FeeSplitTimestamp sits on ChainConfig rather than NetworkUpgrades on
purpose (it has no ordering relationship to the opcode forks), so it
cannot be set through upgrade.json's networkUpgradeOverrides — it has
to come from the chain config, which is why this is a genesis-config
change and not an upgrade file.
The timestamp is in the future by design. A past one would claim a fee
routing for blocks that were already accepted under the legacy rule and
put replaying nodes into a different state than the chain agreed on.
Devnet only. Testnet and mainnet stay on the legacy path until this is
observed firing here — the acceptance signal is eth_getBalance of
0x0100…0002 strictly INCREASING across blocks after the fork time, not
the absence of an error in the logs.
Co-authored-by: Hanzo Dev <dev@hanzo.ai>