Skip to content

Commit

Permalink
feat: adjust time for auction reset
Browse files Browse the repository at this point in the history
  • Loading branch information
raz-w-20230331 committed Sep 25, 2024
1 parent f7c83b3 commit 4692fe4
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions scripts/dev/update_bnb_mcr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ const BNB_CLIPPER = "0x14DD6c86d24A72b42648D9a642318375A26ed108";
const BNB_MAT = "1200000000000000000000000000"; // 120% mcr
const BNB_ILK =
"0x636541424e426300000000000000000000000000000000000000000000000000";
const TAU = "3600"; // 1 hour
const BNB_TAIL = "1200"; // 20 minutes elapsed before reset

//////////// Adjust BNB MCR ////////////
/// 1. deploy LinearDecrease contract
/// 2. set tau to 5 hours
/// 2. set tau to 1 hours
/// 3. set Clipper calc to new LinearDecrease
/// 4. set Clipper mat to new MCR
/// 5. verify LinearDecrease contract
Expand All @@ -20,15 +22,18 @@ async function main() {

console.log("LinearDecrease deployed to:", abaci.target);

const tau = "18000"; // 5 hours
await abaci.file(ethers.encodeBytes32String("tau"), tau);
await abaci.file(ethers.encodeBytes32String("tau"), TAU);

const Clipper = await ethers.getContractFactory("Clipper");
const clipper = Clipper.attach(BNB_CLIPPER);
await clipper["file(bytes32,address)"](
ethers.encodeBytes32String("calc"),
abaci.target
);
await clipper["file(bytes32,uint256)"](
ethers.encodeBytes32String("tail"),
BNB_TAIL
);

const Spotter = await ethers.getContractFactory("Spotter");
const spotter = Spotter.attach(SPOTTER);
Expand All @@ -42,7 +47,8 @@ async function main() {

console.log("tau set to: ", (await abaci.tau()).toString());
console.log("Clipper calc set to: ", (await clipper.calc()).toString());
console.log("Clipper mat set to: ", newMat.toString());
console.log("Clipper tail set to: ", (await clipper.tail()).toString());
console.log("Spotter mat set to: ", newMat.toString());

await run("verify:verify", {
address: abaci.target,
Expand Down

0 comments on commit 4692fe4

Please sign in to comment.