AnomalyOracle
AnomalyOracle accepts risk scores signed by its oracleSigner and can freeze a wallet whose
latest score is above that wallet’s threshold. For a plain-language overview, see
Risk checks.
Functions
| Function | Who | What it does |
|---|---|---|
submitScore(address wallet, uint256 sigmaBps, uint256 deadline, bytes signature) | Anyone | Records a score after checking the signer, chain, contract, nonce and deadline. |
triggerFreeze(address wallet, bytes reason) | Anyone | Freezes the wallet if it uses this oracle, its score is above its threshold, and the score is not older than maxScoreAge. Each score can freeze only once. |
setSigner(address) | Oracle owner | Changes the key that signs scores. It cannot be set to zero. |
setMaxScoreAge(uint256) | Oracle owner | Changes how long a score stays valid. It cannot be zero. |
Limits on the oracle
- It can freeze, nothing else. It cannot move funds or unfreeze.
- A stale score reverts with
ScoreStale, so an old score cannot freeze a wallet later. - A wallet owner can stop using the oracle by rotating the wallet’s oracle module to the zero address.
The oracle owner and signer are listed on Admin and governance.