# AVAX - Avalanche

### X-P-C chains

Avalanche has 3 chain design to support specific services to improve overall performance.

1. Exchange (X) Chain - creating and trading AVAX assets, run on Avalanche Virtual Machine (AVM)
2. Platform (P) Chain - staking and validation of subnets
3. Contract (C) Chain - smart contract interaction, support Ethereum Virtual Machine (EVM)

### Avalanche Consensus <a href="#eb3b" id="eb3b"></a>

#### **Subsampled voting**

* a validator determine accepting or rejecting a transaction by asking a small random subset of validators
* **accept case**
  * if queried validator replies that it thinks the transaction should be accepted
  * until a sufficiently large portion (alpha α) of the validators sampled reply that they think the transaction should be accepted, the validator prefers to accept the transaction
  * the validator repeats this sampling process until alpha of the validators queried reply the same way (accept or reject) for beta β consecutive rounds.
  * if the transaction has no conflict, finalization can be very quick
* **reject case**
  * if the queried validator thinks the transaction is invalid the transaction is rejected
  * when conflicts transactions exist, honest validators cluster around to enter a positive feedback loop until all correct validators prefer to accept that transaction

#### Snowman++ Consensus Protocol <a href="#snowman-consensus-protocol" id="snowman-consensus-protocol"></a>

* P-Chain & C-Chain implement the Snowman consensus protocol
* X-Chain is also migrated to improve performance, security and scalability
* enable batched delegator rewards on P-Chain, reduce gas fees & increase efficiency
* increased gas limit on C-Chain, allow more complex smart contracts & transactions

### **Subnet**

Subnet is a sub-chain under the mainnet, inherits mainnet’s consensus protocol but support subnet customizations based on needs.

It solves the most critical balance in blockchain - decentralization, performance, scalability.

1. Gas fee optimization
   * **stable and minimized gas fee** - more subnet, less chance to strive for block with high gas
   * **gas flexibility** - be able to assign an alternative token as gas fee
2. Validator flexibility
   * **effectiveness of validation** - validators can overlapping validate subnets & mainnet
   * **permissioned & permissionless** - subnet can be configured as private or public chain
   * **customizable validator specification** - flexible # of validators & hardware requirements
3. Performance improvement
   * **prevent chain congestion** - a dedicate chain for specific product/service
   * **independent downtime** - subnet availability won’t be affected by other subnet
   * **Interoperability** - assets & tokens can be transferred to-and-from via bridge

### Core Wallet&#x20;

* officially released by Ava Labs who built Avalanche blockchain
* support for Bitcoin, Ethereum, and EVM-compatible blockchains
* integrated with Avalanche Bridge to transfer native Bitcoin and Ethereum assets to use on Avalanche&#x20;

#### Native BTC bridging

* bridged Bitcoin is represented by an ERC20 token BTC.b on the Avalanche C-chain
* each BTC.b is fully backed by a 1:1 native BTC locked by the bridge enclave application, non-custodial
* bridging flow
  * sends BTC on Bitcoin network to Avalanche Bridge
  * Warden nodes (composition of AvalancheGO Node, Bitcoin Core, GETH Node) listen to the TX
  * once the TX is accepted into a block on Bitcoin, 6 out of 8 Warden nodes reported to the Intel SGX application for processing
  * Intel SGX application (a set of security instructions that enable the construction of private, tamper-proof secure enclaves) mints wrapped assets BTC.b to users' Avalanche address

### Enterprise partnerships

* Amazon Web Services(AWS) - support Avalanche’s infrastructure & node deployments
* Tencent - support Avalanche's node deployments in Asia
* Mastercard - crypto-based innovations to traditional financial services
* Deloitte - governments’ recovery from natural disasters and public health emergencies
* TSM - empower North American esports gaming platform Blitz's payment system
* Loco - eSports streaming platform in India with 50+ million users
* Togg - mobility services for electric cars
* Lemonade Inc - weather insurance for farmers
