# Deploying Our PoC

## Follow the steps below to test our proof of concept that's deployed [here](http://sandbox.vera.financial/#/contracts)

1. Upload contract metadata and wasm (.contract files) for erc20, erc721 and AssetManager&#x20;
2. Instantiate erc20 and erc721 contracts first using Alice as owner. erc20 initial supply is set to 1 billion units and both contracts get 10 units endowment.&#x20;
3. Instantiate assetmanager contract using Alice as owner. Erc20 and Erc721 addresses will be set to the above deployed contracts; interest rate is set to 10 (% per year); transfer rate is set to 1 million (erc20 per erc721 token) and enabled is set to true.&#x20;
4. Alice, being owner of erc20 and erc721, grants approval to assetmanager calling `approve` and `setApprovalForAll` of erc20 and er721 respectively.&#x20;
5. Now Bob (or any else with balance) can mint an erc721 token, grant approval to assetmanager contract to spend this token, and `deposit` it in the assetmanager contract in exchange for 1 million erc20 tokens. These tokens are deducted from erc20 owner account (in this case Alice).&#x20;
6. There are some utility methods that can be called by anyone to check Bob's outstanding balance and interest payable etc.&#x20;
7. To repay, Bob needs to grant approval to assetmanager to spend his erc20 tokens. After that, he can call `withdraw` method providing the token\_id he is withdrawing. The assetmanager contract will deduct principal balance (1 million)+ interest from Bob's erc20 balance, deposit it in erc20 owner (Alice) and transfer erc721 token from Alice to Bob.


---

# 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://docs.vera.financial/developers/main/getting-started/deploying-our-poc.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.
