How RegX works
Whitechain enforces who may hold the note and moves the USDT. Arkiv makes the market for it public and queryable, and stale orders expire on their own.
Parties
- Acme Textiles (issuer): tokenizes a receivable as an ERC-3643 note, receives USDT from investors, and owes coupons and face value.
- Compliance agent: signs KYC claims onto investors' ONCHAINIDs. It is the trusted claim issuer in the T-REX registry.
- Alice & Bob (verified investors): fund the invoice at a discount, trade it before maturity, and get repaid in USDT.
- Carol (not verified): can browse and even sign transactions, but the token rejects every mint or transfer to her.
Architecture
The lifecycle, end to end
- Issuance. Alice calls
RegXNote.subscribe(30). 29.1 USDT goes to Acme and 30 units are minted, but only after the token checks her ONCHAINID claim and the holding cap. - Trading. Alice signs an EIP-712 sell order and publishes it as a regx.order entity on Arkiv. Bob fills it through
RegXDvP: USDT and the note move in one transaction. - Compliance. Carol has no KYC claim, so the T-REX token reverts her fill and her USDT never leaves her wallet. Frozen wallets, pauses, the holding cap and maturity are all enforced in the same transfer path.
- Coupon. After the coupon date anyone can call
payCoupon. USDT goes pro-rata from Acme's allowance to every holder. - Maturity. Trading stops on-chain.
settleMaturitypays face value in USDT to every holder and burns their units. If Acme hasn't funded it, the call reverts in public, which is an on-chain default.
Read the market yourself
import { createPublicClient } from "@arkiv-network/sdk"
import { rabdi } from "@arkiv-network/sdk/chains"
import { and, asc, eq, gt } from "@arkiv-network/sdk/query"
import { addr, u64 } from "@arkiv-network/sdk/schema"
import { OrderEntity } from "@regx/shared"
const arkiv = createPublicClient({ chain: rabdi({ accessKey: "" }), transport: http() })
// Best asks for the note, read by anyone with no API key
const { entities } = await arkiv.select().from(OrderEntity)
.where(and(eq("security", addr(NOTE)), eq("side", "sell"), gt("expiry", u64(now))))
.orderBy(asc("price")).limit(20).fetch()