MEDIUM severity: The system's governance and configuration parameters are not protected by a time-lock, allowing admi. The system's governance and configuration parameters are not protected by a time-lock, allowing administrators to update or upgrade them without warning. This creates an opportunity for administrators to manipulate the system's behavior, potentially violating a security goal. Specifically, privilege...

Vulnerable code:
```\nfunction setGlobalParameter(bytes32 key, uint256 value) public onlyWhitelistAdmin {\n    if (key == "withdrawalLockBlockCount") {\n        withdrawalLockBlockCount = value;\n    } else if (key == "brokerLockBlockCount") {\n        brokerLockBlockCount = value;\n    } else {\n        revert("key not exists");\n    }\n    emit UpdateGlobalParameter(key, value);\n}\n```\n```\nfunction setGovernanceParameter(bytes32 key, int256 value) public onlyWhitelistAdmin {\n    if (key == "initialMarginRate") {\n        governance.initialMarginRate = value.toUint256();\n        require(governance.initialMarginRate > 0, "require im > 0");\n        require(governance.initialMarginRate < 10**18, "require im < 1");\n        require(governance.maintenanceMarginRate < governance.initialMarginRate, "require mm < im");\n    } else if (key == "maintenanceMarginRate") {\n        governance.maintenanceMarginRate = value.toUint256();\n        require(governance.maintenanceMarginRate > 0, "require mm > 0");\n        require(governance.maintenanceMarginRate < governance.initialMarginRate, "require mm < im");\n        require(governance.liquidationPenaltyRate < governance.maintenanceMarginRate, "require lpr < mm");\n        require(governance.penaltyFundRate < governance.maintenanceMarginRate, "require pfr < mm");\n    } else if (key == "liquidationPenaltyRate") {\n        governance.liquidationPenaltyRate = value.toUint256();\n        require(governance.liquidationPenaltyRate < governance.maintenanceMarginRate, "require lpr < mm");\n    } else if (key == "penaltyFundRate") {\n        governance.penaltyFundRate = value.toUint256();\n        require(governance.penaltyFundRate < governance.maintenanceMarginRate, "require pfr < mm");\n    } else if (key == "takerDevFeeRate") {\n        governance.takerDevFeeRate = value;\n    } else if (key == "makerDevFeeRate") {\n        governance.makerDevFeeRate = value;\n    } else if (key == "lotSize") {\n        require(governance.tradingLotSize == 0 || governance.tradingLotSize % value.toUint256() == 0, "require tls % ls == 0");\n        governance.lotSize = value.toUint256();\n    } else if (key == "tradingLotSize") {\n        require(governance.lotSize == 0 || value.toUint256() % governance.lotSize == 0, "require tls % ls == 0");\n        governance.tradingLotSize = value.toUint256();\n    } else if (key == "longSocialLossPerContracts") {\n        require(status == LibTypes.Status.SETTLING,\n```\n```\nfunction setGovernanceAddress(bytes32 key, address value) public onlyWhitelistAdmin {\n    require(value!= address(0x0), "invalid address");\n    if (key == "dev") {\n        devAddress = value;\n    } else if (key == "amm") {\n        amm = IAMM(value);\n    } else if (key == "globalConfig") {\n        globalConfig = IGlobalConfig(value);\n    } else {\n        revert("key not exists");\n    }\n    emit UpdateGovernanceAddress(key, value);\n}\n```\n```\nfunction setGovernanceParameter(bytes32 key, int256 value) public onlyWhitelistAdmin {\n    if (key == "poolFeeRate") {\n        governance.poolFeeRate = value.toUint256();\n    } else if (key == "poolDevFeeRate") {\n        governance.poolDevFeeRate = value.toUint256();\n    } else if (key == "emaAlpha") {\n        require(value > 0, "alpha should be > 0");\n        governance.emaAlpha = value;\n        emaAlpha2 = 10**18 - governance.emaAlpha;\n        emaAlpha2Ln = emaAlpha2.log();\n    } else if (key == "updatePremiumPrize") {\n        governance.updatePremiumPrize = value.toUint256();\n    } else if (key == "markPremiumLimit") {\n        governance.markPremiumLimit = value;\n    } else if (key == "fundingDampener") {\n        governance.fundingDampener = value;\n    } else {\n        revert("key not exists");\n    }\n    emit UpdateGovernanceParameter(key, value);\n}\n```