Skip to main content

Treasury Program

Treasury Income Preparation​

The Claimable Fee Pool beneficiary (receiver) is set as the Treasury (specifically the Config account). The Treasury Program provides a claim_fees instruction allowing TREASURY_KEEPER to transfer funds from each market's claimable fee pool into Receiver Vaults (Config account ATAs).

Treasury Revenue Process​

The Treasury Program requires TREASURY_KEEPER to transfer funds from receiver vaults to Treasury Vaults (TreasuryConfig ATAs) before usage. This process, executed via deposit_into_treasury_vault instruction, only allows tokens defined in TreasuryConfig. Non-supported tokens must first be swapped to supported ones before transfer.

GT Bank Management​

Treasury creates daily GT Banks corresponding to GT Exchange Vaults. GT Banks manage Buyback funds and support only TreasuryConfig-approved tokens. The daily Buyback fund limit is determined by the GT Bank's total funds for that day.

Buyback Confirmation​

At UTC 0:00, TREASURY_KEEPER can confirm previous day's Buyback using confirm_gt_buyback. This marks GT Exchange Vault as confirmed, adjusts available Buyback balances, records final GT Buyback total, and transferred to GT vault with a portion. Before GT is tokenized, these GT will remain locked in the GT Vault. They will not be distributed to any address or used for secondary buybacks.

Buyback Completion​

After confirmation, users can claim Buyback funds using complete_gt_exchange. This closes the GT Exchange account (returning rent), transfers corresponding funds to user accounts, and updates GT Bank's remaining token and GT balances. Buyback completes when all GT in a GT Bank is exchanged.