PoolTogether is a prize-linked savings account built on Ethereum. This project contains the Ethereum smart contracts that power the protocol.
If you want to run PoolTogether locally in an isolated test environment check out the PoolTogether Mock project
Network | Contract | Address |
---|---|---|
mainnet | Pool (abi) | 0xb7896fce748396EcFC240F5a0d3Cc92ca42D7d84 |
Clone the repo and then install deps:
$ yarn
Copy over .envrc and allow direnv:
$ cp .envrc.example .envrc
$ direnv allow
If you changed the mnemonic, you should update the ADMIN_ADDRESS variable in .envrc
with another address (I use the second address listed when ganache-cli
starts).
Start ganache-cli
:
$ yarn start
Now start a new zos session:
$ yarn session
Push out the local contracts:
$ yarn push
Migrate the contracts and bootstrap the data:
$ yarn migrate
yarn session-rinkeby
yarn push
yarn migrate-rinkeby
Current interest rate can be pulled from the CErc20 using:
CErc20.markets() and you should get back a tuple that contains, amoung other things, a supplyRatePerBlock. This is the current per-block interest rate (scaled up by 1e18).
CErc20 on Rinkeby: 0x61bbd7bd5ee2a202d7e62519750170a52a8dfd45