Usual Tech Docs
Usual WebsiteGeneral DocsContract DeploymentsAuditsAccess dApp
  • 🚀GM GM
    • Usual Tech Hub
  • 🔭Overview
    • Usual Protocol Primer
    • Features
      • Mint & Redeem Engine
      • USD0
      • USD0++
      • USUAL
      • USUAL*
      • USUALx (USUAL staking)
      • USUAL distribution
      • USUAL Airdrop
      • Usual USD0++ Investment Vault
    • Architecture
      • Role Management
      • USUAL Distribution Model
  • ⛓️Smart Contracts
    • Protocol Contracts
      • DaoCollateral
      • Swapper Engine
      • USUAL staking
      • USUAL* Vested Allocation Staking
      • USUAL Distribution
        • Distribution Module
        • Yield Module
      • Airdrop Module
    • Token Contracts
      • USD0
      • USD0++
      • USUAL
      • USUAL*
      • USUALx
      • Usual USD0++ Investment Vault
        • VaultRouter
    • Utility Contracts
      • ClassicalOracle
      • Abstract Oracle
      • Chainlink Oracles
      • Pyth Oracles
      • RedStone Oracles
    • Real World Assets
      • USYC (by Hashnote)
      • M (by M0)
        • UsualM
      • USDtb
    • Contract Deployments
  • 🛡️Security & Audits
    • Security Practices
    • Testing Framework
    • Monitoring Framework
    • Audits
    • Bug Bounty
  • 🧩Integrations
    • Integrate USD0++
      • Reward redistribution by integration partner
      • Claim Address Redirect
      • Daily Distribution powered by Brevis (coming soon)
  • 📚Resources
    • Community & Support
    • References
  • 📖Support
    • FAQ
    • Glossary
  • ⚖️Legal
    • Terms of Services
    • Legal Notice
    • Privacy Policy
Powered by GitBook
On this page
  • Core Contracts
  • DaoCollateral
  • USD0
  • USD0++
  • SwapperEngine
  • ClassicalOracle
  • USUAL
  • USUAL*
  • Distribution Module Contract
  • Airdrop Module

Was this helpful?

  1. Overview

Architecture

PreviousUsual USD0++ Investment VaultNextRole Management

Last updated 5 months ago

Was this helpful?

The Usual protocol contracts are specifically engineered to handle complex operations such as asset swaps between Real World Assets (RWAs) and stablecoins, lifecycle management of the USD0 stablecoin, structured financial product issuance, efficient asset exchange without traditional liquidity pools, and accurate asset pricing for reliable transaction execution.

Usual's smart contracts follow the to allow the Usual DAO to upgrade the protocol contracts, to expand its functionalities and have the possibility to remedy any unexpected issues. Our current on-chain Collateral RWA consists of .

Core Contracts

The daoCollateral.sol contract is essential in swapping real-world assets (RWAs) . It enables users to swap RWAs for the USD0 stablecoin and vice versa, and serves as a key node for converting these assets into more liquid forms like USDC.

  • Key Functionalities:

    • Swap and Redeem Mechanisms: Facilitate the conversion between RWAs and Usual's stablecoin (USD0), as well as swapping into USDC for enhanced liquidity in conjunction with the SwapperEngine.

The primary Stablecoin of Usual, a liquid and transferable ERC-20 token that can be staked or locked to receive rewards. It is backed by cash equivalents like tokenized money market funds.

  • Key Functionalities:

    • Controlled Minting and Burning: Manages the stablecoin supply to match backing assets, essential for value stability.

