Skip to content

Commit 3cff802

Browse files
feat: update staking config in Referee
1 parent 4cc9813 commit 3cff802

File tree

2 files changed

+29
-18
lines changed

2 files changed

+29
-18
lines changed

infrastructure/smart-contracts/contracts/upgrades/referee/Referee11.sol

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -235,16 +235,27 @@ contract Referee11 is Initializable, AccessControlEnumerableUpgradeable {
235235
event NewBulkSubmission(uint256 indexed challengeId, address indexed bulkAddress, uint256 stakedKeys, uint256 winningKeys);
236236
event UpdateBulkSubmission(uint256 indexed challengeId, address indexed bulkAddress, uint256 stakedKeys, uint256 winningKeys, uint256 increase, uint256 decrease);
237237

238-
function initialize() public reinitializer(8) {
238+
// function initialize() public reinitializer(8) {
239239

240-
maxStakeAmountPerLicense = 200 * 10 ** 18;
241-
maxKeysPerPool = 100_000;
240+
// maxStakeAmountPerLicense = 200 * 10 ** 18;
241+
// maxKeysPerPool = 100_000;
242242

243-
// Updated base chance to 0.01
244-
stakeAmountBoostFactors[0] = 150; // 0.015
245-
stakeAmountBoostFactors[1] = 200; // 0.02
246-
stakeAmountBoostFactors[2] = 300; // 0.03
247-
stakeAmountBoostFactors[3] = 700; // 0.07
243+
// // Updated base chance to 0.01
244+
// stakeAmountBoostFactors[0] = 150; // 0.015
245+
// stakeAmountBoostFactors[1] = 200; // 0.02
246+
// stakeAmountBoostFactors[2] = 300; // 0.03
247+
// stakeAmountBoostFactors[3] = 700; // 0.07
248+
// }
249+
250+
function initialize() public reinitializer(9) {
251+
252+
maxStakeAmountPerLicense = 227 * 10 ** 18;
253+
maxKeysPerPool = 131_872;
254+
255+
stakeAmountTierThresholds[0] = 450_000 * 10 ** 18;
256+
stakeAmountTierThresholds[1] = 3_000_000 * 10 ** 18;
257+
stakeAmountTierThresholds[2] = 6_000_000 * 10 ** 18;
258+
stakeAmountTierThresholds[3] = 12_000_000 * 10 ** 18;
248259
}
249260

250261
modifier onlyPoolFactory() {

infrastructure/smart-contracts/scripts/upgradeReferee.mjs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,22 @@ async function main() {
66
const [deployer] = (await ethers.getSigners());
77
const deployerAddress = await deployer.getAddress();
88
console.log("Deployer address", deployerAddress);
9-
const referee = await ethers.getContractFactory("Referee8");
9+
const referee = await ethers.getContractFactory("Referee11");
1010
console.log("Got factory");
1111
try {
12-
await upgrades.upgradeProxy(config.refereeAddress, referee, { call: { fn: "initialize", args: [] } });
12+
await upgrades.upgradeProxy(config.refereeAddress, referee, { redeployImplementation: "always", call: { fn: "initialize", args: [] } });
13+
console.log("Upgraded");
14+
15+
await run("verify:verify", {
16+
address: config.refereeAddress,
17+
constructorArguments: [],
18+
});
19+
console.log("verified")
1320

1421
} catch (error) {
1522
console.error("Failed upgrade", error)
1623
return;
17-
18-
} console.log("Upgraded");
19-
20-
await run("verify:verify", {
21-
address: config.refereeAddress,
22-
constructorArguments: [],
23-
});
24-
console.log("verified")
24+
}
2525
}
2626

2727
// We recommend this pattern to be able to use async/await everywhere

0 commit comments

Comments
 (0)