Treasury Vault Management
The `TreasuryVault.sol` contract acts as the secure financial repository of the SovereignMind guild. It secures funds, manages asset distributions, and executes AI-driven rebalancings.
1. Purpose of the Treasury Vault
The Treasury Vault houses the assets managed by the guild. Unlike the investment pool where users hold redeemable shares, the Treasury holds operational capital, asset balances allocated across stablecoins or tokens, and gas tokens used to fund on-chain oracle requests (Somnia agent queries cost STT to pay for computing).
2. Funding the Treasury
To maintain operational health (faucet cycles, fee coverage, gas fees), the treasury must remain funded with STT.
How to Fund the Treasury
- Navigate to the Treasury page in the main terminal menu.
- Click the Fund Treasury button in the page header.
- Enter the STT amount you want to deposit to back the operating gas.
- Confirm the transaction. The tokens are locked into the vault contract and the transaction record is logged.
3. Automated Rebalancing Mechanics
During a rebalance event:
- The CFO agent reads risk signals and compiles asset ratios.
- The CMO agent checks sentiment indicators.
- The CEO agent processes these inputs and recommends an asset allocation schema (e.g. 40% STT, 30% USDC, 30% ETH).
- The CEO agent triggers the `rebalance()` contract function. The vault contract interacts with decentralized pools or simulated wrappers to execute swaps on-chain.
address[] memory tokens,
uint256[] memory weights
) external onlyCEO{
_performAssetSwaps(tokens, weights);
}
4. Transaction History and Holdings
On the Treasury page, the Holdings Chart visually breaks down current assets by percentage, and the Transaction List catalogs all historical deposits (funding events), withdrawals, and automated rebalances. Each log includes timestamps, action types, and block explorer hashes for transparency.