QuestN Platform Integration
QuestN is a platform for Web3 quest campaigns where users complete tasks (Twitter follow, protocol transaction, token holding) and receive rewards. Integration is needed for projects looking to launch a campaign on QuestN and automatically verify on-chain actions or distribute rewards through their smart contracts.
Integration Types
Built-in QuestN verifiers cover standard cases: ERC-20/NFT holding, transaction execution to an address, interaction with a specific contract. If your task fits these templates, custom development isn't necessary—just UI configuration.
Custom API verifier is needed when the condition is specific to your logic: "user staked more than 100 tokens", "has an active position in a pool", "passed KYC in our system". QuestN calls your endpoint with the wallet address, and you return {"result": true/false}.
// Express/Next.js API route
app.get('/api/questn/verify', async (req, res) => {
const { address } = req.query;
// Check condition: e.g., staking balance > threshold
const stakedBalance = await stakingContract.read.balanceOf([address]);
const qualified = stakedBalance >= parseEther('100');
res.json({ result: qualified });
});
QuestN signs requests to your endpoint with HMAC signature—verify it to accept requests only from QuestN.
Reward Distribution
For NFT rewards through QuestN: provide a contract with a claim() function and whitelist logic, or use a merkle-proof mechanism. QuestN generates a winner list—you upload the merkle root, users claim independently.
For token rewards: QuestN can distribute through its mechanism (you fund their escrow), or integrate your own distributor contract and provide QuestN with a whitelist of addresses.
Timeline Estimates
Configuring a campaign with built-in verifiers: a few hours. Custom API verifier + deploy: 1 day.







