Quantillon Protocol

Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

IstQEURO

Git Source

Author: Quantillon Labs - Nicolas Bellengé - @chewbaccoin

Interface for the stQEURO yield-bearing wrapper token (yield accrual mechanism)

Note: security-contact: team@quantillon.money

Functions

initialize

Initializes the stQEURO token

Sets up the stQEURO token with initial configuration and assigns roles to admin

Notes:

  • security: Validates all addresses are not zero and initializes roles

  • validation: Validates admin is not address(0), all contract addresses are valid

  • state-changes: Initializes roles, sets contract addresses, enables staking

  • events: Emits role assignment and initialization events

  • errors: Throws InvalidAddress if any address is zero

  • reentrancy: Protected by onlyInitializing modifier

  • access: Internal function - only callable during initialization

  • oracle: No oracle dependencies

function initialize(
    address admin,
    address _qeuro,
    address _yieldShift,
    address _usdc,
    address _treasury,
    address timelock
) external;

Parameters

NameTypeDescription
adminaddressAdmin address
_qeuroaddressQEURO token address
_yieldShiftaddressYieldShift contract address
_usdcaddressUSDC token address
_treasuryaddressTreasury address
timelockaddressTimelock contract address

stake

Stake QEURO to receive stQEURO

Converts QEURO to stQEURO at current exchange rate with yield accrual

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function stake(uint256 qeuroAmount) external returns (uint256 stQEUROAmount);

Parameters

NameTypeDescription
qeuroAmountuint256Amount of QEURO to stake

Returns

NameTypeDescription
stQEUROAmountuint256Amount of stQEURO received

unstake

Unstake QEURO by burning stQEURO

Converts stQEURO back to QEURO at current exchange rate

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function unstake(uint256 stQEUROAmount) external returns (uint256 qeuroAmount);

Parameters

NameTypeDescription
stQEUROAmountuint256Amount of stQEURO to burn

Returns

NameTypeDescription
qeuroAmountuint256Amount of QEURO received

batchStake

Batch stake QEURO amounts

Efficiently stakes multiple QEURO amounts in a single transaction

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function batchStake(uint256[] calldata qeuroAmounts) external returns (uint256[] memory stQEUROAmounts);

Parameters

NameTypeDescription
qeuroAmountsuint256[]Array of QEURO amounts

Returns

NameTypeDescription
stQEUROAmountsuint256[]Array of stQEURO minted

batchUnstake

Batch unstake stQEURO amounts

Efficiently unstakes multiple stQEURO amounts in a single transaction

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function batchUnstake(uint256[] calldata stQEUROAmounts) external returns (uint256[] memory qeuroAmounts);

Parameters

NameTypeDescription
stQEUROAmountsuint256[]Array of stQEURO amounts

Returns

NameTypeDescription
qeuroAmountsuint256[]Array of QEURO returned

batchTransfer

Batch transfer stQEURO to multiple recipients

Efficiently transfers stQEURO to multiple recipients in a single transaction

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function batchTransfer(address[] calldata recipients, uint256[] calldata amounts) external returns (bool);

Parameters

NameTypeDescription
recipientsaddress[]Array of recipient addresses
amountsuint256[]Array of amounts to transfer

Returns

NameTypeDescription
<none>boolsuccess True if all transfers succeeded

distributeYield

Distribute yield to stQEURO holders (increases exchange rate)

Distributes yield by increasing the exchange rate for all stQEURO holders

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function distributeYield(uint256 yieldAmount) external;

Parameters

NameTypeDescription
yieldAmountuint256Amount of yield in USDC

claimYield

Claim accumulated yield for a user (in USDC)

Claims the user's accumulated yield and transfers it to their address

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function claimYield() external returns (uint256 yieldAmount);

Returns

NameTypeDescription
yieldAmountuint256Amount of yield claimed

getPendingYield

Get pending yield for a user (in USDC)

Returns the amount of yield available for a specific user to claim

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function getPendingYield(address user) external view returns (uint256 yieldAmount);

Parameters

NameTypeDescription
useraddressUser address

Returns

NameTypeDescription
yieldAmountuint256Pending yield amount

getExchangeRate

Get current exchange rate between QEURO and stQEURO

Returns the current exchange rate used for staking/unstaking operations

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function getExchangeRate() external view returns (uint256);

Returns

