DEEPSTATEDOCS
Contracts

Contract Set

Responsibilities, ownership, mutability, and trust boundaries after DGP-003.

The live system combines the original non-upgradeable Router with new DGP-003 token, Governor, Factory, Rewarder V3, migration, and liquidity contracts. None uses a proxy.

Components

ContractResponsibilityPrivileged surfaceUpgradeable
DeepstateV1Multi-pool radix-tree order books, matching, custody, settlement, fees, and hooksGlobal fee config; one hook and side flags per poolNo
DeepstateTokenV22DEEP votes, capped minting, endowment streams, legacy redemptions, holder burnSupply cap and AccessControl rolesNo
DeepstateGovernorV22DEEP proposals, voting, execution, guardians, and self-settingsGovernance-only settings and arbitrary proposal executionNo
DeepstateRewarderFactoryV3Deploy, fund, install, replace, freeze, and permanently remove reward marketsOwner and operator rolesNo
DeepstateRewarderV3Account for top bid and ask rewards from a 100M 2DEEP balanceFactory may freeze accrual and burn unrewarded fundingNo
DGP003StateConversionStore the immutable pre-harvest STATE conversion and migration liabilityOne-time registration by legacy GovernorNo
DGP-003 execution contractsCoordinate token deployment, market transition, vault harvest, and v4 liquidityCallable only in the intended legacy-governance flowNo

Ownership graph

  • The 2DEEP Governor is the token's only default admin and owns Rewarder Factory V3.
  • The Governor and Factory are the only persistent 2DEEP minters.
  • The Factory owns the Router and active Rewarder V3 contracts.
  • The Treasury multisig is the Factory operator.
  • The Governor owns the three Uniswap v4 liquidity-position NFTs.

The Factory owner may change or remove the operator. The Factory may return Router ownership to its owner, but cannot permanently renounce its own ownership.

Router

The original Router remains permissionless for order placement, matching, cancellation, proceeds collection, pool identity, and views. Its owner may configure the global fee recipient/rate and each pool's hook.

Hooks are gas-capped and best-effort. Hook failure does not revert a core order-book operation. That protects exchange liveness but can degrade incentive accounting.

2DEEP token

2DEEP combines ERC-20, ERC20Votes, AccessControl, holder burn, supply-cap enforcement, migration redemptions, and Sablier endowment creation.

Ordinary role-authorized mints create an additional 30 / 70 endowment stream during the two-year term. Legacy DEEP and STATE redemption mint internally without an endowment. Every path is constrained by the same supply cap.

Governor

The Governor uses timestamp voting, simple vote counting, percentage quorum, percentage proposal threshold, late-quorum protection, and governance-managed cancellation guardians. There is no timelock.

Its settings are bounded: voting delay and voting period must remain from 1 to 30 days, and late-quorum extension from 1 to 7 days. The proposal threshold remains a percentage rather than an absolute token amount.

Factory and Rewarder V3

Each Factory deployment creates a new Rewarder V3, mints 100 million 2DEEP into it, installs it as the pool hook, and freezes any prior V3 hook. Both sides must be active so spread changes are fully checkpointed.

Rewarder V3 stores independent side clocks and caps, quantity schedules, top-order cursors, claimant records, accrued liabilities, paid totals, and the current spread multiplier. Only the Router can advance reward cursors. Claims always resolve to an engine-verified or previously cached order owner.

Permanent market removal unlinks the hook, freezes both sides, burns unearned funding, and preserves accrued claims. A permanently removed pool cannot be deployed again through that Factory.

Migration boundaries

The legacy Rewarder V1 was replaced and made economically inert through sentinel top orders, hook removal, and ownership renunciation. Because its bytecode has no retirement method, it remains deployed; the migration prevents new legitimate market transitions from extending its accrual.

Legacy DEEP's known minters were removed and its admin role was transferred to the token contract itself. Legacy STATE remains redeemable into 2DEEP at the registered rate.

On this page