From f71fe7c93730daeed6f24cf043b9a2b9df5bfd5a Mon Sep 17 00:00:00 2001 From: pseudonaut Date: Tue, 23 Jan 2024 20:34:38 -0500 Subject: [PATCH] Sepolia Modifications --- src/ZivoeGovernorV2.sol | 4 ++-- src/ZivoeYDL.sol | 2 +- src/libraries/ZivoeTLC.sol | 2 +- src/lockers/OCL/OCL_ZVE.sol | 6 +++--- src/lockers/OCR/OCR_Modular.sol | 8 ++++---- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/ZivoeGovernorV2.sol b/src/ZivoeGovernorV2.sol index a1212d79..2065a43e 100644 --- a/src/ZivoeGovernorV2.sol +++ b/src/ZivoeGovernorV2.sol @@ -55,8 +55,8 @@ contract ZivoeGovernorV2 is Governor, GovernorSettings, GovernorCountingSimple, /// @param _timelock The timelock controller (ZivoeTLC). /// @param _GBL The ZivoeGlobals contract. constructor(IVotes _token, ZivoeTLC _timelock, address _GBL) - Governor("ZivoeGovernorV2") GovernorSettings(1, 3600, 100000 ether) - GovernorVotes(_token) GovernorVotesQuorumFraction(10) ZivoeGTC(_timelock) { GBL = _GBL; } + Governor("ZivoeGovernorV2") GovernorSettings(1, 100, 50000 ether) + GovernorVotes(_token) GovernorVotesQuorumFraction(5) ZivoeGTC(_timelock) { GBL = _GBL; } diff --git a/src/ZivoeYDL.sol b/src/ZivoeYDL.sol index 6e1c9582..64d5476c 100644 --- a/src/ZivoeYDL.sol +++ b/src/ZivoeYDL.sol @@ -107,7 +107,7 @@ contract ZivoeYDL is Context, ReentrancyGuard { uint256 public protocolEarningsRateBIPS = 3000; /// @dev The protocol earnings rate. // Accounting vars (constant). - uint256 public constant daysBetweenDistributions = 30; /// @dev Number of days between yield distributions. + uint256 public constant daysBetweenDistributions = 7; /// @dev Number of days between yield distributions. uint256 public constant retrospectiveDistributions = 6; /// @dev Retrospective moving average period. bool public unlocked; /// @dev Prevents contract from supporting functionality until unlocked. diff --git a/src/libraries/ZivoeTLC.sol b/src/libraries/ZivoeTLC.sol index 151591eb..c5273ee6 100644 --- a/src/libraries/ZivoeTLC.sol +++ b/src/libraries/ZivoeTLC.sol @@ -107,7 +107,7 @@ contract ZivoeTLC is AccessControl, IERC721Receiver, IERC1155Receiver { } require(delay <= 3 days, "ZivoeTLC: delay is greater than 3 days"); - require(delay >= 12 hours, "ZivoeTLC: delay is less than 12 hours"); + require(delay >= 5 minutes, "ZivoeTLC: delay is less than 5 minutes"); _minDelay = delay; emit MinDelayChange(0, delay); } diff --git a/src/lockers/OCL/OCL_ZVE.sol b/src/lockers/OCL/OCL_ZVE.sol index 6d12e324..6e542fbd 100644 --- a/src/lockers/OCL/OCL_ZVE.sol +++ b/src/lockers/OCL/OCL_ZVE.sol @@ -75,7 +75,7 @@ interface IZivoeYDL_OCL_ZVE { /// This contract has the following responsibilities: /// - Allocate capital to a $ZVE/pairAsset pool. /// - Remove capital from a $ZVE/pairAsset pool. -/// - Forward yield (profits) every 30 days to the YDL with compounding mechanisms. +/// - Forward yield (profits) every 1 days to the YDL with compounding mechanisms. contract OCL_ZVE is ZivoeLocker, ReentrancyGuard { using SafeERC20 for IERC20; @@ -183,7 +183,7 @@ contract OCL_ZVE is ZivoeLocker, ReentrancyGuard { IERC20(assets[i]).safeTransferFrom(owner(), address(this), amounts[i]); } - if (nextYieldDistribution == 0) { nextYieldDistribution = block.timestamp + 30 days; } + if (nextYieldDistribution == 0) { nextYieldDistribution = block.timestamp + 1 days; } uint256 preBasis; if (basis != 0) { (preBasis,) = fetchBasis(); } @@ -301,7 +301,7 @@ contract OCL_ZVE is ZivoeLocker, ReentrancyGuard { (uint256 amount, uint256 lp) = fetchBasis(); if (amount > basis) { _forwardYield(amount, lp); } (basis,) = fetchBasis(); - nextYieldDistribution += 30 days; + nextYieldDistribution += 1 days; } /// @notice This forwards yield to the YDL in the form of pairAsset. diff --git a/src/lockers/OCR/OCR_Modular.sol b/src/lockers/OCR/OCR_Modular.sol index 1d6ea826..0dec2bac 100644 --- a/src/lockers/OCR/OCR_Modular.sol +++ b/src/lockers/OCR/OCR_Modular.sol @@ -215,7 +215,7 @@ contract OCR_Modular is ZivoeLocker, ReentrancyGuard { function createRequest(uint256 amount, bool seniorElseJunior) external _tickEpoch nonReentrant { require(amount > 0, "OCR_Modular::createRequest() amount == 0"); emit RequestCreated(requestCounter, _msgSender(), amount, seniorElseJunior); - requests[requestCounter] = Request(_msgSender(), amount, epoch + 14 days, seniorElseJunior); + requests[requestCounter] = Request(_msgSender(), amount, epoch + 3 days, seniorElseJunior); if (seniorElseJunior) { redemptionsQueuedSenior += amount; IERC20(IZivoeGlobals_OCR(GBL).zSTT()).safeTransferFrom(_msgSender(), address(this), amount); @@ -256,7 +256,7 @@ contract OCR_Modular is ZivoeLocker, ReentrancyGuard { require(requests[id].amount > 0, "OCR_Modular::processRequest() requests[id].amount == 0"); require(requests[id].unlocks <= epoch, "OCR_Modular::processRequest() requests[id].unlocks > epoch"); - requests[id].unlocks = epoch + 14 days; + requests[id].unlocks = epoch + 3 days; // Calculate the full amount of redemptions allowed for current epoch. uint256 totalRedemptions = redemptionsAllowedSenior + redemptionsAllowedJunior; @@ -308,8 +308,8 @@ contract OCR_Modular is ZivoeLocker, ReentrancyGuard { /// @notice Ticks the epoch. function tickEpoch() public { - while (block.timestamp >= epoch + 14 days) { - epoch += 14 days; + while (block.timestamp >= epoch + 3 days) { + epoch += 3 days; redemptionsAllowedJunior += redemptionsQueuedJunior; redemptionsAllowedSenior += redemptionsQueuedSenior; redemptionsQueuedJunior = 0;