Campaign Configuration
Understanding Campaign Configurations on Merkl
A campaign configuration is the collection of all parameters — such as the campaign type, distribution method, scoring method, and customization options — that define how a campaign operates. It serves as the source of truth for the Merkl engine.
When a campaign is launched, an encoded version of this configuration is stored onchain in the Merkl Distribution Creator contract. The Merkl engine continuously monitors this contract to detect new campaigns, then parses each configuration to understand among others:
- What type of user activity to track (e.g., providing liquidity, holding tokens, lending assets)
- How to calculate user scores based on their participation
- How rewards should be distributed over time
- Which addresses are eligible or excluded from rewards
This configuration-driven approach allows Merkl to support diverse incentive mechanisms while maintaining a unified reward computation and distribution infrastructure.
Creating and retrieving configurations
You rarely write a configuration by hand:
- Merkl Studio builds it for you when you create a campaign.
- The Merkl API can generate, encode, decode, and retrieve configurations programmatically — handy when creating multiple campaigns at once.
To go deeper — every field and its accepted values, and how to assemble, encode, and verify a configuration — start with Understanding campaign configs in the developer docs, and browse every type in the schema explorer.