---
title: "VaultInvestV3 (signed message)"
description: "EIP-712 type VaultInvestV3: fields, type hash and how each field is built from the request JSON."
---

Signed by [`vault_invest`](../rpc/vault_invest.md). Step-by-step walkthrough: [Signing](../../guides/signing.md).

```text
VaultInvestV3(uint64 vaultID,address accountID,uint64 fromSubAccountID,uint8 fromWalletType,uint16 fromCurrency,uint64 fromNumTokens,uint16 toCurrency,uint64 exchangeRate,uint32 nonce,int64 expiration)
```

Type hash `0x9310afe005ecc1260bf9be1863d1fde16bed5d7be16ed68926ddf67cd10a736e`. Domain `{name: "GRVT Exchange", version: "0", chainId}`.

## Fields and where they come from

| EIP-712 field | Type | From request | Transform |
|---|---|---|---|
| `vaultID` | `uint64` | `vault_id` | `copy` |
| `accountID` | `address` | none: `result.main_account_id` of [`funding_account_summary`](../rpc/funding_account_summary.md) | `mainAccount`: your main account address, fetched once per session |
| `fromSubAccountID` | `uint64` | `from_sub_account_id` | `copy`; absent = `0` |
| `fromWalletType` | `uint8` | `from_wallet_type` | `enumCode`: integer value of `WalletType` |
| `fromCurrency` | `uint16` | `from_currency` | `currencyId`: `id` of the currency (get_currency) |
| `fromNumTokens` | `uint64` | `from_num_tokens` | `scaled`: decimal × 10^`balance_decimals` of the currency |
| `toCurrency` | `uint16` | `to_currency` | `currencyId`: `id` of the currency (get_currency) |
| `exchangeRate` | `uint64` | `exchange_rate` | `scaled`: decimal × 10^9 |
| `nonce` | `uint32` | `signature.nonce` | `sig.nonce` |
| `expiration` | `int64` | `signature.expiration` | `sig.expiration` |
| domain `chainId` | `uint256` | `signature.chain_id` | `sig.chainId` |

## Signing test cases

In [signing.json](../../downloads/signing.json), signed by the public test key:

- `vault_invest` — Invest 1000.5 USDT from the funding account into a vault whose investment currency is USDC, at 0.9998 USDC per USDT. accountID is the session's main account (metadata main_account_id); from_num_tokens uses USDT's decimals and exchange_rate 9. Digest `0x5e28c5a2d5e01a4b43ef7200c727c0d9864bb5f252ebf484386d5b486f43ba44`.
