Role Guide

Transfer Agent Guide

Reconcile on-chain trades with off-chain registry (cap table). Monitor settlements and process registry updates.

Smart Contract: TransferAgentModule
File: TransferAgentModuleFacet.sol
Role Required: TRANSFER_AGENT_ROLE

Key Responsibilities

MONITOR

Monitor Settlements

Listen for EscrowSettled events and RegistryUpdateEnqueued events

QUERY

Query Pending Updates

Fetch all unprocessed registry updates via UfxViewModule

RECONCILE

Update Cap Table

Update off-chain registry to match on-chain transfers

Processing Workflow

Step 1: Monitor Settlement Events
settlementModule.on("EscrowSettled",
async (escrowId, seller, buyer, quantity) => {
console.log("New settlement:", escrowId);
// Trigger registry update workflow
}
);
Step 2: Query Pending Updates
const pending = await ufxViewModule.getPendingRegistryUpdates(fundId);
pending.forEach(update => {
console.log("Update:", update.updateId);
console.log(" From:", update.seller);
console.log(" To:", update.buyer);
console.log(" Shares:", ethers.formatUnits(update.quantity, 18));
});
📄 Smart Contract: UfxViewModuleFacet.sol, Function: getPendingRegistryUpdates() at line 145
Step 3: Update Off-Chain Cap Table
• Debit seller's balance
• Credit buyer's balance
• Record transfer in audit log
Step 4: Mark as Processed
await transferAgentModule.markRegistryUpdateProcessed(updateId);
📄 Smart Contract: TransferAgentModuleFacet.sol, Function: markRegistryUpdateProcessed() at line 89