11/**
22 * https://contributing.kleros.io/smart-contract-workflow
33 * @authors: [@fnanni-0]
4- * @reviewers: [@shalzz, @unknownunknown1*, @MerlinEgalite*, @hbarcelos]
4+ * @reviewers: [@shalzz* , @unknownunknown1*, @MerlinEgalite*, @hbarcelos* ]
55 * @auditors: []
66 * @bounties: []
77 * @deployments: []
@@ -164,7 +164,6 @@ contract xKlerosLiquid is Initializable, TokenController, Arbitrator {
164164 uint public maxDrawingTime; // The maximum drawing time.
165165 // True if insolvent (`balance < stakedTokens || balance < lockedTokens`) token transfers should be blocked. Used to avoid blocking penalties.
166166 bool public lockInsolventTransfers;
167- uint public maxTotalStakeAllowed; // In order to prevent too many jurors from migration to xDai from Mainnet, a maximum xPNK stake is set.
168167 uint public totalStake;
169168 // General Storage
170169 Court[] public courts; // The subcourts.
@@ -215,7 +214,6 @@ contract xKlerosLiquid is Initializable, TokenController, Arbitrator {
215214 * @param _jurorsForCourtJump The `jurorsForCourtJump` property value of the general court.
216215 * @param _timesPerPeriod The `timesPerPeriod` property value of the general court.
217216 * @param _sortitionSumTreeK The number of children per node of the general court's sortition sum tree.
218- * @param _maxTotalStakeAllowed The maximum amount of wrapped PNK that is allowed to be staked in this contract.
219217 */
220218 function initialize (
221219 address _governor ,
@@ -229,8 +227,7 @@ contract xKlerosLiquid is Initializable, TokenController, Arbitrator {
229227 uint _feeForJuror ,
230228 uint _jurorsForCourtJump ,
231229 uint [4 ] _timesPerPeriod ,
232- uint _sortitionSumTreeK ,
233- uint _maxTotalStakeAllowed
230+ uint _sortitionSumTreeK
234231 ) public initializer {
235232 // Initialize contract.
236233 governor = _governor;
@@ -241,7 +238,6 @@ contract xKlerosLiquid is Initializable, TokenController, Arbitrator {
241238 lastPhaseChange = now ;
242239 lockInsolventTransfers = true ;
243240 nextDelayedSetStake = 1 ;
244- maxTotalStakeAllowed = _maxTotalStakeAllowed;
245241
246242 // Create the general court.
247243 courts.push (Court ({
@@ -306,13 +302,6 @@ contract xKlerosLiquid is Initializable, TokenController, Arbitrator {
306302 maxDrawingTime = _maxDrawingTime;
307303 }
308304
309- /** @dev Changes the `maxTotalStakeAllowed` storage variable.
310- * @param _maxTotalStakeAllowed The new value for the `maxTotalStakeAllowed` storage variable.
311- */
312- function changeMaxTotalStakeAllowed (uint _maxTotalStakeAllowed ) external onlyByGovernor {
313- maxTotalStakeAllowed = _maxTotalStakeAllowed;
314- }
315-
316305 /** @dev Creates a subcourt under a specified parent court.
317306 * @param _parent The `parent` property value of the subcourt.
318307 * @param _hiddenVotes The `hiddenVotes` property value of the subcourt.
@@ -899,16 +888,6 @@ contract xKlerosLiquid is Initializable, TokenController, Arbitrator {
899888 if (! (_stake == 0 || pinakion.balanceOf (_account) >= newTotalStake))
900889 return false ; // The juror's total amount of staked tokens cannot be higher than the juror's balance.
901890
902- /** If maxTotalStakeAllowed was reduced through governance,
903- * totalStake could be greater than maxTotalStakeAllowed.
904- * If this happens, removing stake is still allowed even if
905- * totalStake is greater than maxTotalStakeAllowed afterwards.
906- */
907- if ((totalStake - juror.stakedTokens + newTotalStake > maxTotalStakeAllowed) && (newTotalStake > juror.stakedTokens))
908- return false ; // Maximum PNK stake reached.
909- // Update total stake.
910- totalStake = totalStake - juror.stakedTokens + newTotalStake;
911-
912891 // Update juror's records.
913892 juror.stakedTokens = newTotalStake;
914893 if (_stake == 0 ) {
0 commit comments