Verified contractPartialBUSL-1.1
ParameterGovernance
Address0xac80d8ff0ac1b9121589d746925ba2e09b8e030d
- Balance
0 ETH
- Transactions
1
- Compiler
solc 0.8.26
- Same code
Only this contract
Details
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Language
- solidity
- Optimization
- Yes, 200 runs
- EVM version
- cancun
- License
- BUSL-1.1
- Match
- Partialcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 26,328,700
- Creation transaction
- 0x160fd1196c…92d830905d
6 files
- src/governance/ParameterGovernance.solmain11.36 KB
- lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/interfaces/IERC4626.sol12.21 KB
- lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol2.78 KB
- lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol684 B
- src/IARESQueue.sol13.27 KB
- src/ISUSDWVault.sol15 KB
src/governance/ParameterGovernance.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.26;
import {ISUSDWVault} from "../ISUSDWVault.sol";
import {IARESQueue} from "../IARESQueue.sol";
/**
* @title ParameterGovernance
* @notice Governance façade that routes parameter changes through the appropriate
* timelock tier and emits a canonical update event. The min/max bounds for
* each parameter are enforced on-chain by the target contracts ({sUSDWVault} /
* {ARESQueue}) at the point of use, so they hold regardless of which address
* holds GOVERNANCE_ROLE; this façade is responsible for tiering and events.
*
* Two tiers of access control:
* - **Operational** (48h delay): callable only by {operationalTimelock}.
* Covers routine tuning: vesting period, staking duration, ARES fee curve.
* - **High-impact** (72h delay): callable only by {highImpactTimelock}.
* Covers {maxRewardsBps} which directly bounds the rate at which yield
* accrues to stakers.
*
* Both timelocks are standard OZ {TimelockController} instances. This
* contract holds no upgradeable state and pins its governance targets as
* immutables; it is replaced, not reconfigured, whenever the wiring changes.
* Redeploy a new ParameterGovernance and reassign GOVERNANCE_ROLE on the
* targets in either of these cases:
* - the parameter table expands (new setters are added); or
* - a governance target is swapped out. In practice only the ARES queue is
* swappable — {sUSDWVault.setARESQueue} lets DEFAULT_ADMIN_ROLE point the
* vault at a fresh {ARESQueue}. After such a swap this façade still targets
* the old queue, so its queue setters ({setBaseRate}/{setK}/{setCapacity}/
* {setCancellationFeeRate}) become inert for the live queue. A queue swap
* already requires granting GOVERNANCE_ROLE on the new queue (a fresh queue
* carries no role grants), so redeploying this stateless façade against the
* new queue and granting it that role is the same class of operation — no
* mutable retarget path is added here by design. ({sUSDWVault} itself is a
* stable proxy and is never swapped, hence it too is pinned immutable.)
*
* @dev Spec drivers: D-071, D-072, P-01 through P-08 (P-09 is POL withdrawal,
* gated by the HighImpactTimelock directly rather than this façade).
*/
contract ParameterGovernance {
/* ============ Immutables ============ */
/// @notice The 48h OZ TimelockController for routine operational parameters.
address public immutable operationalTimelock;
/// @notice The 72h OZ TimelockController for high-impact parameters.
address public immutable highImpactTimelock;
/// @notice The sUSDWVault proxy address (governance target).
address public immutable sUSDWVault;
/// @notice The ARESQueue proxy address (governance target).
/// @dev Pinned immutable by design. If the vault is repointed at a new queue via
/// {sUSDWVault.setARESQueue}, redeploy this façade rather than mutating it in
/// place — see the contract-level notice for the rationale.
address public immutable aresQueue;
/* ============ Errors ============ */
/// @notice Thrown when an operational-tier setter is called by anyone other than {operationalTimelock}.
error NotOperationalTimelock(address caller);
/// @notice Thrown when a high-impact-tier setter is called by anyone other than {highImpactTimelock}.
error NotHighImpactTimelock(address caller);
/* ============ Events ============ */
/// @notice Emitted after every successful parameter update (D-070).
event ParameterUpdated(address indexed target, string paramName, uint256 oldValue, uint256 newValue);
/// @notice Thrown when a required constructor address is the zero address.
error ZeroAddress();
/* ============ Modifiers ============ */
/// @dev Restricts a setter to the 48h operational TimelockController.
modifier onlyOperationalTimelock() {
if (msg.sender != operationalTimelock) revert NotOperationalTimelock(msg.sender);
_;
}
/// @dev Restricts a setter to the 72h high-impact TimelockController.
modifier onlyHighImpactTimelock() {
if (msg.sender != highImpactTimelock) revert NotHighImpactTimelock(msg.sender);
_;
}
/* ============ Constructor ============ */
/// @notice Wire the immutable timelock tiers and governance targets.
/// @param operationalTimelock_ 48h TimelockController allowed to call operational setters.
/// @param highImpactTimelock_ 72h TimelockController allowed to call high-impact setters.
/// @param sUSDWVault_ sUSDW vault target (must have granted this contract GOVERNANCE_ROLE).
/// @param aresQueue_ ARES queue target (must have granted this contract GOVERNANCE_ROLE).
/// @dev Reverts {ZeroAddress} if any address is zero. Roles are granted on the targets
/// out-of-band after deployment.
constructor(address operationalTimelock_, address highImpactTimelock_, address sUSDWVault_, address aresQueue_) {
if (
operationalTimelock_ == address(0) || highImpactTimelock_ == address(0) || sUSDWVault_ == address(0)
|| aresQueue_ == address(0)
) revert ZeroAddress();
operationalTimelock = operationalTimelock_;
highImpactTimelock = highImpactTimelock_;
sUSDWVault = sUSDWVault_;
aresQueue = aresQueue_;
}
/* ============ High-impact setters (72h timelock) ============ */
/**
* @notice Set the per-distribution rewards cap as a fraction of totalAssets (bps).
* @param newValue New cap in bps (validated against P-01 bounds by the target).
* @dev Bounds (50–500 bps, P-01) are enforced by {sUSDWVault.setMaxRewardsBps}.
* High-impact because a higher cap allows larger per-epoch reward distributions,
* directly accelerating exchange-rate growth and affecting the economics of all
* sUSDW holders.
*/
function setMaxRewardsBps(uint256 newValue) external onlyHighImpactTimelock {
uint256 oldValue = ISUSDWVault(sUSDWVault).maxRewardsBps();
ISUSDWVault(sUSDWVault).setMaxRewardsBps(newValue);
emit ParameterUpdated(sUSDWVault, "maxRewardsBps", oldValue, newValue);
}
/* ============ Operational setters (48h timelock) ============ */
/**
* @notice Set the linear vesting period for reward distributions (seconds).
* @param newValue New vesting period in seconds (validated against P-04 bounds by the target).
* @dev Bounds (1–90 days, P-04; spec D-040 / OQ-WP-01 resolved: spec wins) are enforced
* by {sUSDWVault.setVestingPeriod}, which also reverts if a vesting schedule is
* active (VestingActive).
*/
function setVestingPeriod(uint256 newValue) external onlyOperationalTimelock {
uint256 oldValue = ISUSDWVault(sUSDWVault).vestingPeriod();
ISUSDWVault(sUSDWVault).setVestingPeriod(newValue);
emit ParameterUpdated(sUSDWVault, "vestingPeriod", oldValue, newValue);
}
/**
* @notice Set the minimum staking duration before a sUSDW holder may redeem via ARES (seconds).
* @param newValue New minimum staking duration in seconds (validated against P-05 bounds by the target).
* @dev Bounds (3–30 days, P-05) are enforced by {sUSDWVault.setMinStakingDuration}.
* Affects {sUSDWVault.initiateRedemption} which enforces the cooldown, and
* therefore all ARES exits.
*/
function setMinStakingDuration(uint256 newValue) external onlyOperationalTimelock {
uint256 oldValue = ISUSDWVault(sUSDWVault).minStakingDuration();
ISUSDWVault(sUSDWVault).setMinStakingDuration(newValue);
emit ParameterUpdated(sUSDWVault, "minStakingDuration", oldValue, newValue);
}
/**
* @notice Set the ARES base fee rate (bps of USDW redeemed).
* @param newValue New base rate in bps (validated against P-02 bounds by the target).
* @dev Bounds (50–1000 bps, P-02) are enforced by {ARESQueue.setBaseRate}.
*/
function setARESBaseRate(uint256 newValue) external onlyOperationalTimelock {
uint256 oldValue = IARESQueue(aresQueue).baseRate();
IARESQueue(aresQueue).setBaseRate(newValue);
emit ParameterUpdated(aresQueue, "baseRate", oldValue, newValue);
}
/**
* @notice Set the ARES fee-curve congestion exponent k (1e18-scaled fixed-point integer).
* @param newValue New exponent, 1e18-scaled (validated against P-03 bounds and the integer
* check by the target).
* @dev Bounds — integer k ∈ {1, 2, 3, 4}, i.e. newValue ∈ {1e18, 2e18, 3e18, 4e18}
* (P-03) — are enforced by {ARESQueue.setK} (range plus the integer check that
* reverts with {IARESQueue.NonIntegerK}). Fractional k is not supported by design:
* {ARESQueue._pow} is repeated multiplication, so the discrete set covers the
* fee-curve convexity shapes the protocol needs without a fractional power library.
*/
function setARESK(uint256 newValue) external onlyOperationalTimelock {
uint256 oldValue = IARESQueue(aresQueue).k();
IARESQueue(aresQueue).setK(newValue);
emit ParameterUpdated(aresQueue, "k", oldValue, newValue);
}
/**
* @notice Set the ARES queue capacity used to normalise the fee-curve ratio.
* @param newValue New capacity in raw USDW 6-decimal units (validated against P-07 bounds by the target).
* @dev Bounds (1e12 / 1M USDW – 1e15 / 1B USDW, P-07; raw USDW 6-decimal units matching
* {ARESQueue.currentQueueDepth}) are enforced by {ARESQueue.setCapacity}. `capacity`
* is the queue depth at which the fee curve `(queueDepth / capacity)^k` approaches
* its `baseRate` ceiling; it should be calibrated to Opco's Stage 1 liquidity buffer
* (whitepaper §7.3), not to protocol TVL. Governance is expected to re-tune as TVL
* and the off-chain buffer evolve. Initial value is supplied by the
* deployment script.
*/
function setARESCapacity(uint256 newValue) external onlyOperationalTimelock {
uint256 oldValue = IARESQueue(aresQueue).capacity();
IARESQueue(aresQueue).setCapacity(newValue);
emit ParameterUpdated(aresQueue, "capacity", oldValue, newValue);
}
/**
* @notice Set the ARES cancellation fee rate (bps of redeemed USDW).
* @param newValue New cancellation fee rate in bps (validated against P-06 bounds by the target).
* @dev Bounds (0–100 bps, P-06; zero fee permitted, governance can remove friction) are
* enforced by {ARESQueue.setCancellationFeeRate}.
*/
function setARESCancellationFeeRate(uint256 newValue) external onlyOperationalTimelock {
uint256 oldValue = IARESQueue(aresQueue).cancellationFeeRate();
IARESQueue(aresQueue).setCancellationFeeRate(newValue);
emit ParameterUpdated(aresQueue, "cancellationFeeRate", oldValue, newValue);
}
}
lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/interfaces/IERC4626.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.5.0) (interfaces/IERC4626.sol)
pragma solidity >=0.6.2;
import {IERC20} from "../token/ERC20/IERC20.sol";
import {IERC20Metadata} from "../token/ERC20/extensions/IERC20Metadata.sol";
/**
* @dev Interface of the ERC-4626 "Tokenized Vault Standard", as defined in
* https://eips.ethereum.org/EIPS/eip-4626[ERC-4626].
*/
interface IERC4626 is IERC20, IERC20Metadata {
event Deposit(address indexed sender, address indexed owner, uint256 assets, uint256 shares);
event Withdraw(
address indexed sender,
address indexed receiver,
address indexed owner,
uint256 assets,
uint256 shares
);
/**
* @dev Returns the address of the underlying token used for the Vault for accounting, depositing, and withdrawing.
*
* - MUST be an ERC-20 token contract.
* - MUST NOT revert.
*/
function asset() external view returns (address assetTokenAddress);
/**
* @dev Returns the total amount of the underlying asset that is “managed” by Vault.
*
* - SHOULD include any compounding that occurs from yield.
* - MUST be inclusive of any fees that are charged against assets in the Vault.
* - MUST NOT revert.
*/
function totalAssets() external view returns (uint256 totalManagedAssets);
/**
* @dev Returns the amount of shares that the Vault would exchange for the amount of assets provided, in an ideal
* scenario where all the conditions are met.
*
* - MUST NOT be inclusive of any fees that are charged against assets in the Vault.
* - MUST NOT show any variations depending on the caller.
* - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange.
* - MUST NOT revert.
*
* NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the
* “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and
* from.
*/
function convertToShares(uint256 assets) external view returns (uint256 shares);
/**
* @dev Returns the amount of assets that the Vault would exchange for the amount of shares provided, in an ideal
* scenario where all the conditions are met.
*
* - MUST NOT be inclusive of any fees that are charged against assets in the Vault.
* - MUST NOT show any variations depending on the caller.
* - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange.
* - MUST NOT revert.
*
* NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the
* “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and
* from.
*/
function convertToAssets(uint256 shares) external view returns (uint256 assets);
/**
* @dev Returns the maximum amount of the underlying asset that can be deposited into the Vault for the receiver,
* through a deposit call.
*
* - MUST return a limited value if receiver is subject to some deposit limit.
* - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of assets that may be deposited.
* - MUST NOT revert.
*/
function maxDeposit(address receiver) external view returns (uint256 maxAssets);
/**
* @dev Allows an on-chain or off-chain user to simulate the effects of their deposit at the current block, given
* current on-chain conditions.
*
* - MUST return as close to and no more than the exact amount of Vault shares that would be minted in a deposit
* call in the same transaction. I.e. deposit should return the same or more shares as previewDeposit if called
* in the same transaction.
* - MUST NOT account for deposit limits like those returned from maxDeposit and should always act as though the
* deposit would be accepted, regardless if the user has enough tokens approved, etc.
* - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees.
* - MUST NOT revert.
*
* NOTE: any unfavorable discrepancy between convertToShares and previewDeposit SHOULD be considered slippage in
* share price or some other type of condition, meaning the depositor will lose assets by depositing.
*/
function previewDeposit(uint256 assets) external view returns (uint256 shares);
/**
* @dev Deposit `assets` underlying tokens and send the corresponding number of vault shares (`shares`) to `receiver`.
*
* - MUST emit the Deposit event.
* - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the
* deposit execution, and are accounted for during deposit.
* - MUST revert if all of assets cannot be deposited (due to deposit limit being reached, slippage, the user not
* approving enough underlying tokens to the Vault contract, etc).
*
* NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token.
*/
function deposit(uint256 assets, address receiver) external returns (uint256 shares);
/**
* @dev Returns the maximum amount of the Vault shares that can be minted for the receiver, through a mint call.
* - MUST return a limited value if receiver is subject to some mint limit.
* - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of shares that may be minted.
* - MUST NOT revert.
*/
function maxMint(address receiver) external view returns (uint256 maxShares);
/**
* @dev Allows an on-chain or off-chain user to simulate the effects of their mint at the current block, given
* current on-chain conditions.
*
* - MUST return as close to and no fewer than the exact amount of assets that would be deposited in a mint call
* in the same transaction. I.e. mint should return the same or fewer assets as previewMint if called in the
* same transaction.
* - MUST NOT account for mint limits like those returned from maxMint and should always act as though the mint
* would be accepted, regardless if the user has enough tokens approved, etc.
* - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees.
* - MUST NOT revert.
*
* NOTE: any unfavorable discrepancy between convertToAssets and previewMint SHOULD be considered slippage in
* share price or some other type of condition, meaning the depositor will lose assets by minting.
*/
function previewMint(uint256 shares) external view returns (uint256 assets);
/**
* @dev Mints exactly `shares` vault shares to `receiver` in exchange for `assets` underlying tokens.
*
* - MUST emit the Deposit event.
* - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the mint
* execution, and are accounted for during mint.
* - MUST revert if all of shares cannot be minted (due to deposit limit being reached, slippage, the user not
* approving enough underlying tokens to the Vault contract, etc).
*
* NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token.
*/
function mint(uint256 shares, address receiver) external returns (uint256 assets);
/**
* @dev Returns the maximum amount of the underlying asset that can be withdrawn from the owner balance in the
* Vault, through a withdraw call.
*
* - MUST return a limited value if owner is subject to some withdrawal limit or timelock.
* - MUST NOT revert.
*/
function maxWithdraw(address owner) external view returns (uint256 maxAssets);
/**
* @dev Allows an on-chain or off-chain user to simulate the effects of their withdrawal at the current block,
* given current on-chain conditions.
*
* - MUST return as close to and no fewer than the exact amount of Vault shares that would be burned in a withdraw
* call in the same transaction. I.e. withdraw should return the same or fewer shares as previewWithdraw if
* called
* in the same transaction.
* - MUST NOT account for withdrawal limits like those returned from maxWithdraw and should always act as though
* the withdrawal would be accepted, regardless if the user has enough shares, etc.
* - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees.
* - MUST NOT revert.
*
* NOTE: any unfavorable discrepancy between convertToShares and previewWithdraw SHOULD be considered slippage in
* share price or some other type of condition, meaning the depositor will lose assets by depositing.
*/
function previewWithdraw(uint256 assets) external view returns (uint256 shares);
/**
* @dev Burns shares from owner and sends exactly assets of underlying tokens to receiver.
*
* - MUST emit the Withdraw event.
* - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the
* withdraw execution, and are accounted for during withdraw.
* - MUST revert if all of assets cannot be withdrawn (due to withdrawal limit being reached, slippage, the owner
* not having enough shares, etc).
*
* Note that some implementations will require pre-requesting to the Vault before a withdrawal may be performed.
* Those methods should be performed separately.
*/
function withdraw(uint256 assets, address receiver, address owner) external returns (uint256 shares);
/**
* @dev Returns the maximum amount of Vault shares that can be redeemed from the owner balance in the Vault,
* through a redeem call.
*
* - MUST return a limited value if owner is subject to some withdrawal limit or timelock.
* - MUST return balanceOf(owner) if owner is not subject to any withdrawal limit or timelock.
* - MUST NOT revert.
*/
function maxRedeem(address owner) external view returns (uint256 maxShares);
/**
* @dev Allows an on-chain or off-chain user to simulate the effects of their redemption at the current block,
* given current on-chain conditions.
*
* - MUST return as close to and no more than the exact amount of assets that would be withdrawn in a redeem call
* in the same transaction. I.e. redeem should return the same or more assets as previewRedeem if called in the
* same transaction.
* - MUST NOT account for redemption limits like those returned from maxRedeem and should always act as though the
* redemption would be accepted, regardless if the user has enough shares, etc.
* - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees.
* - MUST NOT revert.
*
* NOTE: any unfavorable discrepancy between convertToAssets and previewRedeem SHOULD be considered slippage in
* share price or some other type of condition, meaning the depositor will lose assets by redeeming.
*/
function previewRedeem(uint256 shares) external view returns (uint256 assets);
/**
* @dev Burns exactly shares from owner and sends assets of underlying tokens to receiver.
*
* - MUST emit the Withdraw event.
* - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the
* redeem execution, and are accounted for during redeem.
* - MUST revert if all of shares cannot be redeemed (due to withdrawal limit being reached, slippage, the owner
* not having enough shares, etc).
*
* NOTE: some implementations will require pre-requesting to the Vault before a withdrawal may be performed.
* Those methods should be performed separately.
*/
function redeem(uint256 shares, address receiver, address owner) external returns (uint256 assets);
}
lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)
pragma solidity >=0.4.16;
/**
* @dev Interface of the ERC-20 standard as defined in the ERC.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the value of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the value of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves a `value` amount of tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 value) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets a `value` amount of tokens as the allowance of `spender` over the
* caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the
* allowance mechanism. `value` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 value) external returns (bool);
}
lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/extensions/IERC20Metadata.sol)
pragma solidity >=0.6.2;
import {IERC20} from "../IERC20.sol";
/**
* @dev Interface for the optional metadata functions from the ERC-20 standard.
*/
interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}
src/IARESQueue.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.26;
/**
* @title IARESQueue
* @notice Interface for the Anti-Runs Exit System (ARES) — the FIFO redemption queue
* through which all sUSDW exits settle (D-049–D-062, D-036–D-037).
*
* @dev Unified contract (Q-NEW-01): a single contract owns submit, settle, cancel,
* the dynamic fee curve, the 24h-TWAP ring buffer, and the per-address rolling
* cap. Redemption positions are plain storage structs — NOT transferable NFTs.
*
* Pause policy: {submit} and {settle} are blocked when paused so no new exits
* enter and no processor settlement runs; {requestCancel} and {confirmCancel}
* remain open so users can never be trapped in the queue by a pause.
*/
interface IARESQueue {
/* ============ Events ============ */
/// @notice Emitted when a user appends a redemption position to the queue.
event PositionSubmitted(
address indexed submitter, uint256 sUSDWAmount, uint256 usdwAmount, uint256 indexed queueIndex
);
/// @notice Emitted when the front-of-queue position settles; includes the fee and TWAP used.
event PositionSettled(
address indexed submitter, uint256 netUSDW, uint256 fee, uint256 twap, uint256 indexed queueIndex
);
/// @notice Emitted when {settlePartial} pays out a slice of the front-of-queue position.
/// The position stays at the head with `remainingUsdw` still owed; the fee is
/// computed on the paid slice only.
event PositionPartiallySettled(
address indexed submitter,
uint256 netUSDW,
uint256 fee,
uint256 remainingUsdw,
uint256 twap,
uint256 indexed queueIndex
);
/// @notice Emitted when a user requests to cancel their queued position (starts the 24h cooldown).
event CancellationRequested(address indexed submitter, uint256 indexed queueIndex);
/// @notice Emitted when a user confirms cancellation after the cooldown; `newShares` were re-minted.
event PositionCancelled(address indexed submitter, uint256 newShares, uint256 fee, uint256 indexed queueIndex);
/// @notice Emitted when {settle} skips a restricted position at the head. The position
/// remains unseized until compliance calls {seizePosition}.
event PositionBlocked(address indexed submitter, uint256 usdwAmount, uint256 indexed queueIndex);
/// @notice Emitted when compliance seizes a restricted user's position via {seizePosition}.
event PositionSeized(address indexed submitter, address indexed to, uint256 usdwAmount, uint256 indexed queueIndex);
/* ============ Errors ============ */
/// @notice Thrown when a required address parameter is the zero address.
error ZeroAddress();
/// @notice Thrown when `submit` is called with a zero share amount.
error AmountZero();
/// @notice Thrown when `submit` receives a zero USDW amount back from the vault. Defensive
/// backstop mirroring the vault's `ZeroRedemptionAssets` guard so the FIFO can never
/// admit a zero-value position even if vault conversion accounting changes.
error ZeroRedemptionValue();
/// @notice Thrown when a cancel path is called by someone other than the position submitter.
error NotPositionSubmitter(uint256 queueIndex);
/// @notice Thrown when `requestCancel`/`confirmCancel` targets a settled position.
error PositionAlreadySettled(uint256 queueIndex);
/// @notice Thrown when `requestCancel`/`confirmCancel` targets an already-cancelled position.
error PositionAlreadyCancelled(uint256 queueIndex);
/// @notice Thrown when `requestCancel` or `complianceCancelPosition` targets a position that
/// already has a pending user-initiated cancellation.
error CancellationAlreadyPending(uint256 queueIndex);
/// @notice Thrown when `confirmCancel` is called on a position whose cancellation has not been requested.
error CancellationNotPending(uint256 queueIndex);
/// @notice Thrown when `confirmCancel` is called before the 24h cooldown has elapsed.
error CancellationCooldownActive(uint48 readyAt);
/// @notice Thrown when `settle` finds no active (unsettled, uncancelled) positions.
error QueueEmpty();
/// @notice Thrown when the vault lacks sufficient liquid USDW to settle the head position.
/// The processor must call `convertFromLoan` to replenish before settlement.
error InsufficientUSDWBalance(uint256 available, uint256 required);
/// @notice Thrown when `submit` would push a submitter above the 5% / 7-day rolling cap (D-058).
error PerAddressCapExceeded(uint256 requested, uint256 cap);
/// @notice Thrown as a defensive sanity check if the computed settle fee ever exceeds the position.
/// Should be unreachable given bounds on `baseRate` and the `ratio` clamp.
error FeeExceedsPosition(uint256 fee, uint256 usdwAmount);
/// @notice Thrown when {seizePosition} targets a position that has already been seized.
error PositionAlreadySeized(uint256 queueIndex);
/// @notice Thrown when {submit} is called by a submitter who is restricted — either frozen
/// on USDW or blacklisted on sUSDW. Mirrors the {settle} skip predicate so a
/// restricted user cannot enqueue a position that can never be settled.
error SubmitterRestricted(address submitter);
/// @notice Thrown when {seizePosition} targets a position whose submitter is not restricted
/// (neither frozen on USDW nor blacklisted on sUSDW).
error SubmitterNotRestricted(uint256 queueIndex);
/// @notice Thrown when a position whose submitter is still restricted (USDW-frozen or
/// sUSDW-blacklisted) is the target of an operation that requires an un-restricted
/// submitter: {complianceCancelPosition} (compliance must seize instead) and
/// {confirmCancel} (a restricted submitter cannot self-recover value as sUSDW).
error SubmitterStillRestricted(uint256 queueIndex);
/// @notice Thrown when {seizePosition} is called with a recipient that is frozen on USDW.
error RecipientFrozen(address recipient);
/// @notice Thrown when {seizePosition} recipient is the vault itself — a self-transfer
/// would create an accounting gap between `usdwBalance` and actual token balance.
error InvalidRecipient(address recipient);
/// @notice Thrown when `k` is not a whole integer in 1e18 fixed-point form.
/// Only integer exponents are supported by design; {ParameterGovernance.setARESK}
/// is the primary gate, this check is defence-in-depth inside {_pow}.
error PowerExponentNotInteger(uint256 exp);
/// @notice Thrown by `setK` when `value` is within range but not a whole integer in
/// 1e18 fixed-point form (the fee curve only supports integer exponents).
error NonIntegerK(uint256 value);
/// @notice Thrown by the governance parameter setters when `value` falls outside the
/// permitted `[min, max]` range. The bounds are enforced here, at the point of
/// use, so they hold even if `GOVERNANCE_ROLE` is granted to an address other
/// than {ParameterGovernance}.
error OutOfBounds(uint256 value, uint256 min, uint256 max);
/* ============ User entry points ============ */
/// @notice Burn `sUSDWAmount` via the vault and append a redemption position to the queue.
function submit(uint256 sUSDWAmount) external;
/// @notice Settle the front-of-queue position, paying net USDW to the submitter and the fee to the vault.
/// @dev Gated by ARES_SETTLER_ROLE. FIFO only.
function settle() external;
/// @notice Settle as much of the front-of-queue position as current vault liquidity allows.
/// When liquidity covers the full position this is identical to {settle}; otherwise
/// the entire liquid balance is paid to the head submitter, the unpaid remainder
/// stays queued at the head with full FIFO seniority, and the fee is charged on the
/// paid slice only.
/// @dev Gated by ARES_SETTLER_ROLE. Deliberate crisis lever for terminal insolvency
/// (e.g. the off-chain loan defaulted and was written down, so no capital will
/// return via `convertFromLoan`): without it, a head position larger than the
/// vault's remaining liquid USDW would stall the FIFO forever and strand that USDW
/// in the vault. Never called in normal operation — a full-liquidity revert of
/// {settle} with `InsufficientUSDWBalance` remains the documented signal to
/// replenish via `convertFromLoan` and settle in full. Whether the shortfall is
/// temporary illiquidity or a permanent loss is off-chain knowledge, so the
/// judgment stays with the trusted settler. Reverts {InsufficientUSDWBalance}
/// when the vault holds zero liquid USDW (nothing to distribute).
function settlePartial() external;
/// @notice Mark the caller's queued position as pending cancellation; starts the 24h cooldown.
function requestCancel(uint256 queueIndex) external;
/// @notice Finalise cancellation after the cooldown — re-stakes `net = usdwAmount - cancelFee`
/// into the vault for the user and forwards the fee.
function confirmCancel(uint256 queueIndex) external;
/// @notice Seize a restricted user's queued position, sending USDW to `recipient` with
/// no exit fee. Compliance decides destination per case (OFAC blocking requires
/// holding seized property, not automatic disposal).
/// @dev Gated by COMPLIANCE_ROLE. Works on any unseized, unsettled, uncancelled position
/// whose submitter is currently restricted — regardless of head position.
function seizePosition(uint256 queueIndex, address recipient) external;
/// @notice Cancel a previously blocked position on behalf of an un-restricted user.
/// Used to resolve false-positive blacklistings: compliance un-blacklists the user
/// first, then calls this to return shares with zero cancellation fee.
/// @dev Gated by COMPLIANCE_ROLE. Requires the submitter to be NOT restricted (must be
/// un-blacklisted/unfrozen before calling). No cooldown — compliance acts immediately.
/// Reverts with {CancellationAlreadyPending} if the submitter already requested a
/// cancellation: the zero-fee path must not waive a fee-bearing cancellation the
/// submitter committed to — the un-restricted submitter completes it via {confirmCancel}.
function complianceCancelPosition(uint256 queueIndex) external;
/* ============ Governance setters (called by ParameterGovernance) ============ */
/// @notice Set the base settle-fee rate (bps, 50–1000); GOVERNANCE_ROLE only.
function setBaseRate(uint256 newValue) external;
/// @notice Set the fee-curve convexity exponent `k` (1e18-scaled integer 1–4); GOVERNANCE_ROLE only.
function setK(uint256 newValue) external;
/// @notice Set the fee-curve capacity denominator (raw USDW units); GOVERNANCE_ROLE only.
function setCapacity(uint256 newValue) external;
/// @notice Set the cancellation-fee rate (bps, 0–100); GOVERNANCE_ROLE only.
function setCancellationFeeRate(uint256 newValue) external;
/* ============ Views ============ */
/// @notice USDW value of all active (unsettled, uncancelled) positions in the queue.
function getQueueDepth() external view returns (uint256);
/// @notice Full state of the position at `index` — tuple matches the storage struct.
function getPosition(uint256 index)
external
view
returns (
address submitter,
uint256 usdwAmount,
uint256 submissionTimestamp,
bool cancellationPending,
bool settled,
bool cancelled,
bool seized
);
/// @notice Estimate the exit fee a `settle()` would charge for `usdwAmount` given the current TWAP.
function estimateFee(uint256 usdwAmount) external view returns (uint256);
/// @notice Maximum sUSDW shares `owner` can still submit to ARES under the 5%/7-day
/// rolling per-address cap (D-058). Returns 0 when the cap is exhausted or
/// when `totalStakedUSDW` is zero. The unit matches `submit(sUSDWAmount)`.
function maxARESSubmit(address owner) external view returns (uint256);
/// @notice Base settle-fee rate in bps (the fee-curve ceiling before the depth scaling).
function baseRate() external view returns (uint256);
/// @notice Fee-curve convexity exponent `k`, 1e18-scaled (integer 1–4).
function k() external view returns (uint256);
/// @notice Fee-curve normalisation denominator in raw USDW 6-decimal units.
function capacity() external view returns (uint256);
/// @notice Cancellation fee rate in bps charged by {confirmCancel}.
function cancellationFeeRate() external view returns (uint256);
}
src/ISUSDWVault.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.26;
import {IERC4626} from "@openzeppelin/contracts/interfaces/IERC4626.sol";
/**
* @title ISUSDWVault
* @notice Interface for the staked USDW yield vault (sUSDW).
* @dev Extends IERC4626 with Gridstone-specific surfaces:
* - dual-balance accounting (on-chain `usdwBalance`, off-chain `loanBalance`)
* - processor-driven reward distribution with linear vesting (D-040)
* - capital deployment / return between the two balances (D-003, D-040e)
* - ARES-driven redemption settlement (D-050)
* - governance escape hatch `impairLoanBalance` (Q-NEW-02)
*
* Sync redeem/withdraw are DISABLED — `withdraw`, `redeem`, `previewWithdraw`,
* `previewRedeem` revert with {OperationNotAllowed} (D-040b). `maxWithdraw` and
* `maxRedeem` return the ARES-queue-bounded amount (5%/7d per-address cap) — they
* do NOT imply a callable sync `withdraw`. All exits flow through ARES.
*/
interface ISUSDWVault is IERC4626 {
/* ============ Events ============ */
/// @notice Emitted on every `transferInRewards`. `currentExchangeRate` is mandatory (whitepaper §10.3).
event RewardsDistributed(
uint256 indexed epoch,
uint256 loanRewardAmount,
uint256 mYieldAmount,
uint256 currentExchangeRate,
bytes32 attestationHash,
uint256 timestamp
);
/// @notice Emitted when processor moves USDW from the on-chain balance into off-chain loan balance.
event CapitalDeployed(uint256 usdwAmount);
/// @notice Emitted when processor returns USDW from loan balance back to the on-chain balance.
event CapitalReturned(uint256 usdwAmount);
/// @notice Emitted when an address is added to the blacklist.
event AddedToBlacklist(address indexed account);
/// @notice Emitted when an address is removed from the blacklist.
event RemovedFromBlacklist(address indexed account);
/// @notice Emitted when a blacklisted user's shares are seized and transferred to a compliance address.
event LockedSharesSeized(address indexed from, address indexed to, uint256 sharesAmount);
/// @notice Emitted when the ARES queue reference is changed via {setARESQueue}.
event ARESQueueUpdated(address oldQueue, address newQueue);
/// @notice Emitted when governance writes down the loan balance via the impairment escape hatch.
event LoanImpaired(uint256 writeDownAmount, uint256 newExchangeRate);
/* ============ Errors ============ */
/// @notice Thrown by sync-redeem paths that are intentionally disabled (D-040b).
error OperationNotAllowed();
/// @notice Thrown by `transferInRewards` while the previous distribution is still vesting (D-040g).
error VestingActive(uint256 unvestedAmount);
/// @notice Thrown by `transferInRewards` when `loanRewardAmount + mYieldAmount` exceeds the
/// per-distribution rate-limit cap `totalAssets() * maxRewardsBps / 10_000` (D-043).
error RewardExceedsCap(uint256 requested, uint256 cap);
/// @notice Thrown by `transferInRewards` when `mYieldAmount` exceeds the on-chain USDW
/// surplus that arrived via `USDW.claimYield()` (i.e. actual balance - tracked usdwBalance).
error InsufficientMYieldSurplus(uint256 requested, uint256 surplus);
/// @notice Thrown when an ARES-only function is called by anyone other than the registered
/// ARES queue.
error NotARESQueue();
/// @notice Thrown by `settleRedemption` when the vault's liquid USDW (`usdwBalance`) is
/// insufficient to cover the net settlement amount.
error InsufficientLiquidity(uint256 available, uint256 required);
/// @notice Thrown by `convertFromUsdw` when the requested deployment would consume USDW
/// earmarked for pending ARES redemptions.
error InsufficientDeployableBalance(uint256 requested, uint256 deployable);
/// @notice Thrown by `initiateRedemption` when `owner`'s min-staking-duration cooldown
/// has not yet elapsed (D-042).
error StakingCooldownActive(uint256 readyAt);
/// @notice Thrown when an operation involves a blacklisted account.
error AccountBlacklisted(address account);
/// @notice Thrown by `seizeLockedShares` when the account is not blacklisted.
error AccountNotBlacklisted(address account);
/// @notice Thrown when attempting to blacklist a DEFAULT_ADMIN_ROLE holder.
error CannotBlacklistAdmin();
/// @notice Thrown by `seizeLockedShares` when the `to` address is blacklisted.
error RecipientBlacklisted(address account);
/// @notice Thrown by `settleRedemption` when recipient is the vault itself — a self-transfer
/// would create an accounting gap between `usdwBalance` and actual token balance.
error InvalidRecipient(address recipient);
/// @notice Thrown by `_deposit` when the computed share amount is zero — either because
/// assets is zero or because floor rounding reduces a tiny deposit to zero shares.
/// Prevents cooldown-reset griefing and stuck-fund scenarios.
error ZeroShares();
/// @notice Thrown by `initiateRedemption` when the floor-rounded share→asset conversion
/// yields zero USDW. Dust share amounts (below the 12-decimal virtual-share offset)
/// would otherwise burn shares yet record a zero obligation, letting an attacker
/// enqueue zero-value ARES positions that the FIFO settler must clear one tx at a
/// time and that bypass the per-address rolling cap.
/// Rejecting at the source removes the spam vector.
error ZeroRedemptionAssets();
/// @notice Thrown by `impairLoanBalance` when `writeDownAmount` is zero. A zero write-down
/// has no effect on `loanBalance` but would still reset `lastExchangeRate`, allowing
/// IMPAIRMENT_ROLE to silently clear a GridstoneInvariant monotonicity alarm without
/// booking an actual loss.
error ZeroWriteDown();
/// @notice Thrown by `convertFromUsdw` / `convertFromLoan` when `usdwAmount` is zero.
/// A zero conversion is a no-op that would still emit a misleading event.
error ZeroConversionAmount();
/// @notice Thrown when a required address parameter is the zero address.
error ZeroAddress();
/// @notice Thrown by `convertFromLoan` when `usdwAmount` exceeds `loanBalance`.
error InsufficientLoanBalance(uint256 requested, uint256 available);
/// @notice Thrown by `settleRedemption` / `cancelRedemption` when `feeAmount > usdwAmount`.
error FeeExceedsAmount(uint256 feeAmount, uint256 usdwAmount);
/// @notice Thrown by `settleRedemption` / `cancelRedemption` when `usdwAmount > pendingRedemptions`.
error InsufficientPendingRedemptions(uint256 requested, uint256 available);
/// @notice Thrown by `transferInRewards` when actual USDW balance is below the tracked ledger.
error VaultBalanceBelowLedger(uint256 balance, uint256 ledger);
/// @notice Thrown when an attestation hash is required but `bytes32(0)` was provided.
error MissingAttestation();
/// @notice Thrown by `setARESQueue` when `pendingRedemptions > 0` — all in-flight
/// positions must be settled or cancelled before the queue can be replaced.
error PendingRedemptionsNotZero(uint256 pendingRedemptions);
/// @notice Thrown by `setARESQueue` when the supplied address does not advertise the
/// {IARESQueue} interface via ERC-165. Also covers EOAs and non-ERC-165 contracts,
/// which `ERC165Checker.supportsInterface` reports as unsupported.
error UnsupportedARESQueueInterface(address queue);
/// @notice Thrown by the governance parameter setters when `value` falls outside the
/// permitted `[min, max]` range. The bounds are enforced here, at the point of
/// use, so they hold even if `GOVERNANCE_ROLE` is granted to an address other
/// than {ParameterGovernance}.
error OutOfBounds(uint256 value, uint256 min, uint256 max);
/* ============ Structs ============ */
/// @notice Single entry in the per-address FIFO lock queue (D-042). Each deposit or
/// transfer-in pushes one entry; expiries are quantized to a fixed window so inflows
/// in the same window merge into one entry, bounding the queue length.
struct LockEntry {
/// Shares locked by this entry.
uint128 shares;
/// Unix time at which these shares unlock (quantized to the lock window).
uint64 expiry;
}
/* ============ Gridstone-specific views ============ */
/// @notice Current exchange rate: `totalAssets() * 1e18 / totalSupply()`, or `1e18` if supply is zero.
function exchangeRate() external view returns (uint256);
/// @notice Monotonic snapshot of {exchangeRate} used by GridstoneInvariant to enforce non-decrease.
function lastExchangeRate() external view returns (uint256);
/// @notice USDW currently held on-chain by the vault.
function usdwBalance() external view returns (uint256);
/// @notice Face value of USDW deployed off-chain as loans (carried at face / amortized cost).
function loanBalance() external view returns (uint256);
/// @notice USDW-equivalent of reward amount still subject to linear vesting.
function getUnvestedAmount() external view returns (uint256);
/// @notice Convenience view: `totalAssets()`. Exposed by D-025 for transparency.
function totalStakedUSDW() external view returns (uint256);
/// @notice Total USDW value of submitted but unsettled/uncancelled ARES redemptions.
function pendingRedemptions() external view returns (uint256);
/// @notice Total sUSDW shares currently within the `minStakingDuration` cooldown for `account`.
function lockedSharesOf(address account) external view returns (uint256);
/// @notice Returns whether `account` is on the sUSDW blacklist.
function isBlacklisted(address account) external view returns (bool);
/* ============ Processor ============ */
/// @notice Distribute a new reward tranche. Only callable by PROCESSOR_ROLE.
/// @param loanRewardAmount Off-chain loan interest credited to `loanBalance` (may be 0 in Phase 2).
/// @param mYieldAmount On-chain $M yield already in the vault via `USDW.claimYield()`,
/// credited to `usdwBalance`. Must be 0 unless the caller first calls
/// `USDW.claimYield()` so the tokens are physically present.
/// @param attestationHash IPFS/reference hash of the off-chain attestation covering both streams.
function transferInRewards(uint256 loanRewardAmount, uint256 mYieldAmount, bytes32 attestationHash) external;
/// @notice Move `usdwAmount` of USDW from `usdwBalance` into `loanBalance` (1:1). PROCESSOR_ROLE only.
function convertFromUsdw(uint256 usdwAmount) external;
/// @notice Move `usdwAmount` of USDW back from `loanBalance` into `usdwBalance` (1:1). PROCESSOR_ROLE only.
function convertFromLoan(uint256 usdwAmount) external;
/* ============ ARES interface ============ */
/// @notice Burn `shares` from `owner` and record the USDW obligation in `pendingRedemptions`.
/// No USDW is transferred at this point — tokens move at settle time.
/// @dev Only callable by the ARES queue. Enforces the min-staking-duration cooldown.
function initiateRedemption(address owner, uint256 shares) external returns (uint256 usdwAmount);
/// @notice Transfer net USDW to `recipient` and retain `feeAmount` in the vault at settle
/// time. The fee lifts the exchange rate for remaining stakers.
/// @dev Only callable by the ARES queue.
function settleRedemption(address recipient, uint256 usdwAmount, uint256 feeAmount) external;
/// @notice Remove a pending redemption obligation on cancellation. Mints fresh sUSDW shares
/// for the net amount (after cancellation fee) at the current exchange rate.
/// @dev Only callable by the ARES queue.
function cancelRedemption(address submitter, uint256 usdwAmount, uint256 feeAmount)
external
returns (uint256 newShares);
/* ============ Governance escape hatch (Q-NEW-02) ============ */
/// @notice Writes down `loanBalance` by `writeDownAmount` and resets `lastExchangeRate`
/// to the new (lower) `exchangeRate`. The ONLY path that may decrease
/// `lastExchangeRate`. Gated by a high-impact multisig + 72h timelock role.
function impairLoanBalance(uint256 writeDownAmount) external;
/* ============ Blacklist ============ */
/// @notice Adds `account` to the blacklist. Blacklisted addresses cannot deposit, transfer, or redeem.
/// @dev Only callable by COMPLIANCE_ROLE. Cannot blacklist admin addresses.
/// Reverts if already blacklisted.
function addToBlacklist(address account) external;
/// @notice Removes `account` from the blacklist.
/// @dev Only callable by COMPLIANCE_ROLE. Reverts if not blacklisted.
function removeFromBlacklist(address account) external;
/// @notice Seizes all shares held by a blacklisted address and transfers them to a
/// compliance-controlled address. OFAC blocking requires holding seized property,
/// not destroying it — so shares are burned from `from` and minted to `to`.
/// @dev Only callable by COMPLIANCE_ROLE. Requires `from` to be blacklisted,
/// `to` to be non-zero and non-blacklisted, and `from` to hold shares.
function seizeLockedShares(address from, address to) external;
/* ============ Admin ============ */
/// @notice Wire the ARES queue address post-init.
function setARESQueue(address newAresQueue) external;
/* ============ Governance parameters (called by ParameterGovernance) ============ */
/// @notice Set the per-distribution reward cap (bps of `totalAssets()`); GOVERNANCE_ROLE only.
function setMaxRewardsBps(uint256 newValue) external;
/// @notice Set the linear reward vesting window (seconds); GOVERNANCE_ROLE only.
function setVestingPeriod(uint256 newValue) external;
/// @notice Set the minimum staking duration before ARES exit (seconds); GOVERNANCE_ROLE only.
function setMinStakingDuration(uint256 newValue) external;
/// @notice Per-distribution reward cap as a fraction of `totalAssets()`, in bps.
function maxRewardsBps() external view returns (uint256);
/// @notice Linear vesting window applied to each reward distribution, in seconds.
function vestingPeriod() external view returns (uint256);
/// @notice Minimum time shares must be held before they can be submitted to ARES, in seconds.
function minStakingDuration() external view returns (uint256);
}
Compiler settingsShow
{
"viaIR": false,
"metadata": {
"appendCBOR": true,
"bytecodeHash": "ipfs",
"useLiteralContent": false
},
"libraries": {},
"optimizer": {
"runs": 200,
"enabled": true
},
"evmVersion": "cancun",
"remappings": [
"@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
"@openzeppelin/contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/",
"lib/m-extensions/lib/common/lib/safe-utils/lib/solidity-http/lib/solidity-stringutils/:ds-test/=lib/m-extensions/lib/common/lib/safe-utils/lib/solidity-http/lib/solidity-stringutils/lib/ds-test/src/",
"lib/m-extensions/lib/common/lib/safe-utils/lib/solidity-http/lib/solidity-stringutils/:ds-test/=lib/m-extensions/lib/common/lib/safe-utils/lib/solidity-http/lib/solidity-stringutils/lib/ds-test/src/",
"lib/m-extensions/lib/uniswap-v4-periphery/lib/permit2/lib/forge-gas-snapshot/lib/forge-std/:ds-test/=lib/m-extensions/lib/uniswap-v4-periphery/lib/permit2/lib/forge-gas-snapshot/lib/forge-std/lib/ds-test/src/",
"lib/m-extensions/lib/uniswap-v4-periphery/lib/permit2/lib/forge-gas-snapshot/lib/forge-std/:ds-test/=lib/m-extensions/lib/uniswap-v4-periphery/lib/permit2/lib/forge-gas-snapshot/lib/forge-std/lib/ds-test/src/",
"lib/m-extensions/lib/uniswap-v4-periphery/lib/v4-core/lib/openzeppelin-contracts/lib/forge-std/:ds-test/=lib/m-extensions/lib/uniswap-v4-periphery/lib/v4-core/lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/src/",
"lib/m-extensions/lib/uniswap-v4-periphery/lib/v4-core/lib/openzeppelin-contracts/lib/forge-std/:ds-test/=lib/m-extensions/lib/uniswap-v4-periphery/lib/v4-core/lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/src/",
"lib/m-extensions/lib/common/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/:erc4626-tests/=lib/m-extensions/lib/common/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/lib/erc4626-tests/",
"lib/m-extensions/lib/common/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/:erc4626-tests/=lib/m-extensions/lib/common/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/lib/erc4626-tests/",
"lib/m-extensions/lib/common/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/:forge-std/=lib/m-extensions/lib/common/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/lib/forge-std/src/",
"lib/m-extensions/lib/common/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/:forge-std/=lib/m-extensions/lib/common/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/lib/forge-std/src/",
"lib/m-extensions/lib/common/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/:halmos-cheatcodes/=lib/m-extensions/lib/common/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/",
"lib/m-extensions/lib/common/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/:halmos-cheatcodes/=lib/m-extensions/lib/common/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/",
"lib/m-extensions/lib/common/lib/safe-utils/lib/solidity-http/:forge-std/=lib/m-extensions/lib/common/lib/safe-utils/lib/solidity-http/lib/forge-std/src/",
"lib/m-extensions/lib/common/lib/safe-utils/lib/solidity-http/:forge-std/=lib/m-extensions/lib/common/lib/safe-utils/lib/solidity-http/lib/forge-std/src/",
"lib/m-extensions/lib/common/lib/safe-utils/lib/solidity-http/:solidity-stringutils/=lib/m-extensions/lib/common/lib/safe-utils/lib/solidity-http/lib/solidity-stringutils/",
"lib/m-extensions/lib/common/lib/safe-utils/lib/solidity-http/:solidity-stringutils/=lib/m-extensions/lib/common/lib/safe-utils/lib/solidity-http/lib/solidity-stringutils/",
"lib/m-extensions/lib/common/lib/safe-utils/lib/solidity-stringutils/:ds-test/=lib/m-extensions/lib/common/lib/safe-utils/lib/solidity-stringutils/lib/ds-test/src/",
"lib/m-extensions/lib/common/lib/safe-utils/lib/solidity-stringutils/:ds-test/=lib/m-extensions/lib/common/lib/safe-utils/lib/solidity-stringutils/lib/ds-test/src/",
"lib/m-extensions/lib/uniswap-v4-periphery/lib/permit2/lib/forge-gas-snapshot/:forge-std/=lib/m-extensions/lib/uniswap-v4-periphery/lib/permit2/lib/forge-gas-snapshot/lib/forge-std/src/",
"lib/m-extensions/lib/uniswap-v4-periphery/lib/permit2/lib/forge-gas-snapshot/:forge-std/=lib/m-extensions/lib/uniswap-v4-periphery/lib/permit2/lib/forge-gas-snapshot/lib/forge-std/src/",
"lib/m-extensions/lib/uniswap-v4-periphery/lib/permit2/lib/forge-std/:ds-test/=lib/m-extensions/lib/uniswap-v4-periphery/lib/permit2/lib/forge-std/lib/ds-test/src/",
"lib/m-extensions/lib/uniswap-v4-periphery/lib/permit2/lib/forge-std/:ds-test/=lib/m-extensions/lib/uniswap-v4-periphery/lib/permit2/lib/forge-std/lib/ds-test/src/",
"lib/m-extensions/lib/uniswap-v4-periphery/lib/permit2/lib/solmate/:ds-test/=lib/m-extensions/lib/uniswap-v4-periphery/lib/permit2/lib/solmate/lib/ds-test/src/",
"lib/m-extensions/lib/uniswap-v4-periphery/lib/permit2/lib/solmate/:ds-test/=lib/m-extensions/lib/uniswap-v4-periphery/lib/permit2/lib/solmate/lib/ds-test/src/",
"lib/m-extensions/lib/uniswap-v4-periphery/lib/v4-core/lib/openzeppelin-contracts/:erc4626-tests/=lib/m-extensions/lib/uniswap-v4-periphery/lib/v4-core/lib/openzeppelin-contracts/lib/erc4626-tests/",
"lib/m-extensions/lib/uniswap-v4-periphery/lib/v4-core/lib/openzeppelin-contracts/:erc4626-tests/=lib/m-extensions/lib/uniswap-v4-periphery/lib/v4-core/lib/openzeppelin-contracts/lib/erc4626-tests/",
"lib/m-extensions/lib/uniswap-v4-periphery/lib/v4-core/lib/openzeppelin-contracts/:forge-std/=lib/m-extensions/lib/uniswap-v4-periphery/lib/v4-core/lib/openzeppelin-contracts/lib/forge-std/src/",
"lib/m-extensions/lib/uniswap-v4-periphery/lib/v4-core/lib/openzeppelin-contracts/:forge-std/=lib/m-extensions/lib/uniswap-v4-periphery/lib/v4-core/lib/openzeppelin-contracts/lib/forge-std/src/",
"lib/m-extensions/lib/uniswap-v4-periphery/lib/v4-core/lib/solmate/:ds-test/=lib/m-extensions/lib/uniswap-v4-periphery/lib/v4-core/lib/solmate/lib/ds-test/src/",
"lib/m-extensions/lib/uniswap-v4-periphery/lib/v4-core/lib/solmate/:ds-test/=lib/m-extensions/lib/uniswap-v4-periphery/lib/v4-core/lib/solmate/lib/ds-test/src/",
"lib/m-extensions/lib/wrapped-m-token/lib/common/lib/forge-std/:ds-test/=lib/m-extensions/lib/wrapped-m-token/lib/common/lib/forge-std/lib/ds-test/src/",
"lib/m-extensions/lib/wrapped-m-token/lib/common/lib/forge-std/:ds-test/=lib/m-extensions/lib/wrapped-m-token/lib/common/lib/forge-std/lib/ds-test/src/",
"lib/m-extensions/lib/common/lib/openzeppelin-contracts-upgradeable/:erc4626-tests/=lib/m-extensions/lib/common/lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
"lib/m-extensions/lib/common/lib/openzeppelin-contracts-upgradeable/:erc4626-tests/=lib/m-extensions/lib/common/lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
"lib/m-extensions/lib/common/lib/openzeppelin-contracts-upgradeable/:forge-std/=lib/m-extensions/lib/common/lib/openzeppelin-contracts-upgradeable/lib/forge-std/src/",
"lib/m-extensions/lib/common/lib/openzeppelin-contracts-upgradeable/:forge-std/=lib/m-extensions/lib/common/lib/openzeppelin-contracts-upgradeable/lib/forge-std/src/",
"lib/m-extensions/lib/common/lib/openzeppelin-contracts-upgradeable/:halmos-cheatcodes/=lib/m-extensions/lib/common/lib/openzeppelin-contracts-upgradeable/lib/halmos-cheatcodes/src/",
"lib/m-extensions/lib/common/lib/openzeppelin-contracts-upgradeable/:halmos-cheatcodes/=lib/m-extensions/lib/common/lib/openzeppelin-contracts-upgradeable/lib/halmos-cheatcodes/src/",
"lib/m-extensions/lib/common/lib/openzeppelin-contracts-upgradeable/:openzeppelin-contracts/=lib/m-extensions/lib/common/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/",
"lib/m-extensions/lib/common/lib/openzeppelin-contracts-upgradeable/:openzeppelin-contracts/=lib/m-extensions/lib/common/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/",
"lib/m-extensions/lib/common/lib/openzeppelin-contracts/:erc4626-tests/=lib/m-extensions/lib/common/lib/openzeppelin-contracts/lib/erc4626-tests/",
"lib/m-extensions/lib/common/lib/openzeppelin-contracts/:erc4626-tests/=lib/m-extensions/lib/common/lib/openzeppelin-contracts/lib/erc4626-tests/",
"lib/m-extensions/lib/common/lib/openzeppelin-contracts/:forge-std/=lib/m-extensions/lib/common/lib/openzeppelin-contracts/lib/forge-std/src/",
"lib/m-extensions/lib/common/lib/openzeppelin-contracts/:forge-std/=lib/m-extensions/lib/common/lib/openzeppelin-contracts/lib/forge-std/src/",
"lib/m-extensions/lib/common/lib/openzeppelin-contracts/:halmos-cheatcodes/=lib/m-extensions/lib/common/lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/",
"lib/m-extensions/lib/common/lib/openzeppelin-contracts/:halmos-cheatcodes/=lib/m-extensions/lib/common/lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/",
"lib/m-extensions/lib/common/lib/safe-utils/:safe-smart-account/=lib/m-extensions/lib/common/lib/safe-utils/lib/safe-smart-account/contracts/",
"lib/m-extensions/lib/common/lib/safe-utils/:safe-smart-account/=lib/m-extensions/lib/common/lib/safe-utils/lib/safe-smart-account/contracts/",
"lib/m-extensions/lib/common/lib/safe-utils/:solidity-stringutils/=lib/m-extensions/lib/common/lib/safe-utils/lib/solidity-stringutils/src/",
"lib/m-extensions/lib/common/lib/safe-utils/:solidity-stringutils/=lib/m-extensions/lib/common/lib/safe-utils/lib/solidity-stringutils/src/",
"lib/m-extensions/lib/common/lib/safe-utils/:forge-std/=lib/m-extensions/lib/common/lib/safe-utils/lib/forge-std/src/",
"lib/m-extensions/lib/common/lib/safe-utils/:forge-std/=lib/m-extensions/lib/common/lib/safe-utils/lib/forge-std/src/",
"lib/m-extensions/lib/uniswap-v4-periphery/lib/permit2/:solmate/=lib/m-extensions/lib/uniswap-v4-periphery/lib/permit2/lib/solmate/",
"lib/m-extensions/lib/uniswap-v4-periphery/lib/permit2/:solmate/=lib/m-extensions/lib/uniswap-v4-periphery/lib/permit2/lib/solmate/",
"lib/m-extensions/lib/uniswap-v4-periphery/lib/permit2/:forge-std/=lib/m-extensions/lib/uniswap-v4-periphery/lib/permit2/lib/forge-std/src/",
"lib/m-extensions/lib/uniswap-v4-periphery/lib/permit2/:forge-std/=lib/m-extensions/lib/uniswap-v4-periphery/lib/permit2/lib/forge-std/src/",
"lib/m-extensions/lib/uniswap-v4-periphery/lib/permit2/:openzeppelin-contracts/=lib/m-extensions/lib/uniswap-v4-periphery/lib/permit2/lib/openzeppelin-contracts/",
"lib/m-extensions/lib/uniswap-v4-periphery/lib/permit2/:openzeppelin-contracts/=lib/m-extensions/lib/uniswap-v4-periphery/lib/permit2/lib/openzeppelin-contracts/",
"lib/m-extensions/lib/uniswap-v4-periphery/lib/v4-core/:solmate/=lib/m-extensions/lib/uniswap-v4-periphery/lib/v4-core/lib/solmate/",
"lib/m-extensions/lib/uniswap-v4-periphery/lib/v4-core/:solmate/=lib/m-extensions/lib/uniswap-v4-periphery/lib/v4-core/lib/solmate/",
"lib/m-extensions/lib/uniswap-v4-periphery/lib/v4-core/:forge-std/=lib/m-extensions/lib/uniswap-v4-periphery/lib/v4-core/lib/forge-std/src/",
"lib/m-extensions/lib/uniswap-v4-periphery/lib/v4-core/:forge-std/=lib/m-extensions/lib/uniswap-v4-periphery/lib/v4-core/lib/forge-std/src/",
"lib/m-extensions/lib/uniswap-v4-periphery/lib/v4-core/:openzeppelin-contracts/=lib/m-extensions/lib/uniswap-v4-periphery/lib/v4-core/lib/openzeppelin-contracts/",
"lib/m-extensions/lib/uniswap-v4-periphery/lib/v4-core/:openzeppelin-contracts/=lib/m-extensions/lib/uniswap-v4-periphery/lib/v4-core/lib/openzeppelin-contracts/",
"lib/m-extensions/lib/wrapped-m-token/lib/common/:forge-std/=lib/m-extensions/lib/wrapped-m-token/lib/common/lib/forge-std/src/",
"lib/m-extensions/lib/wrapped-m-token/lib/common/:forge-std/=lib/m-extensions/lib/wrapped-m-token/lib/common/lib/forge-std/src/",
"lib/m-extensions/lib/common/:safe-smart-account/=lib/m-extensions/lib/common/lib/safe-utils/lib/safe-smart-account/contracts/",
"lib/m-extensions/lib/common/:safe-smart-account/=lib/m-extensions/lib/common/lib/safe-utils/lib/safe-smart-account/contracts/",
"lib/m-extensions/lib/common/:forge-std/=lib/m-extensions/lib/common/lib/forge-std/src/",
"lib/m-extensions/lib/common/:forge-std/=lib/m-extensions/lib/common/lib/forge-std/src/",
"lib/m-extensions/lib/common/:openzeppelin-contracts-upgradeable/=lib/m-extensions/lib/common/lib/openzeppelin-contracts-upgradeable/",
"lib/m-extensions/lib/common/:openzeppelin-contracts-upgradeable/=lib/m-extensions/lib/common/lib/openzeppelin-contracts-upgradeable/",
"lib/m-extensions/lib/common/:openzeppelin-contracts/=lib/m-extensions/lib/common/lib/openzeppelin-contracts/",
"lib/m-extensions/lib/common/:openzeppelin-contracts/=lib/m-extensions/lib/common/lib/openzeppelin-contracts/",
"lib/m-extensions/lib/openzeppelin-foundry-upgrades/:forge-std/=lib/m-extensions/lib/openzeppelin-foundry-upgrades/lib/forge-std/src/",
"lib/m-extensions/lib/openzeppelin-foundry-upgrades/:forge-std/=lib/m-extensions/lib/openzeppelin-foundry-upgrades/lib/forge-std/src/",
"lib/m-extensions/lib/wrapped-m-token/:common/=lib/m-extensions/lib/wrapped-m-token/lib/common/src/",
"lib/m-extensions/lib/wrapped-m-token/:common/=lib/m-extensions/lib/wrapped-m-token/lib/common/src/",
"lib/m-extensions/lib/wrapped-m-token/:forge-std/=lib/m-extensions/lib/wrapped-m-token/lib/forge-std/src/",
"lib/m-extensions/lib/wrapped-m-token/:forge-std/=lib/m-extensions/lib/wrapped-m-token/lib/forge-std/src/",
"lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/:erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/lib/erc4626-tests/",
"lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/:erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/lib/erc4626-tests/",
"lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/:forge-std/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/lib/forge-std/src/",
"lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/:forge-std/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/lib/forge-std/src/",
"lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/:halmos-cheatcodes/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/",
"lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/:halmos-cheatcodes/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/",
"lib/m-extensions/:safe-smart-account/=lib/m-extensions/lib/common/lib/safe-utils/lib/safe-smart-account/contracts/",
"lib/m-extensions/:safe-smart-account/=lib/m-extensions/lib/common/lib/safe-utils/lib/safe-smart-account/contracts/",
"lib/m-extensions/:common/=lib/m-extensions/lib/common/",
"lib/m-extensions/:common/=lib/m-extensions/lib/common/",
"lib/m-extensions/:forge-std/=lib/m-extensions/lib/forge-std/src/",
"lib/m-extensions/:forge-std/=lib/m-extensions/lib/forge-std/src/",
"lib/openzeppelin-contracts-upgradeable/:erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
"lib/openzeppelin-contracts-upgradeable/:erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
"lib/openzeppelin-contracts-upgradeable/:forge-std/=lib/openzeppelin-contracts-upgradeable/lib/forge-std/src/",
"lib/openzeppelin-contracts-upgradeable/:forge-std/=lib/openzeppelin-contracts-upgradeable/lib/forge-std/src/",
"lib/openzeppelin-contracts-upgradeable/:halmos-cheatcodes/=lib/openzeppelin-contracts-upgradeable/lib/halmos-cheatcodes/src/",
"lib/openzeppelin-contracts-upgradeable/:halmos-cheatcodes/=lib/openzeppelin-contracts-upgradeable/lib/halmos-cheatcodes/src/",
"lib/openzeppelin-contracts-upgradeable/:openzeppelin-contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/",
"lib/openzeppelin-contracts-upgradeable/:openzeppelin-contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/",
"@ensdomains/=lib/m-extensions/lib/uniswap-v4-periphery/lib/v4-core/node_modules/@ensdomains/",
"@openzeppelin/=lib/m-extensions/lib/uniswap-v4-periphery/lib/v4-core/lib/openzeppelin-contracts/",
"@uniswap/v4-core/=lib/m-extensions/lib/uniswap-v4-periphery/lib/v4-core/",
"common/=lib/m-extensions/lib/wrapped-m-token/lib/common/src/",
"ds-test/=lib/m-extensions/lib/common/lib/safe-utils/lib/solidity-stringutils/lib/ds-test/src/",
"erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
"forge-gas-snapshot/=lib/m-extensions/lib/uniswap-v4-periphery/lib/permit2/lib/forge-gas-snapshot/src/",
"forge-std/=lib/forge-std/src/",
"halmos-cheatcodes/=lib/openzeppelin-contracts-upgradeable/lib/halmos-cheatcodes/src/",
"hardhat/=lib/m-extensions/lib/uniswap-v4-periphery/lib/v4-core/node_modules/hardhat/",
"m-extensions/=lib/m-extensions/",
"openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
"openzeppelin-contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/",
"openzeppelin-foundry-upgrades/=lib/m-extensions/lib/openzeppelin-foundry-upgrades/src/",
"permit2/=lib/m-extensions/lib/uniswap-v4-periphery/lib/permit2/",
"safe-smart-account/=lib/m-extensions/lib/common/lib/safe-utils/lib/safe-smart-account/",
"safe-utils/=lib/m-extensions/lib/common/lib/safe-utils/src/",
"solidity-http/=lib/m-extensions/lib/common/lib/safe-utils/lib/solidity-http/src/",
"solidity-stringutils/=lib/m-extensions/lib/common/lib/safe-utils/lib/solidity-stringutils/",
"solmate/=lib/m-extensions/lib/uniswap-v4-periphery/lib/permit2/lib/solmate/",
"uniswap-v4-periphery/=lib/m-extensions/lib/uniswap-v4-periphery/",
"v4-core/=lib/m-extensions/lib/uniswap-v4-periphery/lib/v4-core/src/",
"wrapped-m-token/=lib/m-extensions/lib/wrapped-m-token/"
]
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.