Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion INTERFACE.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,14 @@ Compliance/reporting types: `ComplianceEventData`, `ReportingSnapshotData`,
| `set_multisig_admin(signers: Vec<Address>, threshold: u32)` | owner | none | Configures 1..10 unique signers. |
| `get_multisig_admin()` | none | `(Vec<Address>, u32)` | Returns signers and threshold. InvestmentVault has no `clear_multisig_admin()`. |
| `get_expected_returns()` | none | `i128` | O(n) over registry projects. |
| `total_assets()` | none | `i128` | Liquid USDC + investments + expected returns. |
| `total_assets()` | none | `i128` | Liquid USDC + investments + expected returns. Also refreshes the cached NAV (writes storage); the #617 views read NAV without writing. |
| `convert_to_shares(usdc_amount: i128)` | none | `i128` | ERC-4626-style conversion. |
| `convert_to_assets(shares_amount: i128)` | none | `i128` | ERC-4626-style conversion. |
| `share_price()` | none | `i128` | USDC per whole share, scaled by 10^7; 10^7 (1:1) when no shares exist. Read-only (#617). |
| `preview_deposit(usdc_amount: i128)` | none | `i128` | Exact shares `deposit` would mint now, after the 50 bps insurance premium and management / volume-tier fee. Panics with the same errors as `deposit`. Read-only (#617). |
| `preview_withdraw(shares_amount: i128)` | none | `(i128, i128)` | `(usdc_now, usdc_queued)` that `withdraw` would produce now; panics with `WithdrawalExceedsLimit` under the graduated utilization limit. Ignores the per-account deposit lock (see `max_withdraw`). Read-only (#617). |
| `max_withdraw(account: Address)` | none | `i128` | Max USDC `account` can withdraw now: balance value capped by the utilization tier limit and max-transaction cap; 0 while paused, deposit-locked, or below the minimum. Read-only (#617). |
| `max_deposit(account: Address)` | none | `i128` | Max USDC depositable now: `MAX_DEPOSIT` capped by the max-transaction cap and remaining HBS supply headroom; 0 while paused. Funding rounds don't affect deposits. Read-only (#617). |
| `get_utilization_bps()` | none | `u32` | Investments over liquid plus investments. |
| `claimable_yield(account: Address)` | none | `i128` | View-only accrued yield. |
| `get_portfolio(account: Address)` | none | `PortfolioInfo` | Investor analytics snapshot. |
Expand Down
15 changes: 15 additions & 0 deletions gas-budgets.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,21 @@
"instructions": 2000000,
"fee": 4000000
},
"investment_vault.share_price": {
"note": "Read-only ERC-4626-style view (#617): same NAV reads as deposit, no storage writes.",
"instructions": 1500000,
"fee": 3000000
},
"investment_vault.preview_deposit": {
"note": "Read-only ERC-4626-style view (#617): same NAV reads as deposit, no storage writes.",
"instructions": 1500000,
"fee": 3000000
},
"investment_vault.max_withdraw": {
"note": "Read-only ERC-4626-style view (#617): same NAV reads as deposit, no storage writes.",
"instructions": 1500000,
"fee": 3000000
},
"storage_key_sizes": {
"note": "Key bytes are XDR Symbol overhead + variant name length (#82). Shorter names reduce per-entry rent.",
"project_registry.Project(u32)": { "key_bytes": 12, "value_bytes_typical": 132, "value_bytes_max": 580 },
Expand Down
Loading
Loading