# Token Details

**VOW is a token on the Ethereum Network.**

Its contract address is : 0x1BBf25e71EC48B84d773809B4bA55B6F4bE946Fb

**You can view full data on Etherscan**

{% embed url="<https://etherscan.io/token/0x1BBf25e71EC48B84d773809B4bA55B6F4bE946Fb#balances>" %}
Etherscan Link
{% endembed %}

The project has upgraded all its contracts for all vCurrencies and governance in order to operate with the new Voucher Ledger. You can read more about how the various contracts operate below.

## Overview

* The **VSC Governor** contract replaces all existing VSC tokens and their Token Managers, streamlining VSC management within the VOW ecosystem.
* **Region IDs** have been introduced to make referencing the new VSC tokens easier.
* Multi-step procedures that previously required manual repetition across regions have been replaced with single actions that can be executed simultaneously across multiple regions.
* The Provable oracle system has been replaced with [Chainlink price feeds](https://data.chain.link/feeds?categories=Fiat) where available, providing connected regions with free, real-time exchange rate data.
* For regions without Chainlink integration, a new, optimized method for batch updating rates is provided.
* New VSC regions can now be deployed and incorporated via a single command, significantly reducing deployment costs and complexity.
* The VSC Governor contract is fully upgradeable, enhancing security and enabling future improvements and additional features.
* The underlying VSC token implementation is also fully upgradeable, with changes being applied simultaneously across all regions.

## VSC Governor Owner Functions

#### `addRegion`

Creates a new VSC region, deploying and integrating its token contract into the ecosystem.

#### `liquidateMerchant`

Callable only by the MVD for a region when a merchant is deemed to have defaulted. This function takes control of any VOW tokens locked against the merchant and uses them to acquire as many of the region's VSC tokens as possible via Uniswap, before subsequently burning them all.

#### `setMVD`

Sets the MVD for the specified region ID, locking whatever VOW deposit is required from them in the contract.

#### `removeMVD`

Removes the MVD for the specified region ID, returning their original VOW deposit, minus any forfeiture levied by the community (default is zero).

#### `transferOwnership`

Changing ownership of the VSC Governor is a two-phase process for added security:

1. The current owner initiates the process by calling `transferOwnership`.
2. The new owner completes the process by calling `acceptOwnership`.

#### `updateConfig`

Selectively updates the following contract values:

* The address allowed to set the internal rates
* The max permitted freshness of the internal rates
* The value that determines when the VOW to USD Rate should be refreshed
* The value determining the maximum permitted difference between the last observed rate and the rate calculated at the time of the transaction

#### `updateDeposit`

Updates the VOW deposit required to become an MVD for the specified region ID(s).

#### `updateFeed`

Updates the address of the fiat price feed for the specified region ID.

#### `updateOwner`

Updates the owner address for the specified region ID(s).

#### `updatePauseTransfers`

Pauses or unpauses token transfers and burns for the specified region ID(s).

#### `updateTransferBurn`

Updates the proportion of VSC burned on transfers between non-whitelisted accounts for the specified region ID(s).

#### `updateTransferBurnWhitelist`

Adds or removes an account from the transfer burn whitelist for the specified region ID(s).

#### `updateVSCMintOnLock`

Updates the multiplier determining the amount of VSC to be minted upon a merchant lock for the specified region ID(s).

#### `updateVOWToVSCWhitelist`

Adds or removes an account from the VOW to VSC conversion whitelist for the specified region ID(s).

***Note: For convenience, passing an empty array applies an update to all regions.***

## Read Methods

#### `previewLiquidateMerchant`

Previews the expected result of a merchant liquidation.

#### `regions`

Returns the following data for all VSC regions:

* Region ID
* Token name
* Token symbol
* Token contract address

#### `vscPerVOW`

Returns the current number of VSC tokens equivalent to one VOW for the specified region ID.

## Exchange Rates

VOW to VSC exchange rates are calculated whenever a VOW to VSC exchange (burn & mint), a merchant lock transaction, or a call to `vscPerVOW` occurs. The rates depend on VOW's current USDT value, along with the current fiat USD rate for the region. The VOW USDT price is retrieved directly from its Uniswap V2 pair. The source of the fiat rate depends on the region:

* **Regions with Chainlink integration** use their Chainlink price feed for the current rate.
* **Regions without Chainlink** use the latest rate stored in the VSC Governor, which must be periodically updated by the owner.

#### Updating Non-Chainlink Rates

A helper task is provided to retrieve live rates for all non-Chainlink regions and batch-update the VSC Governor with any new rates:

```
npx hardhat --network sepolia updateRates --governor <VSC governor address>
```

## VOW to VSC and Merchant Locking/Unlocking

The VSC Governor serves as the central point for users, MVDs, and merchants to send tokens to either exchange VOW for VSC or lock/unlock merchant accounts.

### Exchanging VOW for VSC

Any whitelisted account can exchange VOW for VSC by sending VOW tokens to the Governor. The Governor will burn the VOW tokens and mint an equivalent amount of VSC tokens. The exact amount depends on the region's USD fiat exchange rate and the Uniswap VOW/USDT price at the time of the transaction.

### Merchant Locking and Unlocking

#### Locking

MVDs can lock VOW against their merchants to generate new VSC for circulation on tier 2. To lock, the MVD sends VOW to the Governor, specifying the required VSC token and the merchant's address in the data payload. The VSC Governor will then:

* Mint a multiplied amount of the specified VSC at the current market rate.
* Trigger a lift of the minted VSC to the MVD's illiquid wallet on tier 2 via the connected [VOW bridge](https://etherscan.io/address/0xf2E6e9E5B35a951B003BB560E66377e685A4718C).
* Register the locked VOW against the merchant, along with the amount of VSC required to unlock it.

#### Unlocking

Any account can unlock a VOW position by sending the correct amount of VSC to the Governor, specifying the merchant in the data payload. The VSC will be burned, and the locked VOW will be released to the associated merchant.

### Testing

All tests are executed against the current state of the Ethereum mainnet, using the real-world Uniswap, Chainlink, VOW Bridge, VOW, and USDT token contracts.

During testing, live market data is collected from Mixin and CoinGecko's APIs to verify the VSC Governor's calculations against live fiat and crypto exchange rates.

Contract gas consumption is reported at the end.

***

## Ethereum Smart Contract Deployment : 24th September 2024

This section contains the latest deployment details of the Ethereum smart contracts as of 24th September 2024.

### Contracts

#### Base Implementation

* **VSC Base Implementation**: [`0x00dBcf3895CaC852B9FFEAfBB6851186Dc529e2d`](https://etherscan.io/address/0x00dBcf3895CaC852B9FFEAfBB6851186Dc529e2d#code)
* **Upgradeable Beacon**: [`0x12542308A7cEb119ff963De26324AcCb805Edb5D`](https://etherscan.io/address/0x12542308A7cEb119ff963De26324AcCb805Edb5D#code)

#### Governance Contract

* **VSC Governor**: [`0xFb580268f9bbda106Bc43fe9C12bDcd5394dca44`](https://etherscan.io/address/0xFb580268f9bbda106Bc43fe9C12bDcd5394dca44#code)
* **ERC1967 Proxy**: [`0x52D59D1c8871B6D9BE68933BE6767931b95dF8Fa`](https://etherscan.io/address/0x52D59D1c8871B6D9BE68933BE6767931b95dF8Fa#code)

### Regions and Currencies

The following regions have been set up with corresponding contracts:

| Region Name    | Currency Symbol | Contract Address                                                                                                             |
| -------------- | --------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| Vow Dollar USA | v$              | [`0xba7fe208e0167e4047a996e1efea830515f433f8`](https://etherscan.io/address/0xba7fe208e0167e4047a996e1efea830515f433f8#code) |
| Vow Pound      | v£              | [`0x72bf018df20fbacf542f5ec159c6a7f0d7850967`](https://etherscan.io/address/0x72bf018df20fbacf542f5ec159c6a7f0d7850967#code) |
| Vow Euro       | v€              | [`0x448fa53be5b9f792d6f799428df8d4c89eb9f04a`](https://etherscan.io/address/0x448fa53be5b9f792d6f799428df8d4c89eb9f04a#code) |
| Vow Dollar AUS | v$              | [`0x547649976443cd3b6ad8c9781f17f8ad6f061f2f`](https://etherscan.io/address/0x547649976443cd3b6ad8c9781f17f8ad6f061f2f#code) |
| Vow Rupee      | v₹              | [`0x047128bf54f643403864cb37a5df134e3ecf1bf4`](https://etherscan.io/address/0x047128bf54f643403864cb37a5df134e3ecf1bf4#code) |
| Vow Kroner     | vkr             | [`0x40a07abd0da20d9ec859c564727c10ce5cb7600e`](https://etherscan.io/address/0x40a07abd0da20d9ec859c564727c10ce5cb7600e#code) |
| Vow Rand       | vR              | [`0xc669b1920bb901292c11020d27d1bf7168e49eac`](https://etherscan.io/address/0xc669b1920bb901292c11020d27d1bf7168e49eac#code) |

The following contracts and tokens have been depreciated or will soon not be in use.

**The old contracts used in the project were / are:**

<table><thead><tr><th width="116">Token</th><th width="132">Function</th><th width="437">Contract Address</th></tr></thead><tbody><tr><td>vGBP</td><td>Token</td><td>0x6364d4f283601d4Beb170DcDF0080b84E056389A </td></tr><tr><td>vGBP</td><td>OrderBooks</td><td>0x5369e76EaDf5044fE2250F093B7C42AeE09c32E6 </td></tr><tr><td>vZAR</td><td>Token</td><td>0x0E7F502E5e4FBa9C65c59989B68D31E5F5093F50 </td></tr><tr><td>vZAR</td><td>OrderBooks</td><td>0x96b686f9e6CE837F8dfB541969F14AD553863684 </td></tr><tr><td>vDKK</td><td>Token</td><td>0xBB337937b31eF383d6782BFA9E88A131B7Fcf531 </td></tr><tr><td>vDKK</td><td>OrderBooks</td><td>0xF62FDf31811FAECAF828E86e534b70335a706D76 </td></tr><tr><td>vEUR</td><td>Token</td><td>0xbf686dA68323d0425f2B0D7e33d3fA11B1239132 </td></tr><tr><td>vEUR</td><td>OrderBooks</td><td>0x03Fd73Aa892C1a81fFF973EfE7fBf6Cc338D734C </td></tr><tr><td>vINR</td><td>Token</td><td>0x36eFD50912E8BBDCfdDB71344cA1C28B53347BC0 </td></tr><tr><td>vINR</td><td>OrderBooks</td><td>0x3348364081C58FE4B2f10420d7385BC171379d18 </td></tr><tr><td>vUSD</td><td>Token</td><td>0x0fc6C0465C9739d4a42dAca22eB3b2CB0Eb9937A </td></tr><tr><td>vUSD</td><td>OrderBooks</td><td>0x071d1bcA10aF031f2f32B610B05581fa60A1caf1 </td></tr><tr><td>vZWL</td><td>Token</td><td>0x663cBf0F8ac632ff6eEa2A249e2f6e147e65a04B </td></tr><tr><td>vZWL</td><td>OrderBooks</td><td>0xDC6E053851FbfA37ABAe89e262EA6Ac88BC89607 </td></tr></tbody></table>

## Binance Chain

<table><thead><tr><th width="149">Token</th><th width="101">Function</th><th>Contract</th></tr></thead><tbody><tr><td>VOW</td><td>Token</td><td><em>0xF585B5b4f22816BAf7629AEA55B701662630397b</em></td></tr><tr><td>vUSD</td><td>Token (Old)</td><td><em>0xc0D8DaA6516BaB4eFCe440860987E735BaB44160</em></td></tr><tr><td>Decentralized Bridge</td><td>ETH to BNB </td><td><em>0xa7C14010afA616fa23A2Bb0A94d76Dd57dde644d</em></td></tr></tbody></table>

**Core Uniswap Pool Addresses**

{% embed url="<https://v2.info.uniswap.org/pair/0x97be09f2523b39b835da9ea3857cfa1d3c660cbb>" %}
VOW - V$ Pool
{% endembed %}

{% embed url="<https://v2.info.uniswap.org/pair/0x7fdeb46b3a0916630f36e886d675602b1007fcbb>" %}
VOW - ETH Pool
{% endembed %}

{% embed url="<https://v2.info.uniswap.org/pair/0x1e49768714e438e789047f48fd386686a5707db2>" %}
VOW - USDT Pool
{% endembed %}

#### Pancake Swap Addresses

{% embed url="<https://pancakeswap.finance/swap?inputCurrency=0xF585B5b4f22816BAf7629AEA55B701662630397b&outputCurrency=0xc0D8DaA6516BaB4eFCe440860987E735BaB44160>" %}
VOW / vUSD Swap
{% endembed %}
