Free 30-min Web3 Consultation
Book Now
Smart Contract Security Audits
Learn More
Custom DeFi Protocol Development
Explore
Full-Stack Web3 dApp Development
View Services
Free 30-min Web3 Consultation
Book Now
Smart Contract Security Audits
Learn More
Custom DeFi Protocol Development
Explore
Full-Stack Web3 dApp Development
View Services
Free 30-min Web3 Consultation
Book Now
Smart Contract Security Audits
Learn More
Custom DeFi Protocol Development
Explore
Full-Stack Web3 dApp Development
View Services
Free 30-min Web3 Consultation
Book Now
Smart Contract Security Audits
Learn More
Custom DeFi Protocol Development
Explore
Full-Stack Web3 dApp Development
View Services
LABS
Guides

How to Sunset or Replace Incentive Programs

A developer-focused guide on the technical and governance processes for responsibly ending or upgrading DeFi incentive programs, with Solidity and off-chain script examples.
Chainscore © 2026
introduction
LIFECYCLE MANAGEMENT

How to Sunset or Replace Incentive Programs

A guide to systematically concluding or upgrading on-chain incentive programs, covering key strategies, technical considerations, and community communication.

Incentive programs, such as liquidity mining campaigns or NFT staking rewards, are not permanent fixtures. A well-planned sunset or replacement strategy is critical for protocol health, treasury management, and user trust. Sunsetting involves winding down a program to a definitive end, while replacement swaps an old incentive model for a new one, often to correct for inefficiencies, target new metrics, or adapt to changing market conditions. Failure to manage this lifecycle can lead to permanent inflation, misallocated capital, and community backlash.

The first step is defining clear offboarding parameters in the smart contract from day one. This includes setting a hard end date via a programEndTimestamp, implementing a function for the governance multisig to halt emissions (e.g., emergencyStop()), and defining a final claim period. For example, a Uniswap V3 liquidity mining program might encode its total reward distribution in a MerkleDistributor contract with a root that expires after 90 days, after which claims are permanently disabled. This contract-level certainty prevents ambiguity.

For program replacement, a common pattern is the vesting cliff transition. Instead of abruptly stopping old rewards, you announce that existing staked positions will continue to accrue rewards at a decaying rate (e.g., -20% per week) while a new, optimized program launches in parallel. This gives users time to migrate without facing an immediate financial cliff. Technically, this requires deploying the new staking or gauge contract and updating the reward distributor to split emissions between the legacy and new systems according to a predefined schedule.

Communication is paramount. A transparent timeline should be published via governance forums like Snapshot and project blogs, detailing the rationale, the exact sunset/replacement schedule, and migration instructions. For major DeFi protocols like Curve or Aave, this process is often governed by a DAO vote, where token holders approve the change in emission schedules or the allocation of funds to a new incentive contract. This democratic approach builds legitimacy and ensures the community is aligned with the protocol's evolving economic strategy.

Finally, analyze post-sunset data. Monitor key metrics like Total Value Locked (TVL) retention, volume, and user migration rates to the new program. This data validates whether the incentive achieved its goal (e.g., bootstrapping deep liquidity) and informs the design of future programs. A successful sunset is not just a technical termination; it's a deliberate transition that preserves protocol value and user confidence, paving the way for the next growth phase.

prerequisites
GUIDE

Prerequisites and Pre-Migration Checklist

A structured approach to decommissioning or transitioning on-chain incentive programs, ensuring user safety and protocol integrity.

Before initiating the sunset of an incentive program, a formal governance proposal must be passed. This proposal should clearly define the sunset rationale, the final block height or timestamp for program conclusion, and the post-sunset state of the relevant smart contracts. For programs distributing native tokens, confirm the treasury holds sufficient funds to cover all remaining rewards. For programs using third-party liquidity mining platforms like Aave or Compound, review their specific governance and technical processes for ending emissions.

