# NFTVaultRegistry

[NFTVaultRegistry](https://github.com/zkBob/bob-cdp-contracts/blob/main/src/VaultRegistry.sol) smart contract provides a common NFT ERC721 inteface for accessing opened BOB CDP Vaults. Each opened vault is assigned with unique vault id with corresponding NFT being issued to the vault owner.

Single deployed NFTVaultRegistry can accomodate multiple NFTVault contract underneath it.

## Key concepts

### Vault ownership

Despite what happened or happens inside the created vault, the effective owner of the vault is always the corresponsing NFT owner.

Vault owner holds the rights to vault collateral, as well as a debt liability associated with a given vault.

### Vault transferability

ERC721 defines few transfer functions used for changing NFT ownership. Transferring Vault NFT to a different address will effectively change the Vault owner accordingly.

After Vault NFT transfer, only a new owner will have rights to withdraw collateral or generate more debt.

### Vault allowance

ERC721 defines few approval functions. Such approvals allow to control NFTs from multiple addresses at the same time, without altering the NFT ownership.

In BOB CDP, approved addresses have the same rights as the NFT owner, meaning that they are able to withdraw collateral and mint new debt in the same way as the NFT owner. They are also able to transfer vault ownership to a different address, using the vault transferability concept described above.

The only difference in rights between vault owner and approved addresses is the fact only the current NFT owner is able to contol the list approved addresses for his NFTs.

## Methods

TBD


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://bob-docs.zkbob.com/bob-cdp/technical-docs/smart-contracts/nftvaultregistry.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