NameTypeDescription
<none>uint256exchangeRate Current exchange rate (18 decimals)

getTVL

Get total value locked in stQEURO

Returns the total value locked in the stQEURO system

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function getTVL() external view returns (uint256);

Returns

NameTypeDescription
<none>uint256tvl Total value locked (18 decimals)

getQEUROEquivalent

Get user's QEURO equivalent balance

Returns the QEURO equivalent value of a user's stQEURO balance

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function getQEUROEquivalent(address user) external view returns (uint256 qeuroEquivalent);

Parameters

NameTypeDescription
useraddressUser address

Returns

NameTypeDescription
qeuroEquivalentuint256QEURO equivalent of stQEURO balance

getStakingStats

Get staking statistics

Returns comprehensive staking statistics and metrics

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function getStakingStats()
    external
    view
    returns (
        uint256 totalStQEUROSupply,
        uint256 totalQEUROUnderlying,
        uint256 currentExchangeRate,
        uint256 _totalYieldEarned,
        uint256 apy
    );

Returns

NameTypeDescription
totalStQEUROSupplyuint256Total stQEURO supply
totalQEUROUnderlyinguint256Total QEURO underlying
currentExchangeRateuint256Current exchange rate
_totalYieldEarneduint256Total yield earned
apyuint256Annual percentage yield

updateYieldParameters

Update yield parameters

Updates yield-related parameters with security checks

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function updateYieldParameters(uint256 _yieldFee, uint256 _minYieldThreshold, uint256 _maxUpdateFrequency) external;

Parameters

NameTypeDescription
_yieldFeeuint256New yield fee percentage
_minYieldThresholduint256New minimum yield threshold
_maxUpdateFrequencyuint256New maximum update frequency

updateTreasury

Update treasury address

Updates the treasury address for yield distribution

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function updateTreasury(address _treasury) external;

Parameters

NameTypeDescription
_treasuryaddressNew treasury address

pause

Pause the contract

Pauses all stQEURO operations for emergency situations

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function pause() external;

unpause

Unpause the contract

Resumes all stQEURO operations after being paused

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function unpause() external;

emergencyWithdraw

Emergency withdrawal of QEURO

Allows emergency withdrawal of QEURO for a specific user

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function emergencyWithdraw(address user) external;

Parameters

NameTypeDescription
useraddressUser address to withdraw for

recoverToken

Recover accidentally sent tokens

Allows recovery of ERC20 tokens accidentally sent to the contract

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function recoverToken(address token, uint256 amount) external;

Parameters

NameTypeDescription
tokenaddressToken address to recover
amountuint256Amount to transfer

recoverETH

Recover accidentally sent ETH

Allows recovery of ETH accidentally sent to the contract

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function recoverETH() external;

name

Returns the name of the token

Returns the token name for display purposes

Notes:

  • security: No security validations required - view function

  • validation: No input validation required - view function

  • state-changes: No state changes - view function only

  • events: No events emitted

  • errors: No errors thrown - safe view function

  • reentrancy: Not applicable - view function

  • access: Public - anyone can query token name

  • oracle: No oracle dependencies

function name() external view returns (string memory);

Returns

NameTypeDescription
<none>stringThe token name

symbol

Returns the symbol of the token

Returns the token symbol for display purposes

Notes:

  • security: No security validations required - view function

  • validation: No input validation required - view function

  • state-changes: No state changes - view function only

  • events: No events emitted

  • errors: No errors thrown - safe view function

  • reentrancy: Not applicable - view function

  • access: Public - anyone can query token symbol

  • oracle: No oracle dependencies

function symbol() external view returns (string memory);

Returns

NameTypeDescription
<none>stringThe token symbol

decimals

Returns the decimals of the token

Returns the number of decimals used for token amounts

Notes:

  • security: No security validations required - view function

  • validation: No input validation required - view function

  • state-changes: No state changes - view function only

  • events: No events emitted

  • errors: No errors thrown - safe view function

  • reentrancy: Not applicable - view function

  • access: Public - anyone can query token decimals

  • oracle: No oracle dependencies

function decimals() external view returns (uint8);

Returns

NameTypeDescription
<none>uint8The number of decimals

totalSupply

Returns the total supply of the token

Returns the total amount of tokens in existence

