Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sepolia v1 #241

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/ZivoeGovernorV2.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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; }



Expand Down
2 changes: 1 addition & 1 deletion src/ZivoeYDL.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/ZivoeTLC.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
6 changes: 3 additions & 3 deletions src/lockers/OCL/OCL_ZVE.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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(); }
Expand Down Expand Up @@ -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.
Expand Down
8 changes: 4 additions & 4 deletions src/lockers/OCR/OCR_Modular.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down