kperm is live for Kamino lending markets today. Vault-side support ships with the next kvault release; the SDK, CLI, and on-chain mechanics described here mirror the existing permissioned markets flow.
Before you start
You’ll need:- An existing vault. See Create a vault.
- The vault admin keypair, or — in production — a Squads multisig with the admin role. See Transfer admin to multisig.
- A list of wallet addresses to whitelist, or an automated source feeding them (e.g. a KYC backend that signals verified wallets to your service).
Curator workflow
1
Decide what to permission
For most vaults, the answer is
DEPOSIT. That gates entry; withdrawals remain open so depositors can always redeem their shares. Add KEYRING if your gating logic lives in an external policy program. You can change the gated set later by re-running the update with a different bitfield.2
Switch the vault into permissioned mode
Set
permissioning_authority to the Vault Permissioner PDA and permissioned_ops to the chosen bitfield. From this point, kvault requires the kperm cosigner for every gated action.3
Whitelist users
Use the SDK, CLI, or REST API (see tabs below). All three issue the same
init_user_permission (first grant) or update_user_permission (subsequent grants) instruction on-chain.4
Test the rejection path
Send a deposit transaction from an un-whitelisted wallet on staging and confirm it reverts. Add that wallet to the allowlist and retry — it should succeed.
- SDK
- API
- Kamino CLI
Configure permissioning via SDK
The kperm-aware methods live in@kamino-finance/klend-sdk alongside KaminoManager and KaminoVault.Curator: switch the vault into permissioned mode
PermissionedOp.fromString accepts pipe-separated names: 'DEPOSIT', 'DEPOSIT|KEYRING', etc.Whitelist a user (initial grant or update)
updatePermissionIx takes an overwrite flag: true replaces the user’s allowed ops with grantedOps; false bitwise-ORs grantedOps into the existing set.Revoke a user
UserPermission account stays on-chain with permissioned_ops = 0. Re-granting later avoids paying rent again.User flow: deposit into a permissioned vault
The standard vault deposit builders detect when the target vault is permissioned and automatically wrap the produced kvault instructions withpermissioned_fwd_to_kvault. Apps integrating against a permissioned vault continue to call the standard deposit builders — the SDK handles the wrap.For instructions built outside of the standard builders, wrap manually:On-chain accounts
Program ID for kperm:
KPermUZsf9tu4cSd9LNcMojCbiHfdbJXv9dr3pAUzz1.
Operational considerations
Reference
- Permissioned vaults — conceptual model
- Permissioned markets — equivalent feature applied to lending markets
- Enable Whitelisted Reserves — protocol-level reserve restriction (independent of permissioning)