Notes:

  • security: No security validations required - view function

  • validation: No input validation required - view function

  • state-changes: No state changes - view function only

  • events: No events emitted

  • errors: No errors thrown - safe view function

  • reentrancy: Not applicable - view function

  • access: Public - anyone can query total supply

  • oracle: No oracle dependencies

function totalSupply() external view returns (uint256);

Returns

NameTypeDescription
<none>uint256The total supply

balanceOf

Returns the balance of an account

Returns the token balance of the specified account

Notes:

  • security: No security validations required - view function

  • validation: No input validation required - view function

  • state-changes: No state changes - view function only

  • events: No events emitted

  • errors: No errors thrown - safe view function

  • reentrancy: Not applicable - view function

  • access: Public - anyone can query account balance

  • oracle: No oracle dependencies

function balanceOf(address account) external view returns (uint256);

Parameters

NameTypeDescription
accountaddressThe account to check

Returns

NameTypeDescription
<none>uint256The balance of the account

transfer

Transfers tokens to a recipient

Transfers the specified amount of tokens to the recipient

Notes:

  • security: Validates recipient is not address(0) and caller has sufficient balance

  • validation: Validates to != address(0) and amount <= balanceOf(msg.sender)

  • state-changes: Updates balances of sender and recipient

  • events: Emits Transfer event

  • errors: Throws InsufficientBalance if amount > balance

  • reentrancy: Not protected - no external calls

  • access: Public - any token holder can transfer

  • oracle: No oracle dependencies

function transfer(address to, uint256 amount) external returns (bool);

Parameters

NameTypeDescription
toaddressThe recipient address
amountuint256The amount to transfer

Returns

NameTypeDescription
<none>boolTrue if the transfer succeeded

allowance

Returns the allowance for a spender

Returns the amount of tokens that the spender is allowed to spend

Notes:

  • security: No security validations required - view function

  • validation: No input validation required - view function

  • state-changes: No state changes - view function only

  • events: No events emitted

  • errors: No errors thrown - safe view function

  • reentrancy: Not applicable - view function

  • access: Public - anyone can query allowance

  • oracle: No oracle dependencies

function allowance(address owner, address spender) external view returns (uint256);

Parameters

NameTypeDescription
owneraddressThe owner address
spenderaddressThe spender address

Returns

NameTypeDescription
<none>uint256The allowance amount

approve

Approves a spender to spend tokens

Sets the allowance for the spender to spend tokens on behalf of the caller

Notes:

  • security: Validates spender is not address(0)

  • validation: Validates spender != address(0)

  • state-changes: Updates allowance mapping

  • events: Emits Approval event

  • errors: No errors thrown - safe function

  • reentrancy: Not protected - no external calls

  • access: Public - any token holder can approve

  • oracle: No oracle dependencies

function approve(address spender, uint256 amount) external returns (bool);

Parameters

NameTypeDescription
spenderaddressThe spender address
amountuint256The amount to approve

Returns

NameTypeDescription
<none>boolTrue if the approval succeeded

transferFrom

Transfers tokens from one account to another

Transfers tokens from the from account to the to account

Notes:

  • security: Validates recipient is not address(0) and sufficient allowance

  • validation: Validates to != address(0) and amount <= allowance(from, msg.sender)

  • state-changes: Updates balances and allowance

  • events: Emits Transfer event

  • errors: Throws InsufficientAllowance if amount > allowance

  • reentrancy: Not protected - no external calls

  • access: Public - any approved spender can transfer

  • oracle: No oracle dependencies

function transferFrom(address from, address to, uint256 amount) external returns (bool);

Parameters

NameTypeDescription
fromaddressThe sender address
toaddressThe recipient address
amountuint256The amount to transfer

Returns

NameTypeDescription
<none>boolTrue if the transfer succeeded

hasRole

Checks if an account has a specific role

Returns true if the account has been granted the role

Notes:

  • security: No security validations required - view function

  • validation: No input validation required - view function

  • state-changes: No state changes - view function only

  • events: No events emitted

  • errors: No errors thrown - safe view function

  • reentrancy: Not applicable - view function

  • access: Public - anyone can check roles

  • oracle: No oracle dependencies

function hasRole(bytes32 role, address account) external view returns (bool);

Parameters

NameTypeDescription
rolebytes32The role to check
accountaddressThe account to check

Returns

NameTypeDescription
<none>boolTrue if the account has the role

