Extending Locks

Comprehensive guide to extending lock durations, adding liquidity, and managing long-term locked positions.

Overview

RealSafe allows lock owners to extend their lock duration anytime, providing flexibility for long-term liquidity commitment strategies. This guide covers all aspects of lock extension and management.

Table of Contents


Basic Lock Extension

Extending V3 Locks

V3 locks can have their unlock date extended anytime before unlocking.

Requirements:

  • Must be lock owner

  • Lock must be active

  • newUnlockDate > current unlock date

  • newUnlockDate <= current time + 10 years

Example:

Extending V2 Locks

V2 locks work the same way as V3 locks for extension.

Events

Both V2 and V3 emit similar events:


Adding to V2 Locks

V2 Locker allows adding more LP tokens to existing locks without creating a new lock.

addToLock Function

Requirements:

  • Must be lock owner

  • Lock must be active

  • Amount must be > 0

  • Must have approved additional tokens

Example:

Why Add Instead of Creating New Lock?

  • Gas Savings: Cheaper than creating new lock

  • Simpler Management: One lock ID instead of multiple

  • Better UX: Easier to track and unlock

  • Same Unlock Date: All tokens unlock together

Events


Advanced Strategies

Strategy 1: Progressive Extension

Gradually extend lock duration over time to maintain commitment.

Usage:


Strategy 2: Conditional Extension

Automatically extend based on conditions.


Strategy 3: DAO-Controlled Extension

Let DAO vote on lock extensions.


Strategy 4: Staggered Unlocks

Split liquidity into multiple locks with different unlock dates.

Example:


Use Cases

1. Long-Term Project Commitment

Scenario: Project wants to show long-term commitment but maintain flexibility.

Solution:


2. Yield Farming Strategy

Scenario: Want to keep farming rewards while maintaining locked liquidity.

Solution:


3. Vesting Schedule

Scenario: Team wants progressive liquidity unlocking.

Solution:


4. Building Trust with Community

Scenario: New project wants to build trust by demonstrating long-term liquidity commitment.

Timeline:

  1. Launch: Lock 100% of initial liquidity for 30 days

  2. After 2 weeks: Extend to 90 days (shows commitment)

  3. After 1 month: Extend to 6 months (building confidence)

  4. After 3 months: Extend to 1 year (long-term commitment proven)


Best Practices

1. Plan Extensions in Advance


2. Communicate Extensions to Community

3. Monitor Gas Costs


4. Set Maximum Extension Limits


Gas Optimization

Estimated Gas Costs

Operation
V2 Locker
V3 Locker

extendLock()

~50,000 gas

~50,000 gas

addToLock()

~100,000 gas

N/A

Optimization Tips

  1. Batch Operations: Extend multiple locks in one transaction

  2. Optimal Timing: Extend during low gas periods

  3. Combine Operations: Add to lock + extend together (V2)


Monitoring Extensions

Track Extension History


Last updated