Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tokenized Real World Asset (RWA) Platform

A compliant, institution-grade platform for tokenizing real-world assets (like Real Estate, Treasury Bills, etc.) on the Ethereum blockchain. This project implements strict regulatory compliance features, including whitelisted transfers (KYC), forced transfers for asset recovery, and a snapshot-based dividend distribution system.

Key Features

1. Compliance by Design

  • Identity Registry: A centralized whitelist that manages KYC status for all users.
  • Gated Transfers: The CompliantToken checks the IdentityRegistry before every transfer. If a sender or receiver is not verified, the transaction reverts.
  • Separation of Concerns: Compliance logic is decoupled from the asset token, allowing a single KYC update to reflect across all assets.

2. Asset Recovery (Forced Transfers)

  • Legal Admin Role: Empowers a designated legal entity to seize tokens from a user and transfer them to another address.
  • KYC Bypass: Forced transfers bypass standard KYC checks, ensuring court orders or lost key recoveries can always be executed.

3. Dividend Distribution

  • Snapshotting: Tokens track historical balances using OpenZeppelin's Checkpoints system (replacing the deprecated ERC20Snapshot).
  • Stablecoin Yields: Admins can deposit stablecoins (e.g., USDC) linked to a specific snapshot ID.
  • Pro-rata Claims: Token holders claim their share of the dividend based on their exact holdings at the time of the snapshot.

4. Standardized Deployment

  • Asset Factory: A factory contract ensuring all deployed tokens utilize the verified, compliant bytecode and are automatically linked to the canonical Identity Registry.

Tech Stack

  • Solidity: v0.8.20
  • Framework: Hardhat
  • Libraries: OpenZeppelin Contracts v5.x
  • Testing: Chai & Ethers.js

Getting Started

Prerequisites

  • Node.js (v18+)
  • npm

Installation

npm install

Compile Contracts

npx hardhat compile

Run Tests

Run the comprehensive test suite including Compliance, Forced Transfer, and Dividend flows:

npx hardhat test

Deploy Locally

Deploy the entire suite (Registry, Factory, MockUSDC, Factory-deployed Token, Distributor) to a local Hardhat node:

npx hardhat run scripts/deploy.js

Contract Overview

Contract Path Description
IdentityRegistry contracts/core/IdentityRegistry.sol Manages isVerified mapping and COMPLIANCE_ADMIN_ROLE.
CompliantToken contracts/token/CompliantToken.sol The RWA ERC20. Overrides _update for KYC checks and implements Checkpoints for history.
AssetFactory contracts/core/AssetFactory.sol Deploys new CompliantToken instances.
DividendDistributor contracts/core/DividendDistributor.sol Handles USDC deposits and user claims based on historical snapshots.

License

This project is licensed under the MIT License.

About

A compliant, institution-grade platform for tokenizing real-world assets (like Real Estate, Treasury Bills, etc.) on the Ethereum blockchain.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages