SharedStake Governance v2 Tutorial

Chimera Defi
6 min readAug 31, 2021

--

This will act as a tutorial for users on how to use Etherscan to start using SharedStakes governance v2 right away.

If you haven’t already please read the previous article detailing the changes, tokenomics and mechanisms and the reasoning behind them:

TOC

  1. Migration
  2. Sushiswap LP & Vote escrow locking
  3. Farming
  4. Token Migrator notes
  5. veSGT notes
  6. Safety notes
  7. Roadmap & coming soon
  8. Appendix — all contract links

Migrate old SGT into new SGT

First step is to migrate your old SGT tokens into the new SGT tokens.

  1. Approve the TokenMigrator contract on the old SGT token.
    Go to the read page for the old contract: https://etherscan.io/address/0x84810bcf08744d5862b8181f12d17bfd57d3b078#readContract
    Click balanceOf and enter your ETH address and hit query. Copy the returned number.
    Go to write contract and click approve
    Enter the number copied from the previous step in balanceOfinto rawAmount . You can also enter a very large number here directly.
    Enter the TokenMigrator address into spender : 0x9615460582Efa2a9b1d8D21e7E02afE43A415E13
    And click Write
  2. Second we need to get our new tokens.
    Go to the write contract page for the TokenMigrator
    Click migrate
    Enter your SGT token allowance from step 1 for the amount field
    Click write to start the transaction.

This will burn your old SGT and in turn transfer you the new SGT token.

** Please see TokenMigrator notes at the end for more details **

Add tokens to Sushiswap LP and voteEscrow (optional)

Secondly we want to add tokens to the vote-escrow contract to allow voting on snapshot page posts and making proposals. This pool also has by far the highest return rate of 50% of the tokens in farming. Please note, we allow early unlock unlike curve and other vote-escrow token, but doing so will currently burn 30% of the supplied tokens. We require LP tokens for the vote escrow.

  1. Add SGTv2-ETH into Sushiswap LP https://app.sushi.com/add/ETH/0x24C19F7101c1731b85F1127EaA0407732E36EcDD
  2. Go to the SLP token page on Etherscan https://etherscan.io/token/0x41bfba56b9ba48d0a83775d89c247180617266bc
    and approve the VoteEscrow contract at 0x21B555305E9d65c8b8ae232e60fd806eDc9c5D78 to spend your SLP tokens
  3. Go to the VoteEscrow contract
  4. Click write contract -> create_lock and enter the token amount you would like to lock and the number of days. This has to be less than or equal to how much you approved on the SLP token page.
    The max number of days is 1095. The minimum is 7.
    The minimum tokens required to be locked is greater than 100. (Note: 1 SLP is 1e18 tokens)
    Hit write and you should soon have your veSGT tokens.
  5. veSGT scaled with time, so a time of 1095 will get you a 1:1 conversion of SLP tokens to veSGT, 1 year will get you 66% less and so on.
  6. You can increase the lock time to mint more veSGT using the increase_unlock_time function
  7. You can increase the amount staked to mint more veSGT using the increase_amount function

Farming

Finally you can interact with the MasterChef contract to begin farming.

UPDATE: You can now use vfat tools for easier interaction at vfat.tools/sgt

  1. Go to the veSGT token page and approve the MasterChef contract to spend your tokens by clicking approve and entering the contract address and amount for the masterChef: 0x84B7644095d9a8BFDD2e5bfD8e41740bc1f4f412. For any of the other tokens you will have to do the same on their token page. (linked below)
  2. Go to the masterChef contract and click deposit. Enter the pool id for pid, the token amount and your address and click write.
    Pool ids, LP tokens and weights are as follows:
    0: SGTv2 — 0x24c19f7101c1731b85f1127eaa0407732e36ecdd — 10%
    1: vETH2-ETH SLP — 0x62b2a3cfa8e579631d255aefd53fecefd946a638–15%
    2: veSGT — 0x21B555305E9d65c8b8ae232e60fd806eDc9c5D78–50%
    3: SGTv2-ETH SLP — 0x41bfba56b9ba48d0a83775d89c247180617266bc — 15%
    4: vETH2–0x898bad2774eb97cf6b94605677f43b41871410b1–10%
  3. Enter your own address for the to field in the deposit function
  4. E.g. for staking 1 veSGT the entries will be:
    - pid (pool id): 2
    - amount: 1000000000000000000
    - to: <your address, e.g. for me 0xa1feaf41d843d53d0f6bed86a8cf592ce21c409e>
  5. Click deposit
  6. Current reward rate is 85,000 SGT per day or 340k SGT per quarter, similar to community proposed emissions from before. We will adjust this to increase early rewards if needed and decrease it later to be more comparable to other protocols like us to prevent overpaying for liquidity
  7. You can check your accrued rewards on the Read page via the pendingReward function by entering the same info

