Quantillon Protocol

SignedSettlementLibrary

Git Source

Title: SignedSettlementLibrary

Linked entrypoint that keeps signature decoding outside the size-constrained vault.

Delegatecall retains the original payer and the existing guarded settlement functions.

Functions

version

Return the semantic version of this implementation.

Returns the declared configuration or derived value without updating state.

Notes:

  • security: Read-only; does not authorize settlement.

  • validation: Uses the declared input types; target interface calls may revert.

  • state-changes: None.

  • events: None.

  • errors: Propagates invalid input or target read failures.

  • reentrancy: Read-only.

  • access: Public.

  • oracle: No fresh observation is created; reference getters expose existing source data.

function version() external pure returns (string memory);

Returns

NameTypeDescription
<none>stringValue defined by this accessor or calculation.

executeWithQuote

Dispatch one signed operation with the original caller and existing accounting.

Invoked through the consumer; delegatecall retains its storage and original sender.

Notes:

  • security: Consumer permissions and accounting checks remain in force.

  • validation: Applies the selected operation's bounds; failures revert the entire call.

  • state-changes: Updates the calling consumer and downstream contracts as described above.

  • events: Underlying operation and token events when applicable.

  • errors: Reverts on invalid inputs, permissions or failed downstream calls.

  • reentrancy: The consuming operation retains its existing reentrancy guards.

  • access: Consumer entrypoint permissions; this helper grants no additional authority.

  • oracle: Uses the consumer's configured reference and execution paths where the operation requires pricing.

function executeWithQuote(bytes calldata callData, bytes calldata authorization)
    external
    returns (bytes memory result);

Parameters

NameTypeDescription
callDatabytesComplete ABI-encoded operation, including route and output bounds.
authorizationbytesABI-encoded report or quote authorization required by this entrypoint.

Returns

NameTypeDescription
resultbytesABI-encoded return data of the dispatched operation.

preparePoolQuote

Begin an atomic pool route bound to its original user and complete calldata.

Invoked through the consumer; delegatecall retains its storage and original sender.

Notes:

  • security: Consumer permissions and accounting checks remain in force.

  • validation: Applies the selected operation's bounds; failures revert the entire call.

  • state-changes: Updates the calling consumer and downstream contracts as described above.

  • events: Underlying operation and token events when applicable.

  • errors: Reverts on invalid inputs, permissions or failed downstream calls.

  • reentrancy: The consuming operation retains its existing reentrancy guards.

  • access: Consumer entrypoint permissions; this helper grants no additional authority.

  • oracle: Uses the consumer's configured reference and execution paths where the operation requires pricing.

function preparePoolQuote(address user, bytes calldata callData, bytes calldata authorization) external;

Parameters

NameTypeDescription
useraddressOriginal payer whose nonce and settlement are bound.
callDatabytesComplete ABI-encoded operation, including route and output bounds.
authorizationbytesABI-encoded report or quote authorization required by this entrypoint.

finishPoolQuote

Finish the atomic pool route after its conversion has been consumed.

Invoked through the consumer; delegatecall retains its storage and original sender.

Notes:

  • security: Consumer permissions and accounting checks remain in force.

  • validation: Applies the selected operation's bounds; failures revert the entire call.

  • state-changes: Updates the calling consumer and downstream contracts as described above.

  • events: Underlying operation and token events when applicable.

  • errors: Reverts on invalid inputs, permissions or failed downstream calls.

  • reentrancy: The consuming operation retains its existing reentrancy guards.

  • access: Consumer entrypoint permissions; this helper grants no additional authority.

  • oracle: Uses the consumer's configured reference and execution paths where the operation requires pricing.

function finishPoolQuote() external;

emergencyRedeemQEURO

Run the governed budgeted emergency redemption path.

Invoked through the consumer; delegatecall retains its storage and original sender.

Notes:

  • security: Consumer permissions and accounting checks remain in force.

  • validation: Applies the selected operation's bounds; failures revert the entire call.

  • state-changes: Updates the calling consumer and downstream contracts as described above.

  • events: Underlying operation and token events when applicable.

  • errors: Reverts on invalid inputs, permissions or failed downstream calls.

  • reentrancy: The consuming operation retains its existing reentrancy guards.

  • access: Consumer entrypoint permissions; this helper grants no additional authority.

  • oracle: Uses the consumer's configured reference and execution paths where the operation requires pricing.

