Files
Meridian/contracts/interfaces/ICompliance.sol
Claude AI 7f001ff5f0 Initial Meridian Protocol implementation
- Complete MeridianToken standard with compliance & reserve checks
- Multi-custodian ReserveAggregator supporting bank/crypto/fund admin
- Comprehensive Compliance engine with KYC/AML/sanctions
- Full interface definitions and deployment scripts
- Test suite for core functionality
- Ready for GBP launch with Anchorage custody integration
2026-04-16 19:42:26 +00:00

89 lines
3.0 KiB
Solidity

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
/**
* @title ICompliance
* @dev Interface for KYC, sanctions screening, and AML compliance
*/
interface ICompliance {
struct KYCRecord {
bool isWhitelisted;
uint256 kycLevel; // 1=basic, 2=enhanced, 3=institutional
uint256 whitelistTime;
uint256 expiryTime;
string jurisdiction;
}
struct VelocityLimits {
uint256 dailyLimit;
uint256 monthlyLimit;
uint256 dailySpent;
uint256 monthlySpent;
uint256 lastDayReset;
uint256 lastMonthReset;
}
/**
* @dev Check if address is whitelisted for KYC
* @param account Address to check
* @return isWhitelisted True if account passed KYC
*/
function isWhitelisted(address account) external view returns (bool);
/**
* @dev Check if address is on sanctions list
* @param account Address to check
* @return isSanctioned True if account is sanctioned
*/
function isSanctioned(address account) external view returns (bool);
/**
* @dev Check velocity limits for transaction
* @param account Address making transaction
* @param amount Transaction amount
* @return withinLimits True if transaction is within velocity limits
*/
function checkVelocityLimits(address account, uint256 amount) external view returns (bool withinLimits);
/**
* @dev Get KYC record for address
* @param account Address to query
*/
function getKYCRecord(address account) external view returns (KYCRecord memory);
/**
* @dev Get velocity limits for address
* @param account Address to query
*/
function getVelocityLimits(address account) external view returns (VelocityLimits memory);
/**
* @dev Update velocity tracking after transaction
* @param account Address that made transaction
* @param amount Transaction amount
*/
function updateVelocityTracking(address account, uint256 amount) external;
/**
* @dev Check if transaction should trigger AML reporting
* @param from Sender address
* @param to Recipient address
* @param amount Transaction amount
* @return shouldReport True if transaction exceeds reporting thresholds
* @return reportType Type of report needed (1=CTR, 2=SAR, etc.)
*/
function checkReportingThresholds(
address from,
address to,
uint256 amount
) external view returns (bool shouldReport, uint8 reportType);
// Events
event AccountWhitelisted(address indexed account, uint256 kycLevel, string jurisdiction);
event AccountBlacklisted(address indexed account, string reason);
event SanctionsListUpdated(uint256 newListHash);
event VelocityLimitsUpdated(address indexed account, uint256 dailyLimit, uint256 monthlyLimit);
event ReportingThresholdTriggered(address indexed from, address indexed to, uint256 amount, uint8 reportType);
event VelocityLimitExceeded(address indexed account, uint256 attempted, uint256 remaining);
}