Marketplace management
Marketplace Account: Central Data Structure
The marketplace account takes center stage in our program's architecture. It's a vital data structure that embodies effective marketplace management. To ensure simplicity and uniqueness, the marketplace account is designed as a PDA, establishing a one-to-one relationship between each account and its specific authority. Marketplace authority is the unique entity able to edit marketplace data.
Control and Access
This account also assumes the role of the mint authority for the access mint, providing the authority the ability to manage who can list or create products in its marketplace. This control is managed through token distribution or accepting requests. For this configuration to take place the marketplace account must have the permissionless_config.permissionless flag equal to false.
Airdrop access: Marketplace authority airdrops directly the access token to the user.
Request access - Accept access instructions: Users sign a transaction creating the on-chain request, marketplace authority accepts it and users receive a token that allows them to create on-chain products.
Fees configuration
In our marketplace, transaction fees are managed through the FeesConfig structure, offering the following key features:
Seller Incentives with Discount Mint: Marketplaces can encourage sellers to receive payments in specific tokens by setting a 'discount_mint' in FeesConfig. Sellers choosing this option enjoy reduced marketplace fees, potentially involving governance tokens for added value.
Transparent Fee Calculation: The 'fee' field in FeesConfig represents the transaction fee percentage. For instance, a 'fee' value of 250 indicates a 2.5% transaction fee, calculated based on the total transaction value.
Seller Fee Reduction: Sellers opting for the discount mint can benefit from a fee reduction specified in the 'fee_reduction' field. This aligns payment preferences with marketplace strategies.
Flexible Fee Payer Options: The 'fee_payer' field determines whether the buyer or seller covers transaction fees. This adaptability caters to diverse marketplace models and user choices.
Cashback configuration
The rewards feature within our marketplace introduces an incentivization system designed to enhance user engagement and participation during promotional periods. This feature is built upon a structured configuration known as the RewardsConfig.
Reward Mint Specification: The marketplace offers rewards based on the usage of specific payment tokens. This is defined by the 'reward_mint' field within the RewardsConfig. If this field is set to a particular token's mint pubkey, rewards will only be granted for transactions conducted using that specific token.
Bounty Vaults for Token Storage: Rewards relies on designated vaults referred to as 'bounty_vaults'. Managed by the marketplace's Program Derived Account (PDA), these vaults are intended to hold the reward tokens. During promotional periods, tokens used in transactions are deposited into these vaults.
Seller and Buyer Rewards: Sellers and buyers both stand to gain from the rewards system. The 'seller_reward' and 'buyer_reward' fields denote the percentage of transaction volume that each party receives as rewards during a sale. For example, a 'seller_reward' value of 250 implies that the seller will be awarded 2.5% of the transaction volume. Conversely, a value of 0 in either field signifies the absence of active rewards for that party.
Enabling and Disabling the Reward System: Flexibility is provided to enable or disable the rewards system using the 'rewards_enabled' flag. When is true, the rewards system is operational, providing rewards based on the configuration. On the other hand, setting it to false deactivates the rewards system.
Last updated