function emergencyRedeemQEURO(uint256 amount, uint256 minimum) external;

Parameters

NameTypeDescription
amountuint256Amount in the token units of the selected operation.
minimumuint256Minimum acceptable output in the output token's raw units.

execute

Dispatch the permitted operation while preserving the consumer's original caller.

Invoked through the consumer; delegatecall retains its storage and original sender.

Notes:

  • security: Consumer permissions and accounting checks remain in force.

  • validation: Applies the selected operation's bounds; failures revert the entire call.

  • state-changes: Updates the calling consumer and downstream contracts as described above.

  • events: Underlying operation and token events when applicable.

  • errors: Reverts on invalid inputs, permissions or failed downstream calls.

  • reentrancy: The consuming operation retains its existing reentrancy guards.

  • access: Consumer entrypoint permissions; this helper grants no additional authority.

  • oracle: Uses the consumer's configured reference and execution paths where the operation requires pricing.

function execute(address module, bytes calldata callData, bytes calldata authorization)
    external
    returns (bytes memory result);

Parameters

NameTypeDescription
moduleaddressExecution module already bound by the calling vault.
callDatabytesComplete ABI-encoded operation, including route and output bounds.
authorizationbytesABI-encoded report or quote authorization required by this entrypoint.

Returns

NameTypeDescription
resultbytesABI-encoded return data of the dispatched operation.

_execute

function _execute(address module, bytes calldata callData, bytes calldata authorization)
    private
    returns (bytes memory result);

_preparePool

function _preparePool(address module, address user, bytes calldata callData, bytes calldata authorization) private;

emergencyRedeem

Run the vault redemption with a bounded emergency context.

Invoked through the consumer; delegatecall retains its storage and original sender.

Notes:

  • security: Consumer permissions and accounting checks remain in force.

  • validation: Applies the selected operation's bounds; failures revert the entire call.

  • state-changes: Updates the calling consumer and downstream contracts as described above.

  • events: Underlying operation and token events when applicable.

  • errors: Reverts on invalid inputs, permissions or failed downstream calls.

  • reentrancy: The consuming operation retains its existing reentrancy guards.

  • access: Consumer entrypoint permissions; this helper grants no additional authority.

  • oracle: Uses the consumer's configured reference and execution paths where the operation requires pricing.

function emergencyRedeem(address module, uint256 amount, uint256 minimum) external;

Parameters

NameTypeDescription
moduleaddressExecution module already bound by the calling vault.
amountuint256Amount in the token units of the selected operation.
minimumuint256Minimum acceptable output in the output token's raw units.

_emergencyRedeem

function _emergencyRedeem(address module, uint256 amount, uint256 minimum) private;

_finishPool

function _finishPool(address module) private;

stake

Deposit newly minted QEURO and enforce the actual minimum share output.

Invoked through the consumer; delegatecall retains its storage and original sender.

Notes:

  • security: Consumer permissions and accounting checks remain in force.

  • validation: Applies the selected operation's bounds; failures revert the entire call.

  • state-changes: Updates the calling consumer and downstream contracts as described above.

  • events: Underlying operation and token events when applicable.

  • errors: Reverts on invalid inputs, permissions or failed downstream calls.

  • reentrancy: The consuming operation retains its existing reentrancy guards.

  • access: Consumer entrypoint permissions; this helper grants no additional authority.

  • oracle: Uses the consumer's configured reference and execution paths where the operation requires pricing.

function stake(address token, address shares, uint256 amount, uint256 minimum) external returns (uint256 minted);

Parameters

NameTypeDescription
tokenaddressToken whose balances and transfers are checked.
sharesaddressstQEURO share token receiving the deposit.
amountuint256Amount in the token units of the selected operation.
minimumuint256Minimum acceptable output in the output token's raw units.

Returns

NameTypeDescription
minteduint256Value defined by this accessor or calculation.

_dispatch

function _dispatch(bytes memory callData) private returns (bytes memory result);