Registry & Verification
PartnerVaultRegistry is the on-chain directory that powers the PrimeStaking app's partner pool listing. It answers one question trust-minimally: "is this address a genuine, unmodified partner vault that charges the 15% protocol fee, controlled by the person registering it?"
It is an Ownable2Step contract (two-phase ownership handoff so control can't be lost to a mistyped address). The owner is PrimeStaking.
Codehash gating
Because PartnerStakedXDC_V3 bakes the fee rate and recipient in as constants, every genuine partner vault has identical runtime bytecode and therefore one canonical codehash. PrimeStaking allow-lists that hash:
setCanonicalCodeHash(bytes32 codeHash, bool allowed) // owner only, once per published vault bytecode versionregister(vault) then enforces:
isCanonicalCodeHash[vault.codehash] == true— elseNotCanonicalBytecodecaller holds
vault'sDEFAULT_ADMIN_ROLE— elseNotVaultAdminvault != address(0)and not already registered — elseZeroAddress/AlreadyRegistered
This makes it impossible to list a fork with a different fee, a different recipient, or hidden modifications. If the vault bytecode is ever revised, PrimeStaking publishes and allow-lists the new codehash; older deployments stay valid under their own hash unless explicitly revoked.
Verification & visibility
Registered
Passed codehash + admin checks
No (reachable by direct address)
Verified
PrimeStaking has vetted the pool (setVerified(vault, true))
Yes — carries the "Verified by PrimeStaking" badge
Unregistered
Never listed, or delisted via unregister
No
The app reads verifiedVaults() for the curated listing, so the directory can never be flooded with unverified spam pools, while registration itself stays permissionless. setVerified and unregister are owner-only (PrimeStaking); unregister clears all registry state for a vault but does not touch the vault contract — its admin can register it again later.
Metadata
Presentation data lives in the registry (not the vault, whose bytecode is codehash-locked) and is editable only by the vault's admin:
Read API (used by the app & indexers)
allVaults()
Every registered vault address
verifiedVaults()
Only the verified subset (the default directory)
vaultsLength() / vaultAt(uint256)
Enumerate the global list
vaultsByAdmin(address)
Pools registered by a given admin
isRegistered(address) / isVerified(address)
Status flags
registrantOf(address)
Who registered a vault
metadata(address)
The PoolMeta for a vault
Events
CanonicalCodeHashSet(codeHash, allowed)
A canonical bytecode hash is allow-listed or revoked
VaultRegistered(vault, registrant, name, symbol)
A pool is added to the directory
VaultVerifiedSet(vault, verified)
A pool's verified badge is toggled
VaultUnregistered(vault, registrant)
A pool is delisted
MetadataUpdated(vault, admin)
A pool's presentation metadata changes
→ How It Works → Deploy & List a Pool → Smart Contract Reference
Last updated