Documentation
Smart contracts
The contract architecture, roles, and what has not been audited.
Modules
| Contract | Responsibility |
|---|---|
| AssetToken | ERC-20 with a compliance hook, an immutable cap, pausing and a display multiplier. |
| ComplianceRegistry | Per-token allowlist, freeze list and lock-up schedule. |
| AssetRegistry | Binds a token to the asset it represents, pinning the document hash onchain. |
| TokenFactory | Deploys a token and registers its asset atomically. |
| OracleAdapter | One price interface over pushed marks and Chainlink Data Streams. |
| RedemptionController | Escrows tokens on a redemption request and records settlement. |
Design decisions
- Standard OpenZeppelin ERC-20 core. Every wallet, indexer and integrator already handles it correctly; a bespoke token is a liability.
- Compliance is external, behind an interface, so policy can change without redeploying the token or migrating holders.
- The cap is immutable. A maximum supply an admin can raise is not a maximum supply.
- uiMultiplier is display-only. Rebasing balances silently breaks AMMs, accounting and every integrator.
- forcedTransfer bypasses the allowlist — that is its purpose — but still respects the pause, so the circuit-breaker means something.
- The factory retains no role on the tokens it creates.
Roles
| Role | Can |
|---|---|
| DEFAULT_ADMIN_ROLE | Grant and revoke every other role. Should be a multisig. |
| ISSUER_ROLE | Configure the instrument and its metadata. |
| MINTER_ROLE | Mint, subject to the mint policy and the cap. |
| BURNER_ROLE | Burn using an allowance. |
| COMPLIANCE_ROLE | Maintain the allowlist, freeze accounts, force transfers. |
| PAUSER_ROLE | Halt and resume transfers. |
| ORACLE_ADMIN_ROLE | Post marks and update the corporate-action multiplier. |
| REDEEMER_ROLE | Settle and reject redemption requests. |
No role is ever granted to a frontend. Every privileged action is signed by the address holding the role.
Audit status
These contracts have NOT been independently audited. They are engineering starting points. Commission a professional security audit before they hold value. Each contract carries a TODO(audit) note identifying what a reviewer should look at first.
npm run contracts:build # compile npm run contracts:test # 46 tests cd contracts && npm run deploy:testnet