Skip to content
Fossa

Model groups

Council assignments, model tokens, backing, and redemption.

Models and shared backing

A ModelGroup connects related inference models to one model token and one backing vault. The council creates the group and assigns models explicitly. An inference model’s creator does not gain this authority by registering its metadata.

When route_to_reserve == 1, new bookings for assigned models route their protocol fee share to that group’s backing vault. Otherwise they route it to the router treasury. Existing bookings retain their original destination.

Backing is payment tokens held separately from DEX liquidity. A token name does not establish an affiliation with the model creator.

Several models share one DeepSeek token.
  • DeepSeek V4 Flash 0731
  • DeepSeek V4 Pro 0813
  • DeepSeek V4.1 Flash 1017

DeepSeekDSK

Initialize a group

initialize_model_group takes a group ID and GroupInit { tax_bps, maximum_tax, metadata }. The council authorizes creation. The payer funds the accounts. The group and its Token-2022 mint use canonical PDAs.

Prepare token accounts, extension space, configured DEX accounts, and the fresh LP-account signer as required by the SDK builder.

Creation mints 100 million tokens with six decimals: 10 million directly to the router treasury and 90 million directly to the curve vault. Transfer tax does not reduce these allocations. Mint authority is then revoked. The treasury allocation supports possible provider subsidies, integration grants, and liquidity at other venues; spending remains a council decision.

The DEX creates a USDC model curve with a 50,000.00 USDC net target and charges 0.025 SOL for pool creation. Backing starts in a separate vault with its route enabled. See model markets.

Assign and configure

assign_model_group requires the council. Pass a group in the same market to assign it, or None to clear the assignment. Several models may share one group.

update_group_metadata changes token name, symbol, and URI. Names accept 1–32 bytes; symbols accept 1–10 bytes; URIs accept 1–256 bytes. configure_reserve changes the backing route and transfer-tax schedule. Model-market tokens use a 1% transfer tax with no effective per-transfer cap: tax_bps = 100 and maximum_tax = u64::MAX. The program permits rates from 0 through 10,000 basis points and a maximum tax amount in token atoms. Token-2022 determines when a scheduled tax becomes active.

The council can disable future backing inflows. It cannot redirect an existing booking through these changes. Enabling the route requires positive remaining token supply. Token metadata and tax authority remain controlled through the group PDA.

Redeem backing

redeem_reserve(Redeem { amount, minimum_output }) burns the holder’s model tokens and transfers proportional backing to that holder’s payment-token account. The holder signs. Both the burn amount and calculated output must be positive. The output must meet minimum_output.

The calculation uses current mint supply and the backing vault’s token balance. It excludes DEX liquidity and virtual pricing reserves. Treasury-held tokens have the same proportional redemption rights as other holdings.

Redemption costs 0.025 SOL to the current router treasury. Council self-redemption skips that self-transfer. Network fees remain separate. Selling on the DEX is a different action and uses market pricing.

output = floor(backing_balance × burned_tokens / current_token_supply)

Collect tax and remaining backing

collect_reserve_tax withdraws model-token tax already harvested to the mint. Its destination must hold that mint and belong to Market.bank. The group PDA signs internally. The instruction does not harvest tax from arbitrary token accounts and accepts no remaining accounts.

These taxes remain model tokens. They do not automatically become USDC backing.

sweep_reserve transfers remaining backing to the current router treasury only when model-token supply is zero. It does not permit a withdrawal while tokens remain outstanding. Both collection instructions can be submitted without a council signature because the program fixes their destinations.