# Interacting with vePERP contract on Etherscan

By [goCutCreator](https://paragraph.com/@gocutcreator) · 2023-05-05

---

> **TL;DR**
> 
> Web3.0 users often need to use etherscan to interact with smart contracts when there is no UI available. This can happen in cases like revoking contract or facing web access restrictions.
> 
> This article will teach you how to use **vePERP smart contract on Etherscan**. If you are a [Lazy River](https://token.perp.com/lazy-river) user and you can’t access the website, don’t worry. This guide will show you how to interact with the smart contract without the web UI. It’s not as difficult as it sounds. You just need a clear guide to help you learn the basics.

Let’s Start!
------------

Let’s take a look at vePERP on Etherscan. You can find the vePERP smart contract here:

**vePERP Vault Contract:** [0xd360b73b19fb20ac874633553fb1007e9fcb2b78](https://optimistic.etherscan.io/address/0xd360b73b19fb20ac874633553fb1007e9fcb2b78#readContract)

(You should confirm the contract address is correct [here](https://metadata.perp.exchange/v2/voting-escrow/optimism.json).)

When you click on the above URL, you will land on the vePERP contract on Etherscan. As shown in the example below, you can go to the Contract Tab and choose either Read or Write Contract.

![](https://storage.googleapis.com/papyrus_images/909ee01c5a6333b0398d2e7c2ffc7d740e2cceb1002bcab5de524e1648c699c5.gif)

### Read the Lock Period

The Lazy River UI shows you your vePERP balance and the end date of your Lock Period, as seen in the screenshot below:

![](https://storage.googleapis.com/papyrus_images/205247d72fce6c53cd9209dbbd73be9c9420624e136a2d51ede5ba2ed236ef36.png)

To get the information on your vePERP balance and lock period, you can follow these steps on Etherscan:

1\. To find out when your lock period ends, go to the Tab “Read Contract” and scroll down to `3. locked__end`.

![](https://storage.googleapis.com/papyrus_images/ee55a329aafdc7a0ea5138f9774cfe06cef36b26cc513dd041199063b5d7c51a.gif)

2\. Enter your wallet address, press “Query” and you will see the timestamp for the end of lock time as the output.

![](https://storage.googleapis.com/papyrus_images/9ea9ac35c6387225cac2b06d007b4cd4a9bdeb532393fc38060fd6196d109231.png)

3\. Paste the timestamp into [Unix Timestamp](https://www.unixtimestamp.com/), then press “Convert”.

![](https://storage.googleapis.com/papyrus_images/a18083513599a9b084b589c746844b0f658df7f4e647efdfe74a91ff05d53660.png)

4\. The converter will show you the timestamp for the end of lock time, which matches the one on Lazy River UI.

![](https://storage.googleapis.com/papyrus_images/32e59a52cdfcbe8c401e250cf5ef58c55d06f7fd45912f20c81e738a9478cfda.png)

### Read the vePERP balance

1.  To view your vePERP balance, scroll to `4. balanceOf`
    
2.  Input your wallet address, and press “Query”
    

![](https://storage.googleapis.com/papyrus_images/047f61bd1afd31893be7f0ac1c5f0f16adb124cabdaf956eb4de93f989943598.png)

3\. The output must be divided by `10^18` e.g. `4443629659406089788577 = 4443.63 vePERP`

### Read the PERP balance

1.  To view your locked PERP balance, scroll to `20. Locked`
    
2.  Input your wallet address, and press “Query”
    
3.  The output must be divided by 10^18 e.g. `4630216856829629600337 = 4630.22 vePERP`
    

![(The second value is the timestamp)](https://storage.googleapis.com/papyrus_images/d3e7ac28e00c24387678d697cc5ac7397fc42d05e4d4e33654ae8405eaf4301c.png)

(The second value is the timestamp)

### Connecting Wallet

In order to write to the vePERP contract, you will need to connect to your web3 wallet. Click “Connect to Web3” and after your wallet prompts you with the password, enter your password and you are ready to continue to the next step.

![](https://storage.googleapis.com/papyrus_images/63e2ca637753d2349eb967845c8884c8bd78f8036e40582c23872bd280ead708.gif)

### Locking PERP

1\. Scroll down to `9. create_lock.`

![](https://storage.googleapis.com/papyrus_images/aeb8618871bb7c8609dde393d806f2e82ac79fc6a64b74cd2a7ff21483467288.gif)

2\. Go to [Unix Timestamp](https://www.unixtimestamp.com/), enter a Date & Time that PERP will be locked through, press “Convert” and Copy the Unix Timestamp. Your PERP will be locked until this date. _Note: You cannot use a date more than 1 year in the future - the transaction will fail._

![](https://storage.googleapis.com/papyrus_images/8be9c8d4c8fb60b893e01f03996ef9ef2694752c4f07a50ceb3ce7a810397597.png)

> **Pro Tip**
> 
> Choose a lock time based on the current timestamp plus a fixed amount of time:
> 
>     Lock 1 year: current time + 31536000
>     Lock 6 months: current time + 15768000 
>     Lock 3 months: current time + 7884000 
>     Lock 1 month: current time + 2628000
>     

3\. Input the amount of PERP token to lock, the amount must be multiplied by 10^18 e.g. `5.5 PERP = 5500000000000000000`. Make sure the value entered didn’t contain a decimal point.

4\. Enter the timestamp you got from step 3 as the unlock time (it should be within one year from now)

![](https://storage.googleapis.com/papyrus_images/bcfcd513368b858f369a0812587304b11cd7709420590a3a2a81fd2989bca268.png)

5\. After entering the right value, click on “Write” and then submit the transaction._Note: lock time rounds down to the nearest week, so you will always lock 1 week less than the time you chose. E.g. if you add_ `current time + 31536000` _you will end up locking for 51 weeks._

### Increase Lock amount / Unlock Time

You can follow these steps to increase the amount and duration of your locked PERP if you have already locked some PERP before. This is equivalent to choosing Increase/Extend on Lazy River’s UI.

![](https://storage.googleapis.com/papyrus_images/9a67cc8a22dd113db3f846b2e4e4f5860f5fc5c8995abe14458c28ac78df1c66.png)

![](https://storage.googleapis.com/papyrus_images/76ea4c2bbf3b804a1943531b2c5424f7e9406a87d62fbc27a0121b8764312ca3.png)

1.  If you desire to lock more PERP, scroll down to `10. increase_amount`.
    
2.  Input the amount of PERP token to lock. The amount must be multiplied by 10^18. e.g. `5.5 PERP = 5500000000000000000`. Make sure the value entered didn’t contain a decimal point.
    

![](https://storage.googleapis.com/papyrus_images/d10c38b130092037a14e79187cba0d6f6c136c9a156ebf6cb117f50e28bd1502.png)

3\. If you desire to extend the lock period, scroll down to `11. increase_unlock_time`.

4\. Go to [Unix Timestamp](https://www.unixtimestamp.com/), enter a Date & Time that PERP will be locked through, press “Convert” and copy the Unix Timestamp. You can also use the “pro tip” above 😉

![](https://storage.googleapis.com/papyrus_images/8be9c8d4c8fb60b893e01f03996ef9ef2694752c4f07a50ceb3ce7a810397597.png)

4\. Enter the timestamp you got from step 3 as the unlock time (it should be within one year from now).

![](https://storage.googleapis.com/papyrus_images/0a1f78bdc4cbaee66abcc411b1d68cb7ce3cdba3a8f9a24c70ff2fd5d9c4d590.png)

### Withdraw PERP after lock expires

If you desire to withdraw PERP after it unlocks, scroll down to `12. Withdraw`.

You don’t need to enter anything, once you click on “Write” and then submit the transaction, it will withdraw the maximum amount. Partial withdraw does not seem possible 🤷

![](https://storage.googleapis.com/papyrus_images/1557d894a094bc72c5e14ceb2afeaaa7dc976e466de77f4508061e71775ed586.png)

### Locked $PERP Reward Claim

Lazy River now offers two types of rewards: $PERP (locked) and $USDC. You can claim the Locked PERP through the Lazy River’s UI by using the window shown below:

![](https://storage.googleapis.com/papyrus_images/429a5a1f059aa8468b5a609523f7e1f71ac6c2bd77141fbfaf348f69af117667.png)

1\. For the Locked PERP reward claiming on Etherscan, click on contract address below:

**PERP Reward Contract:** [0x5ebe7ee72ab56f82194e61d95d5a0a32cdf722e1](https://optimistic.etherscan.io/address/0x5ebe7ee72ab56f82194e61d95d5a0a32cdf722e1#writeContract)

(You should confirm the contract address is correct [here](https://metadata.perp.exchange/v2/optimism.json).)

2\. Go to the “Write Contract” tab and connect your wallet.

3\. Scroll to `3. Claim` for claiming Locked $PERP.

4\. Click “Write” and then submit the transaction, PERP reward will be transferred into your vePERP balance **with the same lock time** you have currently.

![](https://storage.googleapis.com/papyrus_images/28ed292b31f436b27644830a158f769585b80b9727b5b12ad516afdd4777a90a.png)

### $USDC Reward Claim

You can claim USDC through the Lazy River’s UI by using the window shown below:

![](https://storage.googleapis.com/papyrus_images/429a5a1f059aa8468b5a609523f7e1f71ac6c2bd77141fbfaf348f69af117667.png)

1\. For the USDC reward claiming on Etherscan, click on contract address below:

**USDC Reward contract:** [0x142408558527b1a63b736252472e35e1110829cc](https://optimistic.etherscan.io/address/0x142408558527b1a63b736252472e35e1110829cc#writeContract)

(You should confirm the contract address is correct [here](https://metadata.perp.exchange/v2/optimism.json).)

2\. Go to the “Write Contract” tab and connect your wallet.

3\. Scroll to `3. Claim` for claiming $USDC.

4\. Click “Write” and then submit the transaction, USDC reward will be transferred into your wallet.

![](https://storage.googleapis.com/papyrus_images/7da7bd9d691f1ef201f6121e34252a76b2253b45c290a2c8cbcb34c08b311165.png)

You're finished 👍
==================

---

*Originally published on [goCutCreator](https://paragraph.com/@gocutcreator/interacting-with-veperp-contract-on-etherscan)*