getRoleAdmin

Returns the admin role for a role

Returns the role that is the admin of the given role

Notes:

  • security: No security validations required - view function

  • validation: No input validation required - view function

  • state-changes: No state changes - view function only

  • events: No events emitted

  • errors: No errors thrown - safe view function

  • reentrancy: Not applicable - view function

  • access: Public - anyone can query role admin

  • oracle: No oracle dependencies

function getRoleAdmin(bytes32 role) external view returns (bytes32);

Parameters

NameTypeDescription
rolebytes32The role to check

Returns

NameTypeDescription
<none>bytes32The admin role

grantRole

Grants a role to an account

Grants the specified role to the account

Notes:

  • security: Validates caller has admin role for the specified role

  • validation: Validates account is not address(0)

  • state-changes: Grants role to account

  • events: Emits RoleGranted event

  • errors: Throws AccessControlUnauthorizedAccount if caller lacks admin role

  • reentrancy: Not protected - no external calls

  • access: Restricted to role admin

  • oracle: No oracle dependencies

function grantRole(bytes32 role, address account) external;

Parameters

NameTypeDescription
rolebytes32The role to grant
accountaddressThe account to grant the role to

revokeRole

Revokes a role from an account

Revokes the specified role from the account

Notes:

  • security: Validates caller has admin role for the specified role

  • validation: Validates account is not address(0)

  • state-changes: Revokes role from account

  • events: Emits RoleRevoked event

  • errors: Throws AccessControlUnauthorizedAccount if caller lacks admin role

  • reentrancy: Not protected - no external calls

  • access: Restricted to role admin

  • oracle: No oracle dependencies

function revokeRole(bytes32 role, address account) external;

Parameters

NameTypeDescription
rolebytes32The role to revoke
accountaddressThe account to revoke the role from

renounceRole

Renounces a role

Renounces the specified role from the caller

Notes:

  • security: Validates caller is renouncing their own role

  • validation: Validates callerConfirmation == msg.sender

  • state-changes: Removes role from caller

  • events: Emits RoleRenounced event

  • errors: Throws AccessControlInvalidCaller if callerConfirmation != msg.sender

  • reentrancy: Not protected - no external calls

  • access: Public - anyone can renounce their own roles

  • oracle: No oracle dependencies

function renounceRole(bytes32 role, address callerConfirmation) external;

Parameters

NameTypeDescription
rolebytes32The role to renounce
callerConfirmationaddressThe caller confirmation

paused

Returns the paused state

Returns true if the contract is paused

Notes:

  • security: No security validations required - view function

  • validation: No input validation required - view function

  • state-changes: No state changes - view function only

  • events: No events emitted

  • errors: No errors thrown - safe view function

  • reentrancy: Not applicable - view function

  • access: Public - anyone can check pause status

  • oracle: No oracle dependencies

function paused() external view returns (bool);

Returns

NameTypeDescription
<none>boolTrue if paused

upgradeTo

Upgrades the implementation

Upgrades the contract to a new implementation

Notes:

  • security: Validates caller has UPGRADER_ROLE

  • validation: Validates newImplementation is not address(0)

  • state-changes: Updates implementation address

  • events: Emits Upgraded event

  • errors: Throws AccessControlUnauthorizedAccount if caller lacks UPGRADER_ROLE

  • reentrancy: Not protected - no external calls

  • access: Restricted to UPGRADER_ROLE

  • oracle: No oracle dependencies

function upgradeTo(address newImplementation) external;

Parameters

NameTypeDescription
newImplementationaddressThe new implementation address

upgradeToAndCall

Upgrades the implementation and calls a function

Upgrades the contract and calls a function on the new implementation

Notes:

  • security: Validates caller has UPGRADER_ROLE

  • validation: Validates newImplementation is not address(0)

  • state-changes: Updates implementation address and calls initialization

  • events: Emits Upgraded event

  • errors: Throws AccessControlUnauthorizedAccount if caller lacks UPGRADER_ROLE

  • reentrancy: Not protected - no external calls

  • access: Restricted to UPGRADER_ROLE

  • oracle: No oracle dependencies

function upgradeToAndCall(address newImplementation, bytes memory data) external payable;

Parameters

NameTypeDescription
newImplementationaddressThe new implementation address
databytesThe function call data

GOVERNANCE_ROLE

