Cover photo

Interacting with vePERP contract on Etherscan

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 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

(You should confirm the contract address is correct here.)

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.

post image

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:

post image

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.

post image

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

post image

3. Paste the timestamp into Unix Timestamp, then press “Convert”.

post image

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

post image

Read the vePERP balance

  1. To view your vePERP balance, scroll to 4. balanceOf

  2. Input your wallet address, and press “Query”

post image

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)
(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.

post image

Locking PERP

1. Scroll down to 9. create_lock.

post image

2. Go to Unix Timestamp, 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.

post image

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)

post image

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.

post image
post image
  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.

post image

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

4. Go to Unix Timestamp, 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 😉

post image

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

post image

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 🤷

post image

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:

post image

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

PERP Reward Contract: 0x5ebe7ee72ab56f82194e61d95d5a0a32cdf722e1

(You should confirm the contract address is correct here.)

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.

post image

$USDC Reward Claim

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

post image

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

USDC Reward contract: 0x142408558527b1a63b736252472e35e1110829cc

(You should confirm the contract address is correct here.)

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.

post image

You're finished 👍