Alias Compatibility
In many instances, you may see BitBadges provide alias denomination support for compatibility with existing Cosmos SDK interfaces like sdk.Coin. This enables seamless integration with liquidity pools, multi-standard environments, and other systems that expect standard Cosmos coin formats (denom, amount).
Note that the environment must support aliases for this to work.
Alias Denomination Format
BitBadges uses the format badgeslp:COLLECTION_ID:denom for alias denominations:
Format:
badgeslp:COLLECTION_ID:denomExample:
5 badgeslp:73:utokenCollection ID:
73Base denomination:
utoken(from the collection'scosmosCoinWrapperPathspath)Amount:
5
How It Works
The alias denomination converts an integer amount to Balances[] using the collection's cosmosCoinWrapperPaths field, which defines the conversion rate.
Conversion Process
Parse the alias: Extract collection ID and denom from
badgeslp:COLLECTION_ID:denomFind wrapper path: Look up the matching
cosmosCoinWrapperPathin the collection'scosmosCoinWrapperPathsarray by denomConvert amount: Use the path's
balancesfield to convert the integer amount to `Balances[]. This is the conversion rate. 1 badgeslp:73:utoken = amount defined in balancesExecute transfer: Process the transfer using the converted
Balances[]viaMsgTransferTokens
Important Notes
No wrapping involved: This is not a wrapping/unwrapping process. The conversion is simply an alias for the full
Balances[]field.Conversion rate defined: The conversion rate is defined in the collection's
cosmosCoinWrapperPathsfield, specifically in thebalancesarray of each path.Auto-scan mode: Implementations that support alias denominations almost always operate in auto-scan mode (no prioritized approvals required).
Use Cases
Liquidity Pool Environments
Alias denominations enable BitBadges tokens to participate in liquidity pools that expect standard sdk.Coin formats:
Multi-Standard Support
In environments where you need to support multiple token standards, alias denominations provide a unified interface:
Configuration
The conversion is defined in the collection's cosmosCoinWrapperPaths field:
In this example:
1 badgeslp:COLLECTION_ID:utokenconverts to1token with IDs1-100and full ownership timesThe conversion rate is
1:1(1 alias unit = 1 token)
Benefits
Drop-In Replacement: Upgrade existing systems to support BitBadges tokens with simply changing a line of code
Seamless Integration: Works with existing Cosmos SDK interfaces and tools
Liquidity Pool Compatibility: Enables participation in AMM pools and DeFi protocols
Multi-Standard Support: Unified interface for different token types
No Wrapping Overhead: Direct alias conversion without minting/burning
Last updated