openzeppelin-contracts
OpenZeppelin Contracts is a library for secure smart contract development.
- 27k
- Solidity
- MIT
- 2 d ago

Developer handbook & reference implementation for Real-World Asset (RWA) tokenization: token standards (ERC-3643, ERC-4626), Foundry code, audit methodology. By QuillAudits
Repo Quillhash/Real-World-Assets-RWA, read from GitHub 13 h ago. Quillhash has not joined Take My Repo.
Quillhash/Real-World-Assets-RWA is a public repo on GitHub by Quillhash. Developer handbook & reference implementation for Real-World Asset (RWA) tokenization: token standards (ERC-3643, ERC-4626), Foundry code, audit methodology. By QuillAudits. It declares the MIT license on GitHub. It is written mainly in Solidity, has 99 stars and last changed on 2026-08-24. Nobody has reviewed it on Take My Repo yet, which says nothing about its quality. Read from GitHub on 2026-11-22.
In the maintainer's words. Shown from GitHub; Take My Repo does not keep a copy.
Open-source resource hub by QuillAudits for developers, auditors, and researchers building tokenized real-world assets (RWAs) on blockchain. It includes a working Foundry reference implementation (a synthetic tokenized Apple share backed by WETH with Chainlink oracles), an RWA categorization framework, token standard references, and the audit methodology we apply to RWA protocols.
Quick links:
Start here if you want to truly understand how RWA systems are designed, built, and regulated.
We've published a full-length handbook at quillaudits.com/research/rwa-development.
It is written for builders, auditors, founders, and protocol architects who need a complete mental model of RWA systems โ from off-chain custody and legal structures to on-chain token standards, settlement flows, and compliance enforcement. Key chapters:
Prefer to explore interactively? Tokenization 101 lets you pick an asset class and chain and get the right token standard with live market data.
Tokenized real-world assets (RWAs) are blockchain-based digital tokens that represent physical and traditional financial assets, such as cash, commodities, equities, bonds, credit, artwork, and intellectual property. The tokenization of RWAs marks a significant shift in how these assets can be accessed, exchanged, and managed, unlocking an era of new opportunities for both blockchain-powered financial services and a wide variety of non-financial use cases underpinned by cryptography and decentralized consensus. RWAs can be tokenized on blockchain networks, allowing for fractional ownership, increased liquidity, and enhanced accessibility to traditionally illiquid assets.
Real World Assets (RWAs) encompass a wide range of tangible and intangible assets with intrinsic value. These are just a few examples of the diverse range of assets that can be tokenized on the blockchain.
Real Estate: Residential, commercial, and industrial properties. Real estate tokenization allows investors to own fractional shares of properties, providing liquidity and diversification. See our technical guide to real estate tokenization.
Commodities: Physical commodities such as precious metals (gold, silver), agricultural products (grains, coffee), energy resources (oil, natural gas), and others can be tokenized to facilitate trading and investment.
Art and Collectibles: Tokenization of art, rare collectibles, and memorabilia enables fractional ownership and investment opportunities in traditionally illiquid markets.
Intellectual Property (IP): Patents, copyrights, trademarks, and other IP rights. Tokenization allows creators to monetize their IP assets and investors to participate in revenue-sharing agreements.
Equity and Securities: Shares of private companies, stocks, bonds, and other financial instruments can be tokenized to increase liquidity, streamline transactions, and enable global access to capital markets.
Revenue-Generating Contracts: Contracts with predictable revenue streams, such as leases, royalties, and licensing agreements.
Deeds and Titles: Tokenization of deeds, titles, and ownership certificates for real estate, vehicles, and other assets can streamline transfer processes and enhance transparency in ownership records.
Carbon Credits and Renewable Energy Assets: Environmental assets such as carbon credits, renewable energy certificates (RECs), and carbon offsets.
Luxury Assets: High-value items such as yachts, private jets, and luxury watches.