A comprehensive user communication plan is critical. This includes announcing the sunset timeline across all official channels—Discord, Twitter, governance forums, and the project's front-end interface—with ample lead time (typically 2-4 weeks). The announcement must specify the exact deadline for claiming rewards and warn users that unclaimed rewards may be forfeited. For programs involving staked assets, clearly communicate the unstaking process and any associated cooldown periods or fees.

Technically, you must audit the incentive contract's withdrawal and claim functions. Ensure there are no time locks or governance delays that would prevent users from accessing their funds before the deadline. For programs built on Curve's GaugeController or Convex, you will need to submit a transaction to set the gauge weight to zero. Test this process on a testnet (e.g., Sepolia, Goerli) first. Create and verify a final snapshot script to record user rewards and deposits at the cutoff block for historical accountability and potential future airdrops.

Finally, prepare the post-sunset actions. This includes upgrading or pausing the relevant contract functions to prevent new deposits or false reward accrual. Plan for the reallocation of any remaining treasury funds. Document the entire process, including transaction hashes for governance votes and contract calls, to maintain transparency. A successful sunset minimizes user disruption and preserves the protocol's reputation for responsible fund management.

sunset-strategies-explanation
STRATEGIC DEPLOYMENT

How to Sunset or Replace Incentive Programs

A guide to systematically winding down or transitioning on-chain incentive programs to minimize disruption and maintain protocol health.

Sunsetting an incentive program is a critical governance action that requires careful planning to avoid market shocks and preserve user trust. Unlike simply turning off a faucet, a proper sunset involves a phased reduction of rewards, clear communication of timelines, and often a direct replacement with a new incentive structure. Common triggers for a sunset include achieving a target metric (like TVL or user count), budget exhaustion, identifying more efficient reward mechanisms, or a strategic pivot in protocol focus. The primary goals are to manage treasury resources responsibly and guide liquidity or user activity to more productive areas of the protocol.

A standard sunset strategy employs a linear or exponential decay function for rewards over a defined deprecation period. For example, a program might reduce emissions by 20% each epoch over five epochs until reaching zero. This is preferable to an abrupt halt, as it gives participants time to adjust their positions. All parameters for the sunset—start block, decay rate, and final end block—should be immutably encoded in the smart contract logic upon launch or set via a timelock-controlled governance vote. Transparent, off-chain communication through official channels (blog, Discord, Twitter) is equally important to set expectations.

When replacing a program, the new incentive contract should be deployed and audited before the old one begins its wind-down. A common pattern is to run both programs in parallel during a transition overlap period, allowing users to migrate their stakes or liquidity gradually. For liquidity mining on a DEX like Uniswap V3, this might involve creating a new staking contract that points to updated pool fee tiers or reward tokens, while the old contract's rewards decay. This overlap prevents a "liquidity cliff" where all capital exits at once, which could cause impermanent loss for remaining LPs or impact swap pricing.

Technical implementation requires secure contract architecture. Use a dedicated owner or governance role with a timelock to control the sunset function. The function should update a rewards multiplier or directly adjust the emission rate per second. Avoid using selfdestruct on old contracts if they hold user funds; instead, design them to become inert. Always include an emergency pause function, but rely on the planned sunset for routine operations. For composable systems, consider the impact on integrated protocols (like yield aggregators) and provide them with ample notice via events or off-chain feeds.

Post-sunset, monitor on-chain metrics to confirm the intended outcome, such as the migration of TVL to the new program or a controlled reduction in protocol-owned liquidity. Analyze the data to inform the design of future incentives. A well-executed sunset or replacement is not a failure but a sign of mature protocol management, demonstrating an ability to adapt economic models based on real-world data and community feedback.

STRATEGY OVERVIEW

Incentive Transition Strategy Comparison

Comparison of common approaches for phasing out or replacing token incentive programs.

Key MetricGradual TaperDirect SwapVesting Migration

Community Backlash Risk

Low

High

Medium

Implementation Complexity

Medium

Low

High

Smart Contract Audit Required

Avg. Transition Period

3-12 months

< 1 week

1-6 months

Gas Cost for Users

Low

High

Medium

Requires Governance Vote

Liquidity Impact

Gradual

Immediate

Staggered

Example Protocol

Curve (CRV gauge weights)

Uniswap (UNI to UNI v2)

Aave (stkAAVE to GHO incentives)

code-patterns-wind-down
STRATEGY

Code Patterns for Programmable Wind-Downs

A guide to implementing controlled termination or migration of on-chain incentive programs using smart contract patterns.

Programmable wind-downs are critical for managing the lifecycle of incentive programs like liquidity mining, staking rewards, or governance bribes. A poorly managed sunset can lead to liquidity flight, governance attacks, or protocol insolvency. Instead of a hard stop, a well-designed wind-down uses smart contract logic to gradually reduce rewards, migrate users to new programs, or trigger final distributions. This approach preserves user trust and protocol stability. Key patterns include time-based decay, emission schedule overrides, and migration gateways.

The most common pattern is a time-based decay function. Instead of setting a fixed end date that stops rewards abruptly, you implement a function that reduces the reward rate over time. For example, you could use a linear decay where the rewardPerSecond variable decreases each week until it reaches zero. A more sophisticated approach uses a logarithmic or exponential decay to create a smoother transition. This code pattern requires an internal clock (like block.timestamp) and a function to calculate the current emission rate, which is then used in the existing reward distribution logic.

Another essential pattern is the migration contract. When replacing an old incentive program with a new one, you deploy a new staking or rewards contract. The old contract's exit or unstake function can be programmed to automatically deposit the user's assets into the new contract, often with a bonus or grace period to encourage migration. This is often combined with a timelock on the old contract's reward claims, giving users a final window to collect remaining rewards before the treasury is closed. The Curve Gauge Controller is a canonical example of a system designed for programmatic incentive shifts.

For governance-managed wind-downs, implement an upgradeable emission schedule. Store the reward parameters (like rate, duration, and cap) in a separate, governor-controlled contract. The main staking contract calls this schedule contract to get the current rate. To wind down, governance simply updates the schedule to a new, terminating curve. This separates policy from mechanics, allowing for flexible adjustments without redeploying core logic. Always include a safety shutdown function, triggered by a multisig or time lock, that can pause emissions in an emergency.

Testing wind-down logic is non-negotiable. Use forked mainnet tests to simulate the wind-down over its full duration, checking for edge cases like users entering/exiting at the final block. Monitor for reward calculation rounding errors that could leave dust locked forever, and ensure the final state of the contract leaves no funds trapped. Document the wind-down parameters and process clearly for users, as transparent communication is as important as the code. A programmable wind-down isn't just an end—it's a managed transition that protects both the protocol and its participants.

migration-contract-patterns
TUTORIAL

Building Migration Contracts for Program Replacement

A guide to designing and deploying secure smart contracts that facilitate the controlled sunset or upgrade of on-chain incentive programs.

Incentive programs, such as liquidity mining or staking rewards, are often temporary by design. A migration contract is a dedicated smart contract that manages the transition from an old program to a new one or to a final shutdown state. Its core functions are to safely freeze old deposits, enable users to claim outstanding rewards, and seamlessly migrate user positions (like staked tokens) to a new contract. This process is critical for maintaining user trust and preventing loss of funds during protocol upgrades.

The architecture of a migration contract typically involves three key states: Active, Migration, and Closed. The contract begins in Active mode, where the old program runs normally. The protocol owner can then trigger a startMigration() function, moving to the Migration state. In this phase, new deposits into the old contract are disabled, but users can still claim rewards and initiate a migration of their stake. Finally, a finalize() function moves the contract to Closed, permanently disabling all actions after a set deadline.

A primary security consideration is ensuring users cannot be forced into a new, potentially risky contract. Migration should be a pull-based, opt-in mechanism. Users must call a function like migrateMyStake() to move their funds, which then burns the old stake tokens and mints equivalent ones in the new contract. This pattern prevents malicious upgrades and respects user autonomy. Always include a timelock on the startMigration() function and a long, well-communicated deadline for the final claim period to protect users.

