AnyStake Testnet — Phase 1

The time has finally arrived… it’s time for…

wait for it…

AnyStake Testnet

It took some time, but we had to rework our copy in the last weeks.
Ethereum fees and prices were putting a massive pressure on contracts, and reducing gas costs became the #1 priority for us.
Our legendary dev QuantSoldier literally cracked the code and came with innovative ideas. Now it’s time to test all this :-)

Please follow the instructions below to begin participating.

Tests will be performed on the Rinkeby Testnet and will happen in two Phases.

Phase 1:

Phase 1 will be conducted using direct interactions with the contracts using Etherscan.io or Remix (don’t worry, we’ll show you how it’s done!). There will be no front-end for this, but it’s not difficult and we also believe that everybody should know how to use etherscan to interact with contracts. It can be a life saver to get funds when front-ends are deactivated or not-accessible.

Phase 2:

Here comes the UI! Phase 2 will be conducted through the website UI, still using the Rinkeby test network.

At this stage, both the AnyStake and Regulator contracts have been deployed to the TestNet and are ready to go!

Switching to the Rinkeby Testnet in 3 steps:

1. Click the Metamask Icon in your browser.

2. Click on the dropdown menu “Ethereum Mainnet”.

3. Click on “Rinkeby Test Network”. Done!

Congrats! You just connected to the Rinkeby Testnet!

Please don’t forget to switch back to the Mainnet when you use Uniswap or other contracts. Metamask will stay on the Rinkeby testnet until you change it back.

When you are interacting on Etherscan, you will need to “Connect to Web3” to allow Metamask to push data to it:

Just click on “Connect to Web3” and allow Metamask.

Now you are ready to roll!

Getting Tokens and Testnet ETH

Like on Mainnet, you will need ETH to interact with contracts. Here’s how to get some

1. Get some Rinkeby ETH from the Faucet here: https://faucet.rinkeby.io/

(Note: You need a Twitter account)

2. Buy some DFT and DFTPv2 on Uniswap (on TESTNET Rinkeby)

3. Add liquidity to DFT and DFTPv2 on Uniswap, you will get UNIV2 testnet tokens.

4. Get some Testnet Staking Tokens. (named 8BALL and 1FEE)

After following the links to Etherscan below, click “Connect to Web3” and choose Metamask. Then, click faucetand then “Write” to create a transaction. Approve the transaction and wait for confirmation, you will then receive 100 test tokens! Alternatively, you can purchase these tokens from Rinkeby Uniswap.

These test tokens mimic some of our favorite ERC20 tokens. 8BALL uses 8 decimals like everyone’s favorite wrapped version of Bitcoin (wBTC). 1FEE burns 1% of it’s supply on each transfer, which functions like popular Fee-On-Transfer tokens (CORE).

Using AnyStake via Etherscan

1. View the AnyStake Contract here: https://rinkeby.etherscan.io/address/0x7c75A485F4eE40a3dde1CD773722e1886DAe6d69#code

2. Approve each token to be staked in AnyStake. Visit the Etherscan for each token and click “approve”. For the “spender” field, enter this address: 0x7c75A485F4eE40a3dde1CD773722e1886DAe6d69. For the “value field, enter this number 100000000000000000000000000. (yeah, it’s a lot of zeros).
Click “Write” and approve the transaction. This will allow you to stake up to 100 million of each token in AnyStake.
This will allow you to interact with AnyStake, as you just authorized (“approved”) the contract to use the tokens.

3. Go to the AnyStake contract and stake each of your tokens! Use the following parameters to call the deposit function. If everything works, you should also receive 1 Rinkeby DFTPv2!

Please DO NOT send tokens directly to the contract, AnyStake will not be able to “know” you did and update your stake.

  • AnyStake contract link: https://rinkeby.etherscan.io/address/0x7c75A485F4eE40a3dde1CD773722e1886DAe6d69#writeContract
  • Deposit Rinkeby DFT/ETH UNI-V2: pid = 0 , amount = # of coins I have + 18 zeroes, i.e. for 10 tokens = 10000000000000000000
  • Deposit Rinkeby DFTPv2/ETH UNI-V2: pid = 1, amount = # of coins I have + 18 zeroes, i.e. for 10 tokens = 10000000000000000000
  • Deposit 8BALL: pid = 2, amount = # of coins I have + 8 zeroes, i.e. for 10 tokens = 1000000000
  • Deposit 1FEE: pid = 3, amount = # of coins I have + 18 zeroes, i.e. for 10 tokens = 10000000000000000000

4. You can “claim” your accumulated rewards by either depositing more tokens, withdrawing your stake, or claiming. You can also call the updatePool(pid) function to manually update your rewards without claiming. This forces update the pool to take into account new accumulated rewards.
IMPORTANT: The DFT/ETH and DFTPv2/ETH pools pay out FIVE TIMES (5x) the rewards as the other ERC20 token pools.

(Note: This number is subject to change)

5. On withdrawal, you will be charged a flat 5% fee on your staked tokens which is used to buyback DFT from Uniswap and add to the AnyStake reward pool.
IMPORTANT: This does NOT apply to the DFT/ETH or DFTPv2/ETH pools!

6. You can you view your current rewards for each pool by calling the pending(pid, address) function on the AnyStake contract here: https://rinkeby.etherscan.io/address/0x7c75A485F4eE40a3dde1CD773722e1886DAe6d69#readContract

Congratulations! You are an AnyStake aficionado now!

Using the Regulator

We’ll explain the details of the regulator in a future article, but it’s an important piece of the DFT ecosystem, and truly puts DFTP back at the center of the room

1. View the Regulator Contract here: https://rinkeby.etherscan.io/address/0x048f71f079c29b6c2321141a7b5fbc595e6d9c7a#code

2. Approve each token to be staked in AnyStake. Visit the Etherscan for each token and click “approve”. For the “spender” field, enter this address: 0x048f71f079c29b6c2321141a7b5fbc595e6d9c7a. For the “value field, enter this number 100000000000000000000000000. Click “Write” and approve the transaction. This will allow you to stake up to 100 million of each token in AnyStake.

3. Go to the Regulator contract and stake each of your tokens! Use the following parameters to call the deposit function.

4. You can claim your accumulated rewards by depositing more tokens, withdrawing your stake, or claiming. You can also call the updatePool() function to manually update your rewards without claiming.

5. The Regulator collects a portion of rewards on each update. On withdrawal, you will be charged a flat 10% fee on your staked DFTPv2. The Regulator then decides whether to buy DFT or DFTP based on each token’s time-weighted price. If we buy DFT, we add it to the rewards pool. If we buy DFTPv2, we burn it. This effectively regulates the price of the two assets, the supply of DFTPv2, and gives DFTPv2 stablecoin-like features.

6. You can you view your current rewards for each pool by calling the pending(pid, address) function on the Regulator contract here: https://rinkeby.etherscan.io/address/0x048f71f079c29b6c2321141a7b5fbc595e6d9c7a#readContract

Remarkable! You have now mastered the Regulator!!
Here’s your reward:
https://www.youtube.com/watch?v=BO3PtJxumF0

If you made it this far, work well done. The AnyStake Testnet is a critical step to ensuring that we deliver a quality, safe product that redefines ERC20 staking.

Stay tuned for the Mainnet release of our updated Governance contract and the DFTPv2 airdrop!

— The DeFiat Team

Check our new Twitter: https://twitter.com/DefiatOfficial

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store