# Verifying Locks

Learn how to verify locked liquidity on-chain and display proof to your community.

## Overview

This guide covers:

* Checking if liquidity is locked
* Verifying lock details on-chain
* Using block explorers
* Displaying locks on your website

***

## Why Verify Locks?

### For Projects

* **Build Trust**: Show community you're committed
* **Marketing**: Display locked liquidity prominently
* **Transparency**: Prove anti-rug measures
* **Competitive Advantage**: Stand out from scams

### For Users/Investors

* **Due Diligence**: Check before investing
* **Safety Score**: Higher locked liquidity = safer
* **Verify Claims**: Don't trust, verify
* **Exit Scam Protection**: Confirm liquidity can't be rugged

***

## Method 1: Using Clavis Web App

### Step 1: Get Lock Info

If you know the lock owner address:

1. Go to <https://app.realsafe.io>
2. Click **"Search"** or **"Verify"** in navigation
3. Enter wallet address or Lock ID
4. Click **"Search"**

&#x20;*Search for locks by address or Lock ID*

### Step 2: View Lock Details

You'll see:

* **Lock ID**: Unique identifier
* **Owner**: Who owns the lock
* **Token Pair**: Which tokens are locked (V3) or LP token (V2)
* **Amount**: How much liquidity is locked
* **Unlock Date**: When it can be unlocked
* **Status**: Active/Unlocked
* **Condition**: Any custom unlock conditions

&#x20;*Search results showing multiple locks*

&#x20;*Detailed view of a specific lock*

### Step 3: Verify On-Chain

Click **"View on Explorer"** to see:

* Transaction that created lock
* Smart contract interactions
* All details verified on-chain

***

## Method 2: Using Block Explorers

### Monad Testnet

**Locker Contracts:**

* V3 Locker: `0x2D0dFc5a6731315D8f911E8534746D89B7472175`
* V2 Locker: `0xe373C89A77dE728D50c7372C8Fe139B292a7DFE2`

**Steps:**

1. Go to <https://testnet-explorer.monad.xyz>
2. Search for locker contract address
3. Click **"Read Contract"** tab
4. Use view functions:
   * `getOwnerLockIds(address)` - Get all locks for address
   * `getLock(uint256)` - Get specific lock details
   * `canUnlock(uint256)` - Check if unlockable

&#x20;*Locker contract on Monad Explorer*

&#x20;*Read Contract functions*

&#x20;*Results from calling getLock function*

***

## Method 3: Using Smart Contract Calls

### Reading Lock Data

**Get all locks for an address:**

```solidity
uint256[] memory lockIds = locker.getOwnerLockIds(ownerAddress);
```

**Get specific lock details:**

```solidity
Lock memory lock = locker.getLock(lockId);
```

**Check if can unlock:**

```solidity
bool unlockable = locker.canUnlock(lockId);
```

### Using cast (Command Line)

**Get owner's locks:**

```bash
cast call 0x0b4619Ed28429a392C79aed87E6572F34ab6199e \
  "getOwnerLockIds(address)" \
  0xYourAddress \
  --rpc-url https://testnet-rpc.monad.xyz
```

**Get lock details:**

```bash
cast call 0x0b4619Ed28429a392C79aed87E6572F34ab6199e \
  "getLock(uint256)" \
  1 \
  --rpc-url https://testnet-rpc.monad.xyz
```

***

## Interpreting Lock Data

### Lock Structure (V3)

```solidity
struct Lock {
    uint256 lockId;         // Unique ID
    uint256 nftId;          // NFT token ID  
    address owner;          // Current owner
    address pendingOwner;   // Pending transfer
    address pool;           // Pool address
    address token0;         // First token
    address token1;         // Second token
    uint128 liquidity;      // Liquidity amount
    uint256 unlockDate;     // Unlock timestamp
    address collectAddress; // Fee recipient
    bool isActive;          // Is active
    address condition;      // Condition contract
}
```

### Key Fields to Check

**isActive:**

* `true`: Lock is active, liquidity still locked
* `false`: Lock has been unlocked

**unlockDate:**

* Unix timestamp
* Convert to date: <https://www.unixtimestamp.com/>
* Must be >= current time to be locked

**liquidity:**

* Amount of liquidity locked
* V3: liquidity units
* V2: number of LP tokens

