Promotional Pool
Promotional Pools are designed for tokens without inherent market value, typically used to incentivize user actions or reward participation. These tokens are still paired with another token to establish a buy rate for specific use cases.
Creators may grant minting and burning roles to addresses to allow the minting of tokens without limitations and burning of tokens from any account without limitations or approvals.
Promotional Pool Settings
- Buy Cost: Specifies the flat rate of paired tokens required to purchase promotional tokens.
Buy cost may be changed by the creator any time after deployment and has no guardrail to limit the cost.
Transactions
Buy:
A buyer will pay the buy cost for the promotional tokens being purchased.
Sell:
Sales are disabled for this pool type as there is no market value.
Spend:
Share values are unchanged as there is no market value.
Data Types
PromotionalPoolInitializationParameters
This struct defines parameters used for promotional pool initialization.
- initialSupplyRecipient: Address to receive the initial supply amount.
- initialSupplyAmount: Initial amount of supply to mint to the initial supply recipient.
- initialBuyParameters: Initial settings for buy parameters.
struct PromotionalPoolInitializationParameters {
address initialSupplyRecipient;
uint256 initialSupplyAmount;
PromotionalPoolBuyParameters initialBuyParameters;
}
PromotionalPoolBuyParameters
This struct defines parameters used for buys.
- buyCostPairedTokenNumerator: The numerator for the ratio of paired token to pooled tokens when buying.
- buyCostPoolTokenDenominator: The denominator for the ratio of paired token to pooled tokens when buying.
struct PromotionalPoolBuyParameters {
uint96 buyCostPairedTokenNumerator;
uint96 buyCostPoolTokenDenominator;
}
Promotional Pool Functions
The following functions are specific to Promotional Pools. Platforms integrating TokenMaster with Promotional Pools should use these functions to update token settings, retrieve the current settings for display purposes, or building infrastructure to support direct minting and burning of promo tokens.
To call the mint and mintBatch functions, the caller must be granted the MINTER_ROLE for the Promotional Pool.
To call the burn function, the caller must be granted the BURNER_ROLE for the Promotional Pool.
| Role | Role Identifier |
|---|---|
| MINTER_ROLE | 0x9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6 |
| BURNER_ROLE | 0x3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a848 |
// Administrative functions.
function setBuyParameters(PromotionalPoolBuyParameters calldata _buyParameters) external;
// Current settings and guardrails.
function getBuyParameters() external view returns(PromotionalPoolBuyParameters memory);
// Minting / Burning functions.
function mint(address to, uint256 amount) external;
function mintBatch(address[] calldata toAddresses, uint256[] calldata amounts) external;
function burn(address from, uint256 amount) external;
Promotional Pool Events
Platforms integrating TokenMaster should index the following events on all tokens that are relevant to the platform to know when a token's buy parameters need to be checked for updates.
/// @dev Emitted when the token's buy settings have been updated.
event BuyParametersUpdated();
