NexusERC20 is an upgradeable ERC20 token designed for Tokenized RWAs OFT. Unlike ERC20Plus which embeds allowlist and pause logic directly, NexusERC20 delegates these checks to a shared NexusERC20Guard contract — one guard serving multiple tokens.
Comparison with ERC20Plus
NexusERC20
Roles
NexusERC20 itself or a separate contract) must be granted both roles. Nexus calls mint/burn via configurable function selectors.
Guard Checks
Everytransfer, transferFrom, and burn call goes through the guard:
- Pause —
_assertNotPaused(uint160(_token)), keyed by the token’s address - Allowlist —
_assertAllowlisted()for caller, sender, and recipient (non-zero addresses)
mint does not enforce checks — funds cannot be debited from a non-allowlisted address or when the contract is paused, so restricting inflows is unnecessary.
Fund Recovery
Same asERC20Plus — addresses holding DEFAULT_ADMIN_ROLE can transfer tokens from non-allowlisted addresses:
CannotRecoverFromAllowlisted if _from is allowlisted.
ERC20Permit (EIP-2612)
Built-in gasless approvals, identical toERC20Plus.
NexusERC20Guard
A single upgradeable guard shared by allNexusERC20 tokens on the same chain.
What It Does
The guard combines two concerns:- AllowlistRBACUpgradeable — Three-mode allowlist (Open / Blacklist / Whitelist) with the same behavior as Stablecoin OFT’s allowlist
- PauseByIDRBACUpgradeable — Per-token pause using
uint160(tokenAddress)as the pause ID
Initialization
AllowlistMode.Open (no transfer restrictions).
Roles
Allowlist Modes
Mode transitions do not clear existing lists. Both lists support paginated enumeration via
getBlacklist(offset, limit) and getWhitelist(offset, limit).
Next Steps
- Architecture for how
NexusERC20fits into Tokenized RWAs OFT - Modules for cross-chain fee, pause, and rate limiting
- RBAC Reference for the complete role mapping