Skip to content

Feat/p3 tokenomics - #60

Open
robertocarlous wants to merge 10 commits into
InfiniteZeroFoundation:developfrom
robertocarlous:feat/p3-tokenomics
Open

Feat/p3 tokenomics#60
robertocarlous wants to merge 10 commits into
InfiniteZeroFoundation:developfrom
robertocarlous:feat/p3-tokenomics

Conversation

@robertocarlous

Copy link
Copy Markdown
Collaborator

P3 tokenomics: supply policy, stake governance & slash burn distribution (#42)

Summary

  • Adds mint cap and faucet retirement to DinCoordinator — unlimited minting is now a DevNet-only mode, not a permanent property of the protocol
  • Converts MIN_STAKE and UNBONDING_PERIOD from constants to DAO-settable storage vars, with per-model stake bounds and concurrent-registration cap slots reserved for follow-up enforcement
  • Introduces explicit jailValidator / reactivate lifecycle for slasher-initiated validator penalties
  • Implements the resolved 50 % burn / 50 % treasury split on every slashed amount, closing the gap where slashed tokens were previously stranded in the contract

Changes

DinCoordinator.sol

  • mintCap — 0 = uncapped (DevNet default); setMintCap() blocked after faucet retirement
  • totalMinted — running total for cap enforcement
  • faucetRetired — one-way flag; retireFaucet() permanently disables depositAndMint()
  • depositAndMint() now guards both conditions before minting

DinValidatorStake.sol

  • MIN_STAKE and UNBONDING_PERIOD promoted from constant to governable storage vars initialized in initialize(); setMinStake() / setUnbondingPeriod() added (onlyOwner, validated)
  • ModelStakeBounds struct + modelMinStakeBounds mapping + setModelStakeBounds() — stored, not yet enforced (follow-up task)
  • maxConcurrentRegistrationsPerStakeUnit + setter — same pattern
  • address public slashTreasury + setSlashTreasury() — points at DinTreasury
  • slash() now routes slashed tokens: 50 % burned via IBurnableToken.burn(), 50 % sent to slashTreasury (burns 100 % as a safe fallback if treasury not yet set)
  • jailValidator(address, uint64, bytes32)  onlySlasherContract, extends an existing jail but never shortens it
  • reactivate() — self-service exit from jail once the period has expired and stake is ≥ MIN_STAKE
  • __gap resized from [50]  [45] (5 new slots)

Deploy wiring (step 14)

  • DinValidatorStake.setSlashTreasury(dinTreasury) added to DeployPlatform.s.sol, DeployPlatform.t.sol, and SecurityFindings.t.sol

Tests

File | New tests -- | -- DinValidatorStake.t.sol | 25 DinCoordinator.t.sol | +9 (mintCap / faucet) DeployPlatform.t.sol | +1 wiring assertion (slashTreasury) Suite total | 148 passed · 0 failed

feat/p3-tokenomics deploys six proxies (DinTreasury, DinToken,
DinCoordinator, DinFeeRouter, DinValidatorStake, DINModelRegistry).
Resolves conflict with the four-proxy proxyAdmin fix landed in InfiniteZeroFoundation#52 by
recording all six individual ProxyAdmin addresses (proxyAdminTreasury,
proxyAdminToken, proxyAdminCoordinator, proxyAdminFeeRouter,
proxyAdminStake, proxyAdminRegistry) in the deploy script output.
@robertocarlous

Copy link
Copy Markdown
Collaborator Author

Hi @umeradl,

Pls can you check this. Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant