Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Redeeming Tokens

When you lock tokens behind an initiative, you receive an ERC721 NFT representing that position. Redemption burns the NFT and returns your tokens. When and how you can redeem depends on the state of the initiative and the board.

Redemption rules

A lock becomes redeemable when any of the following conditions is true:

  • Initiative accepted and releaseLockDuration has passed since acceptance
  • Initiative expired (immediate, no waiting)
  • Lock naturally expired (lock duration elapsed, regardless of initiative state)
  • Board cancelled (immediate, bypasses all timelocks)

If the board is closed (not cancelled), normal rules still apply. Closing a board stops new activity but does not accelerate redemption.

What you receive

From accepted initiatives: your locked tokens plus any incentive rewards (auto-claimed during redemption). Bounty rewards are tracked separately in the Bounties contract.

From expired initiatives or natural lock expiry: your locked tokens only. No incentive or bounty rewards.

Redeeming before an initiative is accepted forfeits all incentive rewards for that position.

How to redeem

// Single lock
function redeemLock(uint256 lockId) external nonReentrant
 
// Batch: all your locks on one initiative
function redeemLocksForInitiative(
    uint256 initiativeId,
    uint256[] calldata lockIds
) external nonReentrant

The function validates ownership, checks the lock is redeemable, marks it as withdrawn, burns the NFT, and transfers tokens back. For accepted initiatives, incentive rewards are claimed automatically.

Use redeemLocksForInitiative() when you have multiple positions on the same initiative. It's more gas efficient and claims all rewards in a single transaction.

Finding your lock positions

Lock NFTs are ERC721Enumerable. Use balanceOf(address) and tokenOfOwnerByIndex(address, index) to enumerate your positions. Use getTokenLock(lockId) to inspect a specific lock's state.

See the Redeeming Tokens reference for full function signatures and examples.