Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
3xHarry committed Apr 10, 2023
1 parent e560897 commit f0aee47
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
25 changes: 22 additions & 3 deletions src/v2/Carousel/Carousel.sol
Original file line number Diff line number Diff line change
Expand Up @@ -571,16 +571,35 @@ contract Carousel is VaultV2 {
ADMIN FUNCTIONS
//////////////////////////////////////////////////////////////*/

/**
@notice This function is called by the controller if the epoch has started, but the counterparty vault has no value. In this case the users can withdraw their deposit. Additionally, emissions are transferred to the treasury.
@param _id uint256 identifier of the epoch
*/
function setEpochNull(uint256 _id)
public
override
onlyController
epochIdExists(_id)
epochHasEnded(_id)
{
epochNull[_id] = true;
if(emissions[_id] > 0) {
emissionsToken.safeTransfer(treasury(), emissions[_id]);
emissions[_id] = 0;
}
}


/** @notice sets emissions
* @param _epochId epoch id
* @param _emissionsRate emissions rate
* @param _emissionAmount emissions rate
*/
function setEmissions(uint256 _epochId, uint256 _emissionsRate)
function setEmissions(uint256 _epochId, uint256 _emissionAmount)
external
onlyFactory
epochIdExists(_epochId)
{
emissions[_epochId] = _emissionsRate;
emissions[_epochId] = _emissionAmount;
}

/** @notice changes relayer fee
Expand Down
1 change: 1 addition & 0 deletions src/v2/VaultV2.sol
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ contract VaultV2 is IVaultV2, SemiFungibleVault, ReentrancyGuard {
*/
function setEpochNull(uint256 _id)
public
virtual
onlyController
epochIdExists(_id)
epochHasEnded(_id)
Expand Down

0 comments on commit f0aee47

Please sign in to comment.