Skip to content

Commit 9058c53

Browse files
committed
early termination
1 parent d8275b8 commit 9058c53

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

contracts/ExclusiveGeyser.sol

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ contract ExclusiveGeyser is Geyser {
1717
uint256 amount,
1818
bytes calldata permission
1919
) public override {
20+
// DISABLING STAKING
21+
require(false, "Staking disabled");
22+
2023
// verify that vault isn't staking the same tokens in multiple programs
2124
_enforceExclusiveStake(IUniversalVault(vault), amount);
2225

contracts/Geyser.sol

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -673,6 +673,14 @@ contract Geyser is IGeyser, Powered, OwnableUpgradeable {
673673
emit GeyserFunded(amount, duration);
674674
}
675675

676+
/// @notice Allows owner to terminate an existing reward schedule.
677+
/// @param index The index of the reward schedule to terminate.
678+
function terminateRewardSchedule(uint256 index) external onlyOwner {
679+
RewardSchedule storage reward = _geyser.rewardSchedules[index];
680+
require(reward.start + reward.duration > block.timestamp, "Reward schedule ended");
681+
reward.duration = (block.timestamp - reward.start);
682+
}
683+
676684
/// @notice Add vault factory to whitelist
677685
/// @dev use this function to enable stakes to vaults coming from the specified
678686
/// factory contract

0 commit comments

Comments
 (0)