Amir Bandeali
1885957bd3
Update tests to start at epoch 1
2019-10-21 22:27:06 -07:00
Lawrence Forman
54a03eacd6
@0x/contracts-staking
: Refactor MixinCumulativeRewards
and MixinStakingPoolRewards
to better encapsulate cumulative rewards.
...
`@0x/contracts-staking`: Make sure we don't overwrite an existing CR.
`@0x/contracts-staking`: Remove the need to initialize cumulative rewards when creating a pool.
`@0x/contracts-staking`: Just return an empty CR in `_getCumulativeRewardAtEpoch()` if one can't be found.
2019-10-14 12:36:26 +10:00
Amir Bandeali
ce6c05637f
Update cumulative rewards tracking tests
2019-10-13 17:31:55 +09:00
Lawrence Forman
f925c35344
@0x/contracts-staking: Always do
_withdrawAndSyncDelegatorRewards() before staking operations and always add a CR (if unset) in
_withdrawSyncDelegatorRewards()`.
2019-09-25 16:34:06 -04:00
Lawrence Forman
5b77e2c8ac
@0x/contracts-staking
: Fix stake accounting.
2019-09-25 15:29:22 -04:00
Amir Bandeali
c1871b5bca
Fix xumulative reward tests
2019-09-24 23:01:44 -07:00
Greg Hysen
a012eb0cae
Updated changelog and ran prettier
2019-09-24 13:32:20 -07:00
Greg Hysen
08c805a489
Removed explicit dependency for delegator on the next epoch after staking.
2019-09-24 13:32:20 -07:00
Greg Hysen
5b595dd080
Remove reference counting for cumulative rewards
2019-09-24 13:32:20 -07:00
Lawrence Forman
6a29654d7d
@0x/contracts-staking
: Updating tests and making the contracts testable.
2019-09-22 12:20:04 -04:00
Lawrence Forman
3ad7728a0e
@0x/contracts-staking
: Remove IStructs.CumulativeRewardInfo
, etc.
...
`@0x/contracts-staking`: Convert all rewards to WETH.
`@0x/contracts-staking`: Style changes.
`@0x/contracts-staking`: Address misc. review comments.
`@0x/contracts-staking`: Make `LibFractions` scaling a separate step.
2019-09-22 12:17:05 -04:00
Lawrence Forman
b43fa88606
@0x/contracts-staking
: All tests but rewards_test
working.
2019-09-22 12:13:24 -04:00
Greg Hysen
43d1d0b217
more explicit sanity checks for computing balance in interval (previously all failed with div-by-zero)
...
typos
2019-09-16 18:57:21 -07:00
Greg Hysen
e1d51bae73
Tests are passing and ran linter
2019-09-16 16:02:50 -07:00
Greg Hysen
f9163ccc01
Improved readability of API for cumulative rewards
2019-09-16 15:18:08 -07:00
Greg Hysen
12f0797ace
Reference counting for rewards, plus unit tests for cumulative rewards.
2019-09-14 00:04:52 -07:00