KYC'd Accounts
Some Gearbox credit markets require identity verification before users can open or manage credit accounts. These permissioned markets use on-chain access control to restrict operations to whitelisted addresses.
How It Works
Permissioned credit managers use a whitelist contract that gates access to core operations. When KYC is enabled on a market:
- Only whitelisted addresses can call
openCreditAccount - Existing account owners retain access to manage their positions
- Liquidations remain permissionless (anyone can liquidate unhealthy accounts)
Checking Access
Before attempting to open an account on a permissioned market, verify that your address is whitelisted:
TypeScript
import { getContract } from 'viem'; import { creditFacadeV3Abi } from '@gearbox-protocol/sdk'; const creditFacade = getContract({ address: facadeAddress, abi: creditFacadeV3Abi, client: publicClient, }); // Check if the facade has access restrictions const isDegenMode = await creditFacade.read.degenNFT(); const hasExpiration = await creditFacade.read.expirationDate(); // If degenNFT is set, the market requires a special NFT for access if (isDegenMode !== '0x0000000000000000000000000000000000000000') { console.log('This market requires a DegenNFT for access'); }
DegenNFT Gating
The most common permissioning mechanism is the DegenNFT. Markets configured with a DegenNFT address require callers to hold that NFT to open accounts:
- Each NFT grants a limited number of account opens
- NFTs are distributed through governance or KYC providers
- The NFT balance is decremented on each
openCreditAccountcall
TypeScript
import { erc721Abi } from 'viem'; const degenNFT = getContract({ address: degenNFTAddress, abi: erc721Abi, client: publicClient, }); const balance = await degenNFT.read.balanceOf([myAddress]); console.log(`Available account opens: ${balance}`);
Implications for Developers
When building integrations against permissioned markets:
- Check access first - Query the whitelist or NFT balance before constructing transactions
- Handle rejections gracefully - Provide clear error messages when access is denied
- Liquidation bots work normally - No KYC is needed for liquidation operations
- Multicalls are unaffected - Once an account is open, all multicall operations work identically to permissionless markets
Learn More
- Credit Accounts - General account management
- Account Operations - Full operation reference
- Multicalls - Building multicalls