RiskManager
File:contracts/src/gov/RiskManager.solPattern: UUPS Upgradeable
Inherits:
Initializable, OwnableUpgradeable, UUPSUpgradeable
The RiskManager is the protocol’s safety layer. It is called by CopyTradingVault before every trade and by VaultFactory before every vault deployment. It queries the ArgusOracle for leader reputation and checks whether the vault has been frozen by an admin.
Constants
| Constant | Value | Description |
|---|---|---|
MAX_SLIPPAGE_BPS | 500 | 5% maximum slippage tolerance |
MIN_REPUTATION_SCORE | 600 | Minimum Argus score to execute trades or create vaults |
State Variables
| Variable | Type | Description |
|---|---|---|
argusOracle | ArgusOracle | On-chain Argus reputation bridge |
isVaultFrozen | mapping(address => bool) | Per-vault emergency freeze state |
Events
VaultFrozen
OracleUpdated
Functions
validateTrade
VaultFactory.createVault() and CopyTradingVault.executeGroupTrade().
Validation logic:
require(!isVaultFrozen[msg.sender])— rejects if the calling vault is frozenrequire(argusOracle.isEligible(vaultLeader, MIN_REPUTATION_SCORE))— rejects if leader score < 600
triggerCircuitBreaker
validateTrade check. Emits VaultFrozen(vault, reason).
Use cases:
- Vault drawdown exceeds safety threshold
- Suspicious trading pattern detected
- Leader account compromised
setArgusOracle
ArgusOracle address. Emits OracleUpdated.
Argus Oracle Integration
TheArgusOracle is queried via:
The Argus engine scores leaders across 500+ on-chain behavioral signals — trade frequency, win rate, drawdown history, strategy consistency, and social signals from the Paxeer Colosseum. A score of 600 / 1000 is the minimum threshold for protocol participation.