Fee Purchases
The fixed-price permissionless path for exchanging vault fee assets for 10,000 USDG.
Deepstate no longer uses Euler Fee Flow or a Dutch auction. Fee conversion is implemented directly by DeepstateVault.buyFees.
Flow
- Protocol fees and miscellaneous assets arrive in the STATE vault.
- A buyer selects one or more asset addresses, minimum acceptable balances for each, and a receiver.
- The vault snapshots each selected balance and rejects protected or duplicate entries.
- The buyer pays exactly 10,000 USDG directly into the vault.
- The receiver gets the complete snapshotted balance of every selected asset.
- Unlisted assets remain in the vault, and the USDG payment becomes redeemable by STATE holders.
ERC-20 balances are not enumerable onchain, so the buyer must supply the asset list. Native ETH is represented by address(0).
Fixed price
Every successful call costs exactly 10_000e6 raw USDG units, regardless of the number or market value of assets in the submitted list. There is no oracle, auction curve, timer, epoch, owner-set price, or slippage calculation inside the vault.
The fixed price creates a clear execution rule and a substantial economic risk: a basket worth more than 10,000 USDG can be purchased below market, while a basket worth less may remain untouched.
Protected assets
buyFees rejects:
- DEEP, the burned deposit asset;
- STATE, the vault share token;
- USDG, the payment and value token; and
- duplicate entries.
NVDA is not specially protected by buyFees. It can be redeemed pro-rata through redeemAssets, but it can also be purchased if a buyer includes it in the fee list.
Buyer protection
Each selected asset has a caller-supplied minimumAmount. The transaction reverts if the vault balance falls below that minimum before execution, protecting the buyer from a prior purchase or STATE redemption changing the quoted basket.
The vault rejects fee-on-transfer USDG by checking that its balance increases by exactly 10,000 USDG. Asset transfers use the complete balances snapshotted before payment.
No privileged sweep
There is no separate auction controller, Ethereum Vault Connector, wrapped-native conversion, or owner-only sweep. Any account may call buyFees, and purchased assets move directly from the vault to the chosen receiver.