> For the complete documentation index, see [llms.txt](https://docs.common.fi/knowledge-base/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.common.fi/knowledge-base/protocol-details/version-0.2.0.md).

# Version 0.2.0

#### Deployment Information <a href="#pdf-page-k7pbb1lb3ao4edpccnob-deployment-information" id="pdf-page-k7pbb1lb3ao4edpccnob-deployment-information"></a>

Deployment scheduled after audit is complete.

#### Basic Information <a href="#pdf-page-k7pbb1lb3ao4edpccnob-basic-information" id="pdf-page-k7pbb1lb3ao4edpccnob-basic-information"></a>

This is the second release. It is deployed via a new set of contracts to avoid any backward compatibility issues. With respect to Version 0.1.0 the main changes are the following:

1. The Anonymity Revoking is implemented as in [Anonymity Revokers](/knowledge-base/protocol-details/anonymity-revokers.md) and this replaces the [PoW Anonymity Revoking](/knowledge-base/protocol-details/pow-anonymity-revoking.md) that was used as a temporary solution.
2. Aside from the native token, it is possible to shield arbitrary ERC20 tokens.
3. Support for deploying on other EVM chains.

#### Details in Circuits <a href="#pdf-page-k7pbb1lb3ao4edpccnob-details-in-circuits" id="pdf-page-k7pbb1lb3ao4edpccnob-details-in-circuits"></a>

**ERC20**

Previously we had:

```rust
struct Account {
    balance_NATIVE: Scalar, 
}

fn hash(a: Account) -> Hash {
    poseidon2(a.balance_Native, 0, 0, 0, 0, 0, 0)
}
```

Now to support ERC20 we change the account structure to:

```rust
struct Account {
    balance: Scalar,
    token_id: Scalar, // address (160 bits) encoded into a field element (~254 bits) 
}

fn hash(a: Account) -> Hash {
    poseidon2(a.balance, a.token_id, 0, 0, 0, 0, 0)
}
```

Valid transitions between `old: Account`and `new: Account` apart from the usual constraints must also include `old.token_id == new.token_id`. We use the convention that `token_id = 0`represents the native token.

All notes still live in a single Merkle tree, only the accounts are now more general.

**Anonymity Revoking**

Details are provided in [Anonymity Revoking](/knowledge-base/protocol-details/anonymity-revokers.md). The new account transaction emits an encrypted `key(id)` (see [SNARK-friendly Asymmetric Encryption](/knowledge-base/protocol-details/snark-friendly-asymmetric-encryption.md) for how this is done) for the AR, and subsequently each transaction emits a MAC based on this key. We note that because the old contract is not migrated, and instead a new is deployed, this allows us to skip the step when old accounts emit their encrypted `key(id)`(because they didn't do it in Version 0.1.0).
