How Coloring Works

A complete guide to coloring in USDV.

What is Coloring?

Coloring in USDV is a way of tagging or marking a token's metadata to identify which Verified Minter the token originates from. Think of it as a label or a signature. USDV utilizes the ColorTrace algorithm in order to accomplish this.

Each Verified Minter is assigned a unique Color ID. This Color ID is stored in the token contract as a positive integer value.

Key Concepts

  1. Verified Minter: Only certain trusted entities, known as Verified Minters, can have and assign colors. These minters each have a unique color, referred to as their Default Color.

  2. Contract Addresses and Colors: Each contract address (e.g., pools, pairs, wallets, vaults, etc.) can only hold USDV tokens of one color at a time.

  3. Coloring: Verified Minters can set the color of a contract or wallet address. Users may also change the color of tokens in a wallet with no direct impact on the amount of USDV in circulation, as it only changes the marking stored in the token's metadata.

How USDV Recoloring Works

USDV changes colors based on one of two policies: Default Color or Weight-based.

  1. By Default Color: If a receiver account (like a pool or a wallet) has a Default Color set, any USDV tokens sent to that account will automatically be recolored to match that account's Default Color.

  • Example: A pool with a Default Color of USDV_BLUE has $100 USDV_BLUE. It receives $120 USDV_RED. The incoming $120 USDV_RED is recolored to USDV_BLUE, making the pool’s final balance $220 USDV_BLUE.

  1. By Weight: If the receiver account doesn’t have a Default Color, the color of the majority balance (heavier weight) determines the color. The smaller balance is recolored to match the larger one.

  • Example: A pool has $100 USDV_BLUE and receives $120 USDV_RED.

    Since $120 USDV_RED is greater than $100 USDV_BLUE, the pool's $100 USDV_BLUE is recolored to USDV_RED, resulting in a final balance of $220 USDV_RED.

Other Coloring Properties

  • Fungible: all USDV tokens are fully fungible, regardless of color. This allows users and DApps to transact using any USDV tokens interchangeably regardless of the color.

  • Long-lived: Tokens withdrawn from Liquidity Pools maintain their designated color until they undergo a recoloring. This characteristic allows protocols with high transaction volumes, such as decentralized exchanges (DEX), to better capture attribution. Here, users often deposit and withdraw tokens rapidly through liquidity provisions or swaps. The significance is that the colored USDV will persist in users' wallets until a recoloring action takes place, enabling minters to gain more attribution than the Total Value Locked (TVL) in their respective pools.

For full details please review the ColorTrace whitepaper.

Last updated


Copyright by Verified USD Foundation