The USD0PP contract is tailored for bond management, replicating traditional fixed end-date bonds. It allows for the issuance, management, and redemption of USD0++, a 4 year bond emitting off-chain yield (only during the pre-launch, on-chain afterwards)

  • Key Functionalities:

    • Bond Lifecycle Management: Facilitates the minting and unwrapping of bond tokens, offering fixed-income securities in blockchain format.

    • Emergency Withdrawal Mechanisms: Provides options for asset withdrawal in critical situations, reinforcing trust and security for investors.

    • Automated Parity Mechanisms: Provides options for the Usual DAO to maintain parity of USD0<->USD0++ on secondary markets if deemed necessary.

    • Floor-price redemption: Provides an early-redemption option to redeem USD0++ before the bond maturity date for the floor price.

The SwapperEngine contract ensures efficient token swaps between USDC and USD0 through an order matching system, avoiding traditional liquidity pools for direct no-fee, low-slippage exchanges.

  • Key Functionalities:

    • Efficient Order Matching: Allows for precise order placement and fulfillment, minimizing costs and slippage.

Essential for the ecosystem's functionality, the ClassicalOracle contract sources accurate pricing information to inform asset valuations , ensuring all financial operations are based on reliable market data.

  • Key Functionalities:

    • Robust Data Sources: Aggregates and evaluate prices from pricefeeds to diminish risks related to price manipulation.

    • Stablecoin Monitoring: Implements checks to maintain stablecoin pegs, crucial for the ecosystem's financial stability.

The USUAL contract implements the governance token of the Usual Protocol, incorporating security features and role-based access control. $USUAL is a ERC-20 compliant token designed with pausability and permit functionalities, allowing for enhanced governance mechanisms and secure token operations.

  • Key Functionalities:

    • Role-Based Token Operations: Implements strict access control for critical functions like minting, burning, and blacklist management through dedicated roles (USUAL_MINT, USUAL_BURN, BLACKLIST_ROLE).

  • Key Functionalities:

    • Role-Based Token Operations:

      • Strict access control for critical functions through dedicated roles (USUALS_BURN, BLACKLIST_ROLE)

      • Special one-time deployment privileges for the USUALSP contract via stakeAll()

The Distribution Module contract manages the daily distribution of Usual tokens across on-chain vaults (UsualX and UsualS) and off-chain user allocations. It implements a sophisticated distribution system with challenge mechanisms and merkle-proof validation to ensure fair and secure token allocation.

  • Key Functionalities:

    • Daily Token Distribution:

      • Calculates and distributes new token emissions

      • Manages off-chain distribution allocations through a merkle-proof system

      • Scales distribution based on time elapsed since last distribution

    • Security Mechanisms:

      • Challengeable queue system for off-chain distributions

      • 7-day challenge period for distribution validation

      • Role-based access control for critical operations

    • Distribution Features:

      • Configurable bucket allocation percentages

      • Real-time emission calculations based on protocol parameters

      • Automated distribution tracking and validation system

The Airdrop Module contract manages the distribution of USUAL tokens to eligible users, categorizing them into two groups based on their off-chain holdings ("pills"). The contract provides multiple claiming options tailored to each group's status, ensuring flexibility for participants.

  • Key Functionalities:

    • Airdrop Claim Options:

      • Standard Claim (Bottom 20%): Users can claim their full airdrop allocation immediately mid of December 2024.

      • Early Claim against Payment (Top 80%): Users can pay a predetermined amount to skip the vesting schedule and claim their full allocation.

      • Vested Claim (Top 80%): Users must follow a 6-month vesting schedule with monthly claims.

The Usual* contract implements the Early Contributor Token of the Usual Protocol, incorporating security features and role-based access control. $USUAL is a ERC-20 compliant token designed with pausability and permit functionalities, allowing for enhanced governance mechanisms and secure token operations. The totalSupply is capped and no further mints of USUAL* are possible. All Usual* is initially locked into the as part of the allocation/ vested mechanic.

DaoCollateral
USD0
SwapperEngine
ClassicalOracle
USUAL
USUAL*
UsualSP contract
Distribution Module Contract
Airdrop Module
USD0++
🔭
transparent proxy pattern
Hashnote's USYC
V1 Architecture
Page cover image