Here is a simplified Solidity code snippet illustrating a migration contract's core logic, using a staking program as an example:

solidity
contract StakingMigration {
    IERC20 public oldStakingToken;
    IERC20 public newStakingToken;
    uint256 public migrationDeadline;
    mapping(address => uint256) public migratedBalance;

    function migrateStake(uint256 amount) external {
        require(block.timestamp < migrationDeadline, "Migration closed");
        oldStakingToken.burnFrom(msg.sender, amount);
        newStakingToken.mint(msg.sender, amount);
        migratedBalance[msg.sender] += amount;
    }
}

This contract allows users to burn their old tokens and receive new ones directly, with a deadline for the operation.

Effective communication is as important as the code. Before triggering the migration, protocols should announce the schedule on all channels, document the process, and provide a user-friendly front-end for the migration. Tools like Etherscan's contract verification and block explorers should be used to publish the migration contract's source code, allowing users to verify its safety independently. Post-migration, consider leaving the old contract's state readable for audit purposes, but ensure all value-transfer functions are permanently disabled.

governance-communication-resources
SUNSETTING PROGRAMS

Governance and Communication Resources

A structured approach to winding down or replacing token incentives, covering governance frameworks, communication strategies, and technical execution.

03

Technical Execution: Updating Smart Contracts

After governance approval, the changes must be executed on-chain. This involves:

  • Contract Interaction: For programs using emission controllers (e.g., Minter contracts, Gauge controllers), a privileged address must call a function to update emission rates to zero or new values.
  • Timelock Execution: For security, changes should be queued through a Timelock contract, providing a buffer before execution.
  • Verification: Use a block explorer to verify the transaction and confirm the parameter change. Always test changes on a testnet first.
05

Transitioning to a New Incentive Model

Instead of a full sunset, consider a transition. Common models include:

  • Retroactive Funding (RetroPGF): Reward past contributors based on proven impact, used by Optimism and Arbitrum.
  • Vote-Escrowed (ve) Tokenomics: Shift to a model where locked governance tokens (veTokens) direct emissions, aligning long-term stakeholders.
  • Grants Programs: Replace open emissions with a structured grants committee funding specific development or growth initiatives. Each model requires its own governance and operational framework.
06

Legal & Regulatory Considerations

Sunsetting a program may have legal implications, especially if it involves ceasing payments to participants.

  • Terms of Service Review: Ensure the program's original announcement or documentation reserved the right to modify or end incentives.
  • Securities Law Context: In some jurisdictions, changing the economics of a token program could be scrutinized. Consult legal counsel.
  • Transparency as a Shield: A clear, community-approved governance process is the best practice for demonstrating fair process and mitigating legal risk.
SUNSETTING STRATEGIES

Security and Economic Risk Matrix

Comparative risk assessment for common strategies to wind down or replace on-chain incentive programs.

Risk DimensionGradual TaperDirect ReplacementImmediate Halt

Protocol Security Risk

Low

Medium

High

User Capital Flight Risk

Medium

High

Very High

Oracle Manipulation Risk

Low

Medium

Low

TVL Volatility (>24h)

< 15%

15-40%

60%

Governance Attack Surface

Arbitrage Opportunity

Low

High

Medium

Smart Contract Complexity

High

Medium

Low

Required Buffer Funds

30-60 days

7-14 days

0 days

post-sunset-monitoring
PROGRAM MANAGEMENT

Post-Sunset Monitoring and Metrics

A program sunset is not the end of operations. This guide details the critical monitoring and analysis required after deactivating an incentive program to ensure a clean transition and gather final performance data.

Once an incentive program is officially sunset—meaning new rewards are no longer being distributed—the work shifts to post-sunset monitoring. This phase is critical for ensuring the protocol's stability, capturing final Key Performance Indicators (KPIs), and validating the success of the wind-down. The primary goals are to confirm that all reward streams have ceased as expected, monitor for any unintended side effects on protocol metrics like TVL or volume, and compile a final dataset for retrospective analysis. Tools like The Graph for on-chain querying or custom dashboard services (e.g., Dune Analytics, Flipside Crypto) are essential for this real-time oversight.

