All programsStaging
MarginFi Integration Staging
Integration adapter for MarginFi. Lets a GLAM vault initialize MarginFi accounts, deposit or withdraw collateral, borrow or repay liquidity, close accounts, and use Kamino-backed collateral under GLAM authorization. This staging deployment exposes additional or pre-release functionality for review.
Accounts owned or controlled
| Account | Owner / authority | Purpose |
|---|---|---|
| Integration authority PDA | MarginFi Integration Staging | Program-derived authority used for integration-level signing during MarginFi CPI calls. |
| MarginFi accounts | MarginFi | Vault-controlled lending accounts that can be initialized, funded, borrowed against, repaid, closed, and priced through GLAM. |
Protocols
MarginFi Integration Staging groups its instructions into the following protocols. Each protocol corresponds to a delegate-permission set on the GLAM state's integration ACL.
| Protocol | Description | Instructions |
|---|---|---|
| MarginFi | Initialize and close vault-owned MarginFi accounts, and deposit, withdraw, borrow, or repay liquidity. | 7 |
| Kamino collateral | Move Kamino-backed collateral into and out of a MarginFi account under GLAM policy checks. | 2 |
Instructions
9 total
| Instruction | Description |
|---|---|
| kamino_deposit | Deposits Kamino-backed collateral into a MarginFi account. |
| kamino_withdraw | Withdraws Kamino-backed collateral from a MarginFi account. |
| lending_account_borrow | Borrows liquidity from MarginFi into the GLAM vault. |
| lending_account_deposit | Deposits liquidity from the GLAM vault into a MarginFi account. |
| lending_account_repay | Repays borrowed liquidity from the GLAM vault to a MarginFi account. |
| lending_account_withdraw | Withdraws liquidity from a MarginFi account to the GLAM vault. |
| marginfi_account_close | Closes an empty MarginFi account PDA owned by the GLAM vault. |
| marginfi_account_initialize_pda | Initializes a MarginFi account PDA owned by the GLAM vault. |
| set_marginfi_policy | Sets the MarginFi policy for group, bank, and borrow-token allowlists. |