**condition:**

* `0x0000...`: No condition, time-based only
* Other address: Custom condition set

&#x20;*Visual guide to understanding lock struct data*

***

## Displaying Locks on Your Website

### Option 1: Embed Widget (Coming Soon)

```html
<iframe 
  src="https://app.realsafe.io/embed/ADDRESS"
  width="400" 
  height="600"
  frameborder="0">
</iframe>
```

&#x20;*Example embedded widget on a website*

### Option 2: Query Via API

**GraphQL endpoint:**

```
https://api.thegraph.com/subgraphs/name/clavis/locker
```

**Example query:**

```graphql
query {
  locks(where: { owner: "0xYourAddress" }) {
    id
    tokenId
    owner
    unlockDate
    isActive
    pool {
      token0 {
        symbol
      }
      token1 {
        symbol
      }
    }
  }
}
```

&#x20;*GraphQL query in action*

[Full API docs →](https://github.com/Shapeshifter-Technologies/realsafe-docs/blob/main/subgraph/README.md)

### Option 3: Custom Integration

**Using ethers.js:**

```javascript
const provider = new ethers.providers.JsonRpcProvider(RPC_URL);
const locker = new ethers.Contract(LOCKER_ADDRESS, ABI, provider);

// Get locks
const lockIds = await locker.getOwnerLockIds(ADDRESS);

// Get details
for (const lockId of lockIds) {
  const lock = await locker.getLock(lockId);
  console.log(`Lock ${lockId}:`, lock);
}
```

***

## Verification Checklist

When verifying a project's locked liquidity:

&#x20;*Visual verification checklist*

### Basic Checks

* [ ] Lock exists and is active
* [ ] Unlock date is reasonable (not 1 day)
* [ ] Amount locked is significant
* [ ] Owner address matches project team
* [ ] No custom conditions (unless explained)

### Advanced Checks

* [ ] Transaction hash verified on block explorer
* [ ] Lock creation date (recent = good)
* [ ] No suspicious transfers before locking
* [ ] Multiple locks with staggered unlocks (good)
* [ ] Extended locks show commitment

### Red Flags

* [ ] Very short lock duration (< 30 days)
* [ ] Lock owner is unknown address
* [ ] Custom condition without explanation
* [ ] Tiny amount locked (liquidity too low)
* [ ] Lock created then team sold tokens

***

## Sharing Proof of Lock

### Create Shareable Link

1. Go to lock details page
2. Click **"Share"** button
3. Copy link: `https://app.realsafe.io/lock/LOCK_ID`
4. Share on social media

&#x20;*Share your lock proof easily*

### Generate Proof Image

1. Lock details page
2. Click **"Generate Proof"**
3. Download image with lock details
4. Share image on [X](https://x.com/RealSafeLP)

&#x20;*Example proof badge for social sharing*

### Create Badge for Website

```html
<a href="https://app.realsafe.io/lock/123">
  <img src="https://app.realsafe.io/badge/123" 
       alt="Liquidity Locked" />
</a>
```

&#x20;*Badge displayed on project website*

***

## Common Verification Questions

### "How do I know it's real?"

* Check on block explorer (Monad Explorer)
* Verify contract is official Clavis contract
* Check transaction history
* All data is on-chain, cannot be faked

### "Can the team unlock early?"

* No, if unlock date hasn't passed
* Smart contract enforces unlock time
* No admin backdoor exists
* Even contract owner cannot unlock early

### "What if lock shows 'inactive'?"

* Lock was already unlocked
* Liquidity no longer locked
* Check unlock date and current date
* May have been unlocked legitimately

### "Multiple locks vs single lock?"

Both are fine:

* **Single large lock**: Simple, clear
* **Multiple staggered locks**: Vesting schedule, progressive unlocks
* Check total locked amount across all locks

***

## Next Steps

* [**Locking Guide**](https://docs.realsafe.app/user-guides/locking-liquidity) - Lock your own liquidity
* [**FAQ**](https://docs.realsafe.app/user-guides/faq) - More questions answered
* [**Developer Docs**](https://docs.realsafe.app/user-guides/broken-reference) - Build verification tools

***

**Questions? Reach out on** [**X**](https://x.com/RealSafeLP)