TokenMigrator Notes

  • To prevent the risk of rug pulled tokens re-entering supply a waiting period exists after you migrate. This gives us time to trace any evasion tactics.
  • If you are not on the allowlist, you will only get 10% of the tokens initially. There is a wait time of 5 days, after which you can click ReleaseTokens to get the remainder.
  • Being in the allowlist will get you 100% of your tokens on the migrate call, or remove the waiting period if you’ve already deposited tokens into the TokenMigrator.
  • If you think you’ve been added erroneously to the blocklist and the tokens are sent to the multisig instead, please reach out to me on Discord.
  • All LPs at the time of the rug who currently hold SGT tokens have pre-emptively been added to the allowlist, alongside other users who asked. If you want to be added to the allowlist, please ask in our discord or via DM.

veSGT notes

  • veSGT will become the only token with governance rights and will be needed to create or vote on snapshot.page proposals
  • Our vote escrow requires the user to deposit an LP token of SGT-ETH on Sushiswap. This was done on purpose as it brings more value to the protocol. There is higher risk, which is compensated with higher rewards, and allows users to contribute valuable liquidity to the protocol instead of just speculating.
  • Users can call emergencyWithdraw to withdraw their shares from our vote escrow contract, unlike Curve. But 30% of the stake will get burnt. This penalty can be changed via a governance proposal and vote later
  • RewardGauges will be deployed to be used with veSGT but for now users can bring up new farming reward weights and changes in Discord in a discussion and elevate that to a formal proposal

Safety Notes

Coming soon!

  • The token migration contract can burn all remaining tokens in it after 60 days. This is the deadline to get migrations into the new token done. The burn will reduce the tokens supply on Etherscan as well for better tracking
  • The vETH2-ETH SLP token rewards will be discontinued in favour of Saddle rewards in a bit so it’s not recommended if you want to save gas
  • A PR to vfat tools has been made to support the new farming contract
  • A native UI update for farming, veSGT locking and token migration is in the works
  • A video tutorial is in the works
  • We will be reaching out to Coingecko & CMC to get the listing updated
  • We will be reaching out Etherscan to get the token details for the new SGT token updated
  • Snapshot.page for Sharedstake will be updated to use the new veSGT tokens only. Additionally veSGT can be used for vote delegation
  • We will have to also reach out to update our listings in the following places and the community can help:
    - Zerion
    - Zapper
    - APY.vision
  • We will be looking to renew or start partnerships with the following protocols:
    - Rari
    - Ruler
    - Saddle
  • We will be renewing our Immunefi bug bounty after the treasury has vested enough to repay debts and we have validated any pre-existing bug bounties
  • We are looking for front-end engineers

Appendix

SGTv2 deployed to 0x24C19F7101c1731b85F1127EaA0407732E36EcDD at https://etherscan.io/address/0x24C19F7101c1731b85F1127EaA0407732E36EcDD

TokenMigrator deployed to 0x9615460582Efa2a9b1d8D21e7E02afE43A415E13 at https://etherscan.io/address/0x9615460582Efa2a9b1d8D21e7E02afE43A415E13

VeSGT deployed to 0x21b555305e9d65c8b8ae232e60fd806edc9c5d78 at https://etherscan.io/address/0x21b555305e9d65c8b8ae232e60fd806edc9c5d78#code

MasterChef deployed to 0x84B7644095d9a8BFDD2e5bfD8e41740bc1f4f412 at https://etherscan.io/address/0x84B7644095d9a8BFDD2e5bfD8e41740bc1f4f412

Non-user facing contracts

SimpleTimelock deployed to 0xC0AAB794F9D2aA7cE56B8BEB6cFfc71BC05c21FC at https://etherscan.io/address/0xC0AAB794F9D2aA7cE56B8BEB6cFfc71BC05c21FC

FundDistributor deployed to 0x38aa4CC003D9Ad84505bc7b096122402Db31f708 at https://etherscan.io/address/0x38aa4CC003D9Ad84505bc7b096122402Db31f708

founderVesting deployed to 0x0279eBC54179EBc5E5e65A9f036Db351233adDc6 at https://etherscan.io/address/0x0279eBC54179EBc5E5e65A9f036Db351233adDc6

treasuryVesting deployed to 0x2Cb4bdc030975f2ABdbbb984e87715505C51D5BC at https://etherscan.io/address/0x2Cb4bdc030975f2ABdbbb984e87715505C51D5BC

VoteEscrowFactory deployed to 0xeE5bd4b9C875BE3958b1255D181B8B3E978903b9 at https://etherscan.io/address/0xeE5bd4b9C875BE3958b1255D181B8B3E978903b9

--

--