Key metrics to track in the weeks following a sunset include residual user activity, final token emission totals, and changes in core protocol health. You should verify that the smart contract's reward distribution function is permanently disabled and that no further claims are possible. Concurrently, monitor the affected pools or functions for a drop in liquidity or usage, distinguishing between the natural conclusion of incentives and potential negative market reactions. This data forms the basis of a post-mortem analysis, helping teams understand the program's true ROI and long-term impact on user retention and protocol growth.

The final step is synthesizing this data into a formal sunset report. This document should include the original program objectives, a timeline of the sunset execution, final aggregated metrics (e.g., total cost, user growth, TVL impact), and any observed anomalies. Share this analysis internally with product and governance teams to inform the design of future initiatives. Publicly, a transparent summary can be published on governance forums or project blogs to maintain community trust, demonstrating responsible fiscal management and a data-driven approach to ecosystem development.

INCENTIVE PROGRAM MANAGEMENT

Frequently Asked Questions (FAQ)

Common questions and solutions for developers managing or deprecating on-chain incentive programs like liquidity mining, staking rewards, or airdrops.

A declining Annual Percentage Yield (APY) is a core feature of most incentive programs, not a bug. It's typically caused by:

  • Emission Schedule: Most programs use a fixed emission rate (e.g., 1000 tokens/day). As the total value locked (TVL) grows, the same reward is spread across more participants, diluting individual yields.
  • Token Price Volatility: APY is often calculated in USD. If the reward token's price falls faster than the yield generated, the USD-denominated APY drops.
  • Competition: New, higher-yielding pools in the same or competing protocols attract capital away, reducing TVL and thus increasing the share for remaining users, but the overall trend is often downward.

Example: A Uniswap V3 ETH/USDC pool starts with $1M TVL and 1000 UNI/day rewards. If TVL grows to $10M, the yield per dollar deposited falls by 90%, causing APY to plummet.

conclusion
PROGRAM MANAGEMENT

Conclusion and Key Takeaways

Sunsetting an incentive program is a critical governance and operational process that requires careful planning to protect users and maintain protocol integrity.

Successfully decommissioning an incentive program involves a structured, multi-phase approach. The process begins with a clear governance proposal to signal the change, followed by a defined sunset period that gives participants adequate time to react. During this period, you must implement technical safeguards like reducing emissionRate to zero and ensuring no new rewards are minted. This structured wind-down prevents abrupt disruptions and allows for a smooth transition of liquidity or user activity to new initiatives.

Key technical considerations include managing the reward token lifecycle and preventing unintended claims. For programs using a RewardsDistributor or staking contract, you must ensure the contract's balance is sufficient to cover all pending claims until the program ends. It is critical to disable any functions that allow new deposits or stake extensions after the announcement. For on-chain programs, you can use a timestamp-based require statement, such as require(block.timestamp < sunsetDeadline, "Program ended"), to enforce the cutoff.

Communication and documentation are as important as the technical execution. Clearly announce the sunset timeline on all community channels and update protocol documentation, including the relevant README files and user interfaces. Provide users with a step-by-step guide for claiming remaining rewards and unstaking assets. Transparent communication builds trust and reduces support burden during the transition period.

When replacing an old program with a new one, design the new incentives to address the shortcomings of the previous iteration. Use the data gathered—such as participation rates, cost per deposit, and TVL stability—to inform the new rewardRate and lockup parameters. A common strategy is to launch the new contract and allow a migration window where users can move their positions, sometimes with a bonus incentive, to bootstrap the new program efficiently.

The ultimate goal is to manage incentive programs as iterative experiments. Each program should have predefined success metrics and a review timeline. By planning for the end from the beginning, teams can make data-driven decisions to retire ineffective programs, reallocate capital efficiently, and continuously refine their tokenomics strategy to align with long-term protocol goals.