IIntentMatcher
Interface for intent-based coverage pricing and matching.
View deployed contract addresses in the Contract Addresses section.
The IIntentMatcher facilitates the "Intent-Based" pricing model. It acts as an order book where buyers post coverage requests and underwriters sign off-chain offers ("Intents"). The matcher validates and executes these trades, settling them on-chain via the PolicyManager.
Interface
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.20; /** * @title IIntentMatcher * @notice Interface for intent-based coverage pricing system */ interface IIntentMatcher { // ==================== Structs ==================== struct CoverageIntent { address maker; // Underwriter offering coverage uint256 poolId; // Pool to allocate capital from uint256 coverageAmount; // Amount of coverage offered uint256 premiumRateBps; // Annual premium rate in basis points uint256 minDuration; // Minimum coverage duration in seconds uint256 maxDuration; // Maximum coverage duration in seconds uint256 nonce; // Nonce for replay protection uint256 expiry; // Intent expiration timestamp uint256 salt; // Unique salt to avoid hash collisions bool requiresUpfront; // If true, full premium must be paid upfront uint16 cancellationPenaltyBps; // Early cancellation penalty in basis points uint256 minFillAmount; // Minimum fill amount for partial fills address whitelistedBuyer; // Optional buyer allowlist (address(0) for open) } struct CoverageBuyOrder { address taker; // Coverage buyer uint256 poolId; // Pool to buy coverage from uint256 coverageAmount; // Coverage desired uint256 maxPremiumRateBps; // Maximum annual rate willing to pay uint256 duration; // Desired coverage duration in seconds uint256 premiumDeposit; // Upfront premium payment uint256 nonce; // Nonce for replay protection uint256 expiry; // Order expiration timestamp uint256 salt; // Unique salt for the buy order bytes32 referralCode; // Optional referral code address vault; // Optional ERC4626 vault for vault cover uint256 sharesToCover; // Signed total shares to cover (0 for standard cover) } struct ReserveIntent { address solver; address underwriter; uint256 poolId; uint32 minCoverageDuration; // Minimum duration (seconds) the syndicate is willing to underwrite uint32 maxCoverageDuration; // Maximum duration (seconds) uint256 coverageAmount; // Total coverage reserved for this intent uint256 minFillAmount; // Minimum fill amount allowed when partial fills are enabled bool allowPartialFill; // Whether the syndicate permits partial fills uint64 reservationExpiry; // Timestamp when the reservation expires uint96 nonce; // Unique per-reserve-intent nonce address whitelistedBuyer; // Optional buyer allowlist (address(0) for open) uint16 minPremiumBps; // Minimum premium rate in basis points (seller's floor) uint16 cancellationPenaltyBps; // Cancellation penalty in basis points } // ==================== Events ==================== event IntentMatched( address indexed underwriter, address indexed buyer, uint256 indexed poolId, uint256 coverageAmount, uint256 premiumRateBps, uint256 duration, uint256 policyId ); event NonceIncremented(address indexed user, uint256 newNonce); // ==================== Functions ==================== /** * @notice Execute one or more matched intents to create coverage policies * @dev For single intent execution, pass arrays of length 1 */ function executeMatchedIntent( CoverageIntent[] calldata intents, bytes[] calldata intentSignatures, CoverageBuyOrder calldata order, bytes calldata orderSignature, uint256[] calldata fillAmounts, address vault, uint256 sharesToCover, uint256 permit2Nonce, uint256 permit2Deadline, bytes calldata permit2Signature ) external returns (uint256[] memory policyIds); /** * @notice Generates EIP-712 hash for intent */ function getIntentHash(CoverageIntent calldata intent) external view returns (bytes32); /** * @notice Generates EIP-712 hash for buy order */ function getOrderHash(CoverageBuyOrder calldata order) external view returns (bytes32); /** * @notice Increments user's nonce */ function incrementNonce() external; /** * @notice Gets user's current nonce */ function nonces(address user) external view returns (uint256); }
Intent Flow
Key Changes from Previous Version
-
Unified Execute Function: The separate
executeMatchedIntentandexecuteMatchedIntentBatchhave been merged into a single function that handles both cases. -
Vault Cover Support: The
vaultandsharesToCoverparameters enable vault cover purchases through the same flow. -
Enhanced ReserveIntent: Added
minPremiumBps(seller's floor) andcancellationPenaltyBpsfor more sophisticated underwriting control. -
Removed On-Chain Orderbook: The
postBuyOrder,fillBuyOrder,cancelBuyOrder, and related orderbook functions have been removed in favor of the off-chain intent matching model.
Related Documentation
- Intent-Based Pricing - How the intent system works
- ISyndicate - Reservation management
- IPolicyManager - Policy creation