Namoshi offers a flexible discount system that allows users to register domains at reduced costs. This system is modular and supports multiple types of validation logic.Documentation Index
Fetch the complete documentation index at: https://docs.namoshi.xyz/llms.txt
Use this file to discover all available pages before exploring further.
Discount Validators
Namoshi usesIDiscountValidator implementations to check if a user is eligible for a discount. The main validator types are:
Referral System
TheSecureReferralDiscountValidator allows users to register domains using a referral code.
- Discount: Users get a % off the registration fee.
- Security: The referral code is cryptographically verified to ensure authenticity.
NFT Ownership
TheERC721DiscountValidator and MultipleNFTDiscountValidator grant discounts to holders of specific NFT collections.
- Check: The contract verifies
balanceOf(user) > 0for the configured NFT contract. - Stacking: With
MultipleNFTDiscountValidator, holding NFTs from multiple collections can stack discounts (up to a limit).
Whitelists
TheMerkleWhitelistDiscountValidator allows for efficient on-chain whitelist verification.
- Merkle Proof: Users submit a Merkle proof along with their registration to prove they are in the whitelist.
- Gas Efficient: Only the root hash is stored on-chain.
Applying Discounts
To use a discount, pass the appropriate data to theregisterWithDiscount function on the controller:
discountData parameter contains the proof or signature required by the active DiscountValidator.