Returns the governance role

Returns the role identifier for governance functions

Notes:

  • security: No security validations required - view function

  • validation: No input validation required - view function

  • state-changes: No state changes - view function only

  • events: No events emitted

  • errors: No errors thrown - safe view function

  • reentrancy: Not applicable - view function

  • access: Public - anyone can query role identifier

  • oracle: No oracle dependencies

function GOVERNANCE_ROLE() external view returns (bytes32);

Returns

NameTypeDescription
<none>bytes32The governance role

YIELD_MANAGER_ROLE

Returns the yield manager role

Returns the role identifier for yield management functions

Notes:

  • security: No security validations required - view function

  • validation: No input validation required - view function

  • state-changes: No state changes - view function only

  • events: No events emitted

  • errors: No errors thrown - safe view function

  • reentrancy: Not applicable - view function

  • access: Public - anyone can query role identifier

  • oracle: No oracle dependencies

function YIELD_MANAGER_ROLE() external view returns (bytes32);

Returns

NameTypeDescription
<none>bytes32The yield manager role

EMERGENCY_ROLE

Returns the emergency role

Returns the role identifier for emergency functions

Notes:

  • security: No security validations required - view function

  • validation: No input validation required - view function

  • state-changes: No state changes - view function only

  • events: No events emitted

  • errors: No errors thrown - safe view function

  • reentrancy: Not applicable - view function

  • access: Public - anyone can query role identifier

  • oracle: No oracle dependencies

function EMERGENCY_ROLE() external view returns (bytes32);

Returns

NameTypeDescription
<none>bytes32The emergency role

UPGRADER_ROLE

Returns the upgrader role

Returns the role identifier for upgrade functions

Notes:

  • security: No security validations required - view function

  • validation: No input validation required - view function

  • state-changes: No state changes - view function only

  • events: No events emitted

  • errors: No errors thrown - safe view function

  • reentrancy: Not applicable - view function

  • access: Public - anyone can query role identifier

  • oracle: No oracle dependencies

function UPGRADER_ROLE() external view returns (bytes32);

Returns

NameTypeDescription
<none>bytes32The upgrader role

qeuro

Returns the QEURO token address

Returns the address of the underlying QEURO token

Notes:

  • security: No security validations required - view function

  • validation: No input validation required - view function

  • state-changes: No state changes - view function only

  • events: No events emitted

  • errors: No errors thrown - safe view function

  • reentrancy: Not applicable - view function

  • access: Public - anyone can query token address

  • oracle: No oracle dependencies

function qeuro() external view returns (address);

Returns

NameTypeDescription
<none>addressThe QEURO token address

yieldShift

Returns the YieldShift contract address

Returns the address of the YieldShift contract

Notes:

  • security: No security validations required - view function

  • validation: No input validation required - view function

  • state-changes: No state changes - view function only

  • events: No events emitted

  • errors: No errors thrown - safe view function

  • reentrancy: Not applicable - view function

  • access: Public - anyone can query contract address

  • oracle: No oracle dependencies

function yieldShift() external view returns (address);

Returns

NameTypeDescription
<none>addressThe YieldShift contract address

usdc

Returns the USDC token address

Returns the address of the USDC token

Notes:

  • security: No security validations required - view function

  • validation: No input validation required - view function

  • state-changes: No state changes - view function only

  • events: No events emitted

  • errors: No errors thrown - safe view function

  • reentrancy: Not applicable - view function

  • access: Public - anyone can query token address

  • oracle: No oracle dependencies

function usdc() external view returns (address);

Returns

NameTypeDescription
<none>addressThe USDC token address

treasury

Returns the treasury address

Returns the address of the treasury contract

Notes:

  • security: No security validations required - view function

  • validation: No input validation required - view function

  • state-changes: No state changes - view function only

  • events: No events emitted

  • errors: No errors thrown - safe view function

  • reentrancy: Not applicable - view function

  • access: Public - anyone can query treasury address

  • oracle: No oracle dependencies

function treasury() external view returns (address);

Returns

NameTypeDescription
<none>addressThe treasury address

exchangeRate

Returns the current exchange rate

Returns the current exchange rate between QEURO and stQEURO

