* fix(package): corrects some naming in package.json
* fix(ganache): newer version works on node v14+
* fix(ganache): downgrade ganache to earlier version to avoid false revert errors
* update ConfigStoreParams
Signed-off-by: Nick Pai <npai.nyc@gmail.com>
* change tokenScaling
Signed-off-by: Nick Pai <npai.nyc@gmail.com>
* Update index.js
* fix(script): use 2.0 core release and improve example in readme
Signed-off-by: John Shutt <john.d.shutt@gmail.com>
* improve(yarn): run yarn
Signed-off-by: John Shutt <john.d.shutt@gmail.com>
The `FundingRateApplier`'s `proposeFundingRate` method has this require constraint:
```
require(
timestamp > updateTime && timestamp >= currentTime.sub(_getConfig().proposalTimePastLimit),
“Invalid proposal time”
);
```
In English: the proposal timestamp must be GREATER than the last update time, and also GREATER than the current time minus some buffer period, the "proposalTimePastLimit".
The RHS of the require statement ensures that no proposer can propose prices too far in the past (i.e. we want "live" funding rates).
However, the OptimisticOracle also requires that all timestamps be in the past (can't propose timestamps in the future). Therefore, by setting `proposalTimePastLimit = 0`, you practically make it impossible to propose new rates because no stamps can satisfy the three following constraints:
1. Timestamp > `lastUpdateTime` (`FundingRateApplier.proposeFundingRate()`)
2. Timestamp > currentTime (`FundingRateApplier.proposeFundingRate()`)
3. Timestamp <= currentTime (`OptimisticOracle.requestPrice()`)
* updating default parameters to work for Kovan and not mainnet
* adding comment to also list mainnet weth address, and automatically getting store address