Power Stake, unlock stake deposit and reward right away, liquid staking boost protocol helping users maximize staking investments. E.g.
- Stake 100 ETH for APR 5% per year, get 105 psETH minted tokens that represent the initial deposit and total profit for immediate use.
- When unlock is allowed (either at the end of the term or before), PowerStake smart contract burns 105 psETH from user wallet (after user approves PowerStake to do so) and send user initial deposit and stake profit in ETH, 100 ETH plus maximum 5 ETH for the APR profit depending on the time of the unlock.
- ERC20 mock for Wrapped ETH token address: 0xD9DCEF6341dd179c520CCF8217981Bb6a3a689b8
- PowerStake Token for WETH tokens address: 0x9E9a1ACe534f257502c78C37F032B06a8c3617c4
- Power Staking smart contract address: 0xe50F765f88E7Cf92cA2f33551A00f017db67eF1C
You can mint some WETH tokens on Rootstock testnet to stake it into Power Staking smart contract and get psWETH.
Node.js 16
Install via NVM:
# Install NVM
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
# Install recommended Node.js version for bepro-js
nvm install lts/gallium
# Set it on the working directory
nvm alias default lts/gallium
# Use the settled as default
nvm use default
# Confirm the procedure.
# Must show valid Node-js version on terminal if OK
node --versionRootstock local node
For more information on RSK node development, check Rootstock and Rootstock local node.
Once we have the rsk node file "rskj-core-6.1.0-ARROWHEAD-all.jar" (the moment this readme file was updated) downloaded in a specific folder we can run the following command in a separate terminal and leave it open to have a local rootstock node:
# Run rsk local node
java -classpath rskj-core-6.1.0-ARROWHEAD-all.jar -Drpc.providers.web.cors=* -Drpc.providers.web.ws.enabled=true co.rsk.Start --regtest# Install and update dependencies
npm iFor tests, we use Ganache.
Once installed, run in a separate terminal and leave it open:
# run ganache local test blockchain
npm run ganache:startIn a different terminal run:
# Run tests for development
npm run test
# Run tests for possibly other networks
truffle test --network rskTestnetOnce RSK local node is installed and running, compile migrate and test with truffle as usual:
# compile smart contracts
truffle compile
# migrate smart contracts
truffle migrate --network rskdev
# run tests
truffle test --network rskdevFor this feature, in the powerstake project root folder we need a file called ".secret" containing the seed phrase for the Rootstock wallet we use to migrate the smart contracts.
The file truffle-config.js is already prepared to handle Rootstock testnet deployment of smart contracts so we can use the following commands:
# compile smart contracts
truffle compile
# migrate smart contracts
truffle migrate --network rskTestnetContributions are welcome.