Notes:

  • security: No security validations required - view function

  • validation: No input validation required - view function

  • state-changes: No state changes - view function only

  • events: No events emitted

  • errors: No errors thrown - safe view function

  • reentrancy: Not applicable - view function

  • access: Public - anyone can query exchange rate

  • oracle: No oracle dependencies

function exchangeRate() external view returns (uint256);

Returns

NameTypeDescription
<none>uint256The current exchange rate

lastUpdateTime

Returns the last update time

Returns the timestamp of the last exchange rate update

Notes:

  • security: No security validations required - view function

  • validation: No input validation required - view function

  • state-changes: No state changes - view function only

  • events: No events emitted

  • errors: No errors thrown - safe view function

  • reentrancy: Not applicable - view function

  • access: Public - anyone can query last update time

  • oracle: No oracle dependencies

function lastUpdateTime() external view returns (uint256);

Returns

NameTypeDescription
<none>uint256The last update time

totalUnderlying

Returns the total underlying QEURO

Returns the total amount of QEURO underlying all stQEURO

Notes:

  • security: No security validations required - view function

  • validation: No input validation required - view function

  • state-changes: No state changes - view function only

  • events: No events emitted

  • errors: No errors thrown - safe view function

  • reentrancy: Not applicable - view function

  • access: Public - anyone can query total underlying

  • oracle: No oracle dependencies

function totalUnderlying() external view returns (uint256);

Returns

NameTypeDescription
<none>uint256The total underlying QEURO

totalYieldEarned

Returns the total yield earned

Returns the total amount of yield earned by all stQEURO holders

Notes:

  • security: No security validations required - view function

  • validation: No input validation required - view function

  • state-changes: No state changes - view function only

  • events: No events emitted

  • errors: No errors thrown - safe view function

  • reentrancy: Not applicable - view function

  • access: Public - anyone can query total yield earned

  • oracle: No oracle dependencies

function totalYieldEarned() external view returns (uint256);

Returns

NameTypeDescription
<none>uint256The total yield earned

yieldFee

Returns the yield fee percentage

Returns the percentage of yield that goes to the treasury

Notes:

  • security: No security validations required - view function

  • validation: No input validation required - view function

  • state-changes: No state changes - view function only

  • events: No events emitted

  • errors: No errors thrown - safe view function

  • reentrancy: Not applicable - view function

  • access: Public - anyone can query yield fee

  • oracle: No oracle dependencies

function yieldFee() external view returns (uint256);

Returns

NameTypeDescription
<none>uint256The yield fee percentage

minYieldThreshold

Returns the minimum yield threshold

Returns the minimum yield amount required for distribution

Notes:

  • security: No security validations required - view function

  • validation: No input validation required - view function

  • state-changes: No state changes - view function only

  • events: No events emitted

  • errors: No errors thrown - safe view function

  • reentrancy: Not applicable - view function

  • access: Public - anyone can query minimum yield threshold

  • oracle: No oracle dependencies

function minYieldThreshold() external view returns (uint256);

Returns

NameTypeDescription
<none>uint256The minimum yield threshold

maxUpdateFrequency

Returns the maximum update frequency

Returns the maximum frequency for exchange rate updates

Notes:

  • security: No security validations required - view function

  • validation: No input validation required - view function

  • state-changes: No state changes - view function only

  • events: No events emitted

  • errors: No errors thrown - safe view function

  • reentrancy: Not applicable - view function

  • access: Public - anyone can query maximum update frequency

  • oracle: No oracle dependencies

function maxUpdateFrequency() external view returns (uint256);

Returns

NameTypeDescription
<none>uint256The maximum update frequency

getVirtualProtectionStatus

Gets the virtual protection status and parameters

Returns virtual protection configuration for monitoring

Notes:

  • security: No security validations required - view function

  • validation: No input validation required - view function

  • state-changes: No state changes - view function only

  • events: No events emitted

  • errors: No errors thrown

  • reentrancy: Not applicable - view function

  • access: Public access - anyone can query virtual protection status

  • oracle: No oracle dependencies

function getVirtualProtectionStatus()
    external
    view
    returns (bool isEnabled, uint256 maxDeviation, uint256 lastUpdateTimestamp, uint256 virtualPrice);

Returns

NameTypeDescription
isEnabledboolWhether virtual protection is enabled
maxDeviationuint256Maximum allowed deviation from real price
lastUpdateTimestampuint256Last time the virtual price was updated
virtualPriceuint256Current virtual price