Skip to main content

Vault Formation

Create Vault

Creates a new vault with specified configuration.

HTTP Request
POST /api/v1/vaults
Sample Request
{
  "vaultType": "PRIVATE",
  "assetTypes": ["SINGLE_NFT"],
  "settings": {
    "assetWhitelist": ["addr1...", "addr2..."],
    "contributorWhitelist": ["addr3...", "addr4..."],
    "assetWindow": {
      "startTime": "2024-12-01T00:00:00Z",
      "duration": "02:00:00"
    },
    "investorWhitelist": ["addr5...", "addr6..."],
    "valuationType": "FIXED",
    "fractionalization": {
      "percentage": "75.00",
      "tokenSupply": "1000000",
      "tokenDecimals": "6",
      "tokenImage": "ipfs://Qm..."
    },
    "investment": {
      "window": "48:00:00",
      "reserve": "20.00",
      "liquidityPool": "5.00"
    },
    "termination": {
      "type": "DAO",
      "fdp": "10.00"
    }
  }
}
Sample Response
{
  "status": "success",
  "data": {
    "vaultId": "v_abc123",
    "contractAddress": "addr_vault123...",
    "status": "CREATED",
    "timestamps": {
      "created": "2024-11-20T10:00:00Z",
      "assetWindowStart": "2024-12-01T00:00:00Z",
      "assetWindowEnd": "2024-12-01T02:00:00Z"
    },
    "transactionHash": "tx_hash123..."
  }
}

Add Assets to Vault

Add assets during the asset window period.

HTTP Request
POST /api/v1/vaults/{vaultId}/assets
Sample Request
{
  "assets": [{
    "contractAddress": "addr_nft123...",
    "tokenId": "42",
    "quantity": "1"
  }]
}
Sample Response
{
  "status": "success",
  "data": {
    "addedAssets": [{
      "assetId": "asset_123",
      "status": "LOCKED",
      "transactionHash": "tx_hash456..."
    }],
    "vaultValuation": {
      "totalValue": "100000",
      "floorPrice": "90000",
      "dexPrice": "10000",
      "timestamp": "2024-12-01T01:00:00Z"
    }
  }
}

Remove Asset

Remove assets during the asset window period. Will fail if attempted before or after the window period.

HTTP Request
DELETE /api/v1/vaults/{vaultId}/assets/{assetId}
Sample Response
{
  "status": "success",
  "data": {
    "assetId": "asset_123",
    "removalStatus": "COMPLETED",
    "transactionHash": "tx_hash789...",
    "updatedValuation": {
      "total": "140000",
      "timestamp": "2024-12-01T01:35:00Z"
    }
  }
}

Get Vault Valuation

Calculate current vault valuation based on assets.

HTTP Request
GET /api/v1/vaults/{vaultId}/valuation
Sample Response
{
  "status": "success",
  "data": {
    "valuation": {
      "total": "150000",
      "breakdown": {
        "nftValue": "120000",
        "cntValue": "30000"
      },
      "assetCounts": {
        "nfts": 2,
        "cnts": 1
      },
      "timestamp": "2024-12-01T01:30:00Z"
    }
  }
}

List Vault Assets

List all assets in the vault.

HTTP Request
GET /api/v1/vaults/{vaultId}/assets
Sample Response
{
  "status": "success",
  "data": {
    "assets": [{
      "assetId": "asset_123",
      "type": "NFT",
      "contractAddress": "addr_nft123...",
      "tokenId": "42",
      "addedAt": "2024-12-01T01:00:00Z",
      "status": "LOCKED",
      "currentValue": "90000"
    }],
    "pagination": {
      "page": 1,
      "limit": 20,
      "total": 45
    }
  }
}

Update Vault AllowList

Updates the list of wallets allowed to participate in the vault, and their type.

HTTP Request
PATCH /api/v1/vaults/{vaultId}/allowlist
Sample Request
{
  "type": "ASSET|CONTRIBUTOR|INVESTOR",
  "operation": "ADD|REMOVE",
  "addresses": ["addr1...", "addr2..."]
}
Sample Response
{
  "status": "success",
  "data": {
    "updatedAllowList": {
      "type": "ASSET",
      "count": 24,
      "lastUpdated": "2024-12-01T02:00:00Z"
    }
  }
}

Vaut Performance Metrics

Returns some vault performance metrics.

HTTP Request
GET /api/v1/vaults/{vaultId}/metrics
Sample Response
{
  "status": "success",
  "data": {
    "valuation": {
      "initial": "100000",
      "current": "150000",
      "change": "50.00"
    },
    "participation": {
      "uniqueVoters": 45,
      "averageQuorum": "68.00",
      "proposalCount": 12
    },
    "timeline": {
      "created": "2024-11-20T10:00:00Z",
      "locked": "2024-12-01T02:00:00Z",
      "age": "11d 16h"
    }
  }
}

Vault Activity

Returns a vault activity log.

HTTP Request
GET /api/v1/vaults/{vaultId}/activity
Sample Response
{
  "status": "success",
  "data": {
    "activities": [{
      "type": "ASSET_ADDED|PROPOSAL_CREATED|VOTE_CAST",
      "timestamp": "2024-12-01T01:00:00Z",
      "actor": "addr_user123...",
      "details": {},
      "transactionHash": "tx_hash123..."
    }],
    "pagination": {
      "page": 1,
      "limit": 20,
      "total": 156
    }
  }
}