Developing a Real World Asset (RWA) on the blockchain involves several steps and considerations to ensure compliance, security, and efficiency.
Define the Asset: Determine the real-world asset you want to tokenize on the blockchain โ real estate, commodities, art, intellectual property, or any other asset with tangible or intrinsic value.
Legal and Regulatory Compliance: Understand the legal and regulatory requirements for tokenizing the chosen asset. Depending on the jurisdiction and asset type, you may need to comply with securities regulations, property laws, AML regulations, and KYC requirements. Our handbook's Regulations Mapping chapter covers the major jurisdictions.
Choose the Blockchain Platform: Select a suitable blockchain platform for tokenizing the asset. Ethereum and other smart contract platforms are commonly used due to their programmability and established ecosystem; several chains are now purpose-built for RWAs.
Token Standards: Choose a token standard that suits the characteristics of the asset โ see the RWA Token Standards section below for the full landscape (ERC-20, ERC-721, ERC-1400, ERC-3643, ERC-4626, and non-EVM standards).
Collateralization: Many tokenized RWAs are backed by collateral โ the asset itself (direct backing) or other assets and financial instruments (indirect backing). The collateralization process ensures that the on-chain token maintains a stable and defined value relative to the off-chain asset it represents.
Smart Contract Development: Develop smart contracts to represent and manage the asset on the blockchain โ token issuance, transfer rules, ownership rights, and lifecycle management.
Oracles and Data Feeds: Integrate oracles to bridge the gap between the blockchain and the real world โ asset valuations, ownership records, or regulatory compliance information. Oracle and NAV manipulation is among the most common RWA attack vectors; see real incidents.
Tokenization Process: Mint digital tokens on the blockchain, each representing ownership or fractional ownership of the underlying asset, following legal requirements with proper documentation.
Security and Audits (we're here for it :D): Conduct security audits of smart contracts and overall system architecture to identify and mitigate vulnerabilities. Implement secure development best practices and deploy on testnets for thorough testing.

We can tokenize real-world assets by combining any of the following traits:
Since we have 3 categories each with 2 options, there are 8 possible types of RWAs โ though not all of them have been implemented in practice. We focus on the five majorly used categories:
Wrapped ETH (WETH) and Wrapped BTC (WBTC) are examples of on-chain assets which are directly/indirectly backed by on-chain collateral.
WETH: Ether (ETH), the native cryptocurrency of Ethereum, doesn't conform to the ERC-20 token standard. WETH allows ETH to be "wrapped" into an ERC-20 compatible format: users send ETH to the WETH smart contract, which locks the ETH and issues an equivalent amount of WETH. The process is reversible, and WETH is directly backed by ETH at a 1:1 ratio held in the contract.
WBTC: WBTC brings Bitcoin's liquidity to the Ethereum ecosystem. BTC is sent to a custodian, who mints an equivalent amount of WBTC on Ethereum; holders can redeem WBTC for BTC. Each WBTC represents one BTC held by custodians off-chain, managed through on-chain minting and burning mechanisms.
USDT and USDC fall into a unique category of RWAs โ digital tokens representing fiat currencies on blockchain platforms, characterized by off-chain assets (fiat, gold, stock shares, real estate) and off-chain collateral.
Technical framework for tokenizing RWAs:
Examples:
The DAI stablecoin is a notable example: its value is pegged to the U.S. dollar (an off-chain asset), while its collateral consists of cryptocurrencies stored on-chain within the MakerDAO system. This is indirect backing โ DAI is stabilized against the dollar through smart contracts and collateralized debt positions, not a 1:1 dollar reserve.
Choosing the right standard is the single highest-leverage design decision in an RWA system. The full landscape, with specs, function-level breakdowns, and security considerations, is in the handbook โ or use Tokenization 101 to get a recommendation for your asset class and chain.
| Standard | Purpose | Reference |
|---|---|---|
| ERC-3643 (T-REX) | Permissioned tokens for regulated securities โ onchain identity + modular compliance | Handbook page ยท Explainer |
| ERC-4626 | Tokenized yield-bearing vaults (treasuries, private credit) | Handbook |
| ERC-7540 | Asynchronous ERC-4626 vaults (request-based deposit/redeem) | Handbook |
| ERC-1400 | Partitioned security tokens with document management | Handbook |
| ERC-7518 | Dynamic compliant interoperable security token | Explainer |
| ERC-7943 | Universal RWA interface | Explainer |
| Non-EVM | Solana Token-2022 & sRFC-20, Algorand ASA, Stellar, Tezos FA2/CMTAT, Hedera HTS, Cardano, Aptos, Sui, Kadena, Polkadot Asset Hub | Non-EVM standards |
In this repository, we dive deep into the technicalities of RWA tokenisation by developing an Apple Coin (AAPL) ERC-20 token where the value of each AAPL token is 1:1 pegged to the real-time value of an Apple share in the US stock market. The backing collateral is WETH (on-chain collateral, indirectly backed), with prices from Chainlink feeds.

git clone https://github.com/Quillhash/Real-World-Assets-RWA.git
cd Real-World-Assets-RWA
forge build
forge test
Built with Foundry; dependencies: OpenZeppelin, Chainlink contracts, forge-std.
The AAPL smart contract is designed to tokenize Apple shares, allowing users to mint and redeem tokens that represent a share in Apple, using ETH as collateral. The system remains over-collateralized, maintaining algorithmic stability without governance or fees.
Constructor

External Functions
depositAndmint:
redeemAndBurn:
Public/View Functions
getHealthFactor
getUsdAmountFromaapl
amountaaplInWei: The amount of AAPL tokens for which the USD value is being requested. It's denoted in Wei to maintain precision, considering that Ethereum and many tokens on the Ethereum blockchain, including ERC-20 tokens like AAPL, can have up to 18 decimal places.i_aaplFeed), which provides the current market price of an Apple share.staleCheckLatestRoundData() on the priceFeed object, which is a method from the Chainlink Aggregator interface designed to fetch the latest reliable price data. The function returns multiple values, but only the price is used here, which represents the current price of an Apple share in USD.amountaaplInWei (the amount of AAPL tokens for which the value is being calculated) by the price of an Apple share in USD (uint256(price)).ADDITIONAL_FEED_PRECISION (a constant that adjusts for the difference in decimal places between the token and the USD value as provided by the oracle).PRECISION, another constant used to adjust the final value back to a standard decimal format, ensuring the result is accurate and usable.getUsdAmountFromEth & getEthAmountFromUsd
getUsdAmountFromEth: Returns the USD value of a given amount of ETH using the ETH/USD price feed.getEthAmountFromUsd: Converts a USD amount to the equivalent ETH amount, facilitating the redemption process.getUsdAmountFromaapl and are executed in a similar waygetAccountInformationValue
Private/View Functions
_calculateHealthFactor
aaplMintedValueUsd: The USD value of the AAPL tokens minted by the user.collateralValueUsd: The USD value of the ETH collateral deposited by the user._getAccountInformation
totalaaplMinted: The total amount of AAPL tokens minted by the user.totalCollateralEth: The total amount of ETH collateral deposited by the user.Tokenizing real-world assets on the blockchain involves creating digital representations of physical or non-physical assets (such as stocks, bonds, commodities, or real estate) through tokens. This process requires rigorous security, legal compliance, and accurate representation of asset values through reliable data feeds. The use of oracles and off-chain data sources is central to ensuring that the token values reflect the real-world prices and attributes of the assets they represent.
Now, letโs apply this auditing framework to the provided AAPL smart contract:
depositAndmint and redeemAndBurn are susceptible to reentrancy attacks, especially since they involve transferring ETH. This should be mitigated by using the checks-effects-interactions pattern.depositAndmint and redeemAndBurn involve multiple state changes and external calls, which can be gas-intensive. Optimization might be required.For real-world examples of what goes wrong when these steps are skipped, see our curated RWA incident database โ $106M+ in tokenization failures mapped by asset class, failure mode, and token standard.
Purpose: Fuzz testing is critical for identifying hidden issues that are not obvious during regular testing phases. It helps in detecting vulnerabilities like buffer overflows, crashes, memory leaks, and handling of unexpected or malicious inputs.
Process: Fuzz testing involves providing random data (inputs) to the smart contract functions to observe their behavior and track how well the contract handles edge or error cases.
Tools: In the Ethereum ecosystem, tools like Echidna and Foundry (with its forge fuzz command) are popular for conducting fuzz tests on smart contracts.
For the AAPL smart contract, incorporating fuzz testing would mean:
Coverage: Fuzz testing expands the test coverage by exploring paths that are not typically considered during standard testing, increasing the confidence in the contractโs reliability and security.
Automation: Fuzz tests can be automated and run continuously as regression tests, helping catch issues that might be introduced as the contract evolves.
Complexity Handling: Contracts interacting with external data sources like oracles can behave unpredictably. Fuzz testing helps ensure that the contract can handle such complexity and variability without failing.
QuillAudits is a Web3 security firm with 1,500+ projects secured and $3B+ in digital assets under protection. If you're building an RWA protocol, talk to us about an audit or check your design's RWA security score.
MIT โ see LICENSE.
Quillhash/Real-World-Assets-RWA is a public repo on GitHub by Quillhash. Developer handbook & reference implementation for Real-World Asset (RWA) tokenization: token standards (ERC-3643, ERC-4626), Foundry code, audit methodology. By QuillAudits.
It declares the MIT license on GitHub.
Its maker has not tagged a system, so it is unknown here. Its README says what it needs.
Open "Take it" on its page: Take My Repo writes an install plan for your machine and hands it to your AI agent (Claude Code, Codex or Cursor), which asks you before each step. Take My Repo has not tested it on any machine.
Its last change on GitHub was on 2026-08-24. Take My Repo does not judge from that whether it is maintained.
OpenZeppelin Contracts is a library for secure smart contract development.
Nobody has reviewed it on Take My Repo yet, which says nothing about its quality.
๐ซ Industrial-strength Natural Language Processing (NLP) in Python
An open source cybersecurity protocol for syncing decentralized graph data.
Mastering Ethereum: 2nd Edition, by Andreas M. Antonopoulos, Gavin Wood, Carlo Parisi, Alessandro Mazza, Niccolรฒ Pozzolini
๐ Token-Oriented Object Notation (TOON) โ compact, human-readable serialization of JSON data for LLM prompts. TypeScript SDK, CLI, benchmarks.

WTF Solidity ๆ็ฎๅ ฅ้จๆ็จ๏ผไพๅฐ็ฝไปฌไฝฟ็จใNow supports English! ๅฎ็ฝ: https://wtf.academy
Smart Contract Auditor Roadmap | Learn Blockchain Security & Smart Contract Auditing

This Repository contains list of Common Solidity SmartContract Attack Vectors. If you find any attack vectors missing, you can create a pull request and be a contributor of the project.

This repository contains a list of the most popular and widely used tools in web3 security. If you find any tools missing, you can create a pull request and be a contribute the project.
QuillAudits โ Smart Contract Audits for DeFi, RWA, DEXs, Tokens, DeAI & DApps
This repository contains list of resources to aid your journey of mastering Zero Knowledge Proofs. If you find any resource missing, you can create a pull request and be a contributor of the project.

This Repository contains list of Common NFT Attack Vectors. If you find any attack vectors missing, you can create a pull request and be a contributor of the project.
Take My Repo has not tested this on your machine. Requirements come from the project's own documentation.