Commit Graph

411 Commits

Author SHA1 Message Date
Amir Bandeali
9a5752fff9 Remove unused param in Pool struct 2019-10-14 09:45:37 +09:00
Amir Bandeali
c21932d149 Remove _creditRewardsToPool and remove return values from finalizePool 2019-10-13 17:31:55 +09:00
Amir Bandeali
b0699fc238 Always set cumulative rewards when _withdrawAndSyncDelegatorRewards is called 2019-10-13 17:31:55 +09:00
Amir Bandeali
8bf7c4cf48 Remove unnecessary assert 2019-10-13 17:31:55 +09:00
Lawrence Forman
9f6d113fe8 Merge pull request #2255 from 0xProject/fix/3.0-audit/staking/LibFixedMath-arithmetic-overflows
Fix LibFixedMath arithmetic overflows
2019-10-12 07:38:05 +09:00
Greg Hysen
361576814c Removed loadSyncedBalance and loadUnsyncedBalance 2019-10-10 15:51:24 +09:00
Amir Bandeali
7e58385a78 Separate immutable contracts, only inherit as needed 2019-10-10 15:00:35 +09:00
Lawrence Forman
063d6ff24e @0x/contracts-staking: Add more overflow safeguards to LibFixedMath. 2019-10-10 09:16:01 +09:00
Lawrence Forman
a42f3d189c @0x/contracts-staking: Implement better overflow detection in LibFixedMath. 2019-10-10 09:16:01 +09:00
Amir Bandeali
93edb083fa Remove payable fallback from IStakingProxy, fix linting errors 2019-10-09 17:27:37 +09:00
Amir Bandeali
9e41c648dc Add backstop tests 2019-10-09 17:27:37 +09:00
Amir Bandeali
a7ef54dbff Implement ZrxVaultBackstop 2019-10-09 17:27:37 +09:00
Amir Bandeali
414084a7ad Track state of read-only mode in stakingProxy 2019-10-09 17:27:37 +09:00
Amir Bandeali
681e6eab7a Cleanup language used in comments and variable names 2019-10-09 17:15:25 +09:00
Amir Bandeali
cbd0ca4b60 Make currentEpoch uint64 type, change INACTIVE => UNDELEGATED, and make global balances state a mapping from uin8 => StoredBalance 2019-10-09 17:15:25 +09:00
Amir Bandeali
1626566f93 Change getBalanceOfVault => getBalanceOfZrxVault 2019-10-09 17:15:25 +09:00
Amir Bandeali
ac75053f69 Remove unused rich revert 2019-10-09 17:15:25 +09:00
Amir Bandeali
13afc65b54 Do not store global inactive state 2019-10-09 17:15:25 +09:00
Amir Bandeali
2e36c7ef83 Remove ACTIVE state 2019-10-09 17:15:25 +09:00
Amir Bandeali
43399a9ad9 Refactor tests to use new getters 2019-10-09 17:15:25 +09:00
Amir Bandeali
7b379f3933 Simplify withdrawal flow and storage layout 2019-10-09 17:15:25 +09:00
Amir Bandeali
f8ac986a0f Remove unused struct field 2019-10-09 17:14:28 +09:00
Greg Hysz
7ac7f45c4a Merge pull request #2250 from 0xProject/cleanup/staking/simplifyMakers
Simplify Makers Interactions with Staking Pools
2019-10-08 11:25:07 +09:00
Greg Hysen
b3c7ccec57 Changed nextPoolId to lastPoolId 2019-10-08 10:43:18 +09:00
Lawrence Forman
d3dcf7fb0c Merge pull request #2247 from 0xProject/fix/3.0-audit/staking/shadowed-variable
fix `_computeUnfinalizedDelegatorReward()` shadowed variable and function mutability
2019-10-07 18:50:32 -05:00
Greg Hysen
a0f5a8b64b Simplify Makers Interactions with Staking Pools.
- No longer an upper limit on how many makers can be in a pool.
- No longer a handshake for a maker to join a pool.
- No longer any special powers given to makers.
- Pool Id starts at 1 and increments by 1.
2019-10-08 06:00:24 +09:00
Lawrence Forman
6825eb442b @0x/contracts-staking: Fix shadowed variable in MixinStakingPoolRewards._computeUnfinalizedDelegatorReward() and make the function pure. 2019-10-05 17:22:46 -05:00
Alex Towle
3c6957095d @0x:contracts-integrations Addressed review feedback 2019-10-04 15:42:36 -07:00
Amir Bandeali
b5492bb023 Add ZrxVault testnet addresses to deployment constants 2019-09-30 19:00:17 -07:00
Amir Bandeali
be173a9970 Add sender as authorized address before calling init in test contracts 2019-09-30 17:36:37 -07:00
Amir Bandeali
8b2b500414 Remove authorization of owner in StakingProxy after init is called in constructor 2019-09-30 17:36:37 -07:00
Amir Bandeali
98d1f5405a Do not authorize owner in ZrxVault constructor 2019-09-30 17:36:37 -07:00
Amir Bandeali
98106ca8a2 Fix test conttracts 2019-09-30 09:37:53 -07:00
Amir Bandeali
f17c6b0a83 Remove unused IAssetProxy imports 2019-09-29 15:45:27 -07:00
Amir Bandeali
57ca601be1 Remove wethAssetProxy and wethAssetData from staking contract 2019-09-29 15:45:08 -07:00
Michael Zhu
6cfc17de35 MixinStakeStorage unit tests 2019-09-27 13:01:20 -07:00
Alex Towle
b178d025b5 @0x:contracts-staking Added unit tests for MixinExchangeManager 2019-09-25 15:32:02 -07:00
Lawrence Forman
96c8da9fdd Merge pull request #2207 from 0xProject/fix/3.0/improve-readability
Improve readability, fix `_trySetCumulativeReward` logic
2019-09-25 17:14:06 -04:00
Greg Hysen
b9b135cfa2 Finished removing outdated contract comments 2019-09-25 13:41:27 -07: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
9e3331d018 Fix ordering of function calls, remove optimization in _forceSetCumulativeReward 2019-09-25 11:31:30 -07:00
Amir Bandeali
4440075425 Inline _forceSetMostRecentCumulativeRewardEpoch 2019-09-25 11:03:26 -07:00
Amir Bandeali
25cb1c1138 Remove epoch param that is always equivalent to currentEpoch 2019-09-25 10:58:16 -07:00
Amir Bandeali
22a6de48ae Remove arguments that are unnecessarily passed around 2019-09-25 10:43:14 -07:00
Amir Bandeali
d07005dcbe Change increment -> increase and decrement -> decrease 2019-09-24 23:04:37 -07:00
Michael Zhu
dc06497cae consolidate MixinVaultCore and ZrxVault 2019-09-24 23:04:17 -07:00
Amir Bandeali
410b9c50d3 Flatten _withdrawAndSyncDelegatorRewards function, fix bug where cumulative rewards are always reset 2019-09-24 23:01:31 -07:00
Amir Bandeali
98698f702f Remove redundant inheritance and imports 2019-09-24 18:47:27 -07:00
Amir Bandeali
4784131dca Merge pull request #2203 from 0xProject/feat/3.0/consolidate-rich-reverts
Cleanup rich reverts
2019-09-24 18:32:41 -07:00