Devshard work-coin payouts bypass WorkVestingPeriod on late-settle and unsettled-prune paths (diverges from tokenomics.md) #1909
Summary
docs/tokenomics.md states that all newly distributed rewards — including Work Coins (fees from user requests) — are routed through the vesting system. For devshard host income this holds only on the on-time settlement path. The late-settlement and unsettled-prune payout paths send the coins as a liquid bank transfer, bypassing WorkVestingPeriod.
Documented policy
docs/tokenomics.md (Vesting Mechanism): "All newly distributed rewards are routed through a dedicated vesting system" — "Work Coins: Fees from user requests, subject to configurable vesting periods".
Code (origin/main)
Vesting is applied only when a positive period is passed to PayParticipantFromModule (inference-chain/x/inference/keeper/payment_handler.go:65 → AddVestedRewards); a bare SendCoinsFromModuleToAccount is liquid (payment_handler.go:91).
- Vested — on-time settle: a current-epoch devshard settlement credits
CoinBalance(msg_server_settle_devshard_escrow.go:161), later claimed viaClaimRewards→PayParticipantFromEscrow(..., workVestingPeriod)(msg_server_claim_rewards.go:90). Vests overWorkVestingPeriod. - Liquid — late settle: a previous-epoch settlement takes the
elsebranch →payCoinsDirectly(msg_server_settle_devshard_escrow.go:170) →SendCoinsFromModuleToAccount(msg_server_settle_devshard_escrow.go:266). No vesting period is passed. - Liquid — unsettled prune:
distributeUnsettledEscrowon prune (pruning.go:262→devshard_pruning.go:50) →SendCoinsFromModuleToAccount. No vesting.
WorkVestingPeriod is 180 epochs on the live network. No principal is lost; the effect is that devshard work income escapes the lockup on these two paths, and settlement timing is chosen by the escrow creator (a late settlement, one epoch after the work, hits the liquid path on every settle).
Suggested resolution
Either route payCoinsDirectly and distributeUnsettledEscrow through PayParticipantFromModule(..., ¶ms.TokenomicsParams.WorkVestingPeriod) so all devshard work income vests consistently, or update docs/tokenomics.md to state that late/unsettled devshard payouts are intentionally liquid.
🔄 Auto-synced from Issue #1909 every hour.