User Roles

GuardAI has two distinct roles with different permissions and interactions.


πŸ‘€ Depositor (Regular User)

Any wallet that deposits assets into the vault.

What they can do:

Action
Condition

Deposit ETH

Vault must be ACTIVE

Deposit USDC / stETH

Vault must be ACTIVE + ERC20 approved

View risk score

Always β€” live on dashboard

View vault state

Always

View their portfolio

Always

What happens automatically:

  • When risk score hits β‰₯ 70, all their deposited funds are returned instantly to their wallet β€” no action needed.

  • New deposits are blocked while vault is in EMERGENCY.


πŸ”‘ Owner (Deployer / Protocol Admin)

The wallet that deployed the VaultSentinel contract.

Exclusive permissions:

Function
Description

resetVault()

Reset vault from EMERGENCY β†’ ACTIVE

addSupportedToken(address)

Whitelist a new ERC20 token

setAuthorizedCaller(address)

Update the CRE workflow wallet

setRiskThreshold(uint256)

Change the emergency trigger threshold

Typical owner workflow:


πŸ€– Authorized Caller (CRE Workflow)

The wallet used by the Chainlink CRE workflow to write risk scores on-chain.

Permissions:

Function
Description

setRiskScore(uint256)

Write computed risk score β€” triggers emergency if β‰₯ threshold

triggerEmergency()

Manually force emergency using last known score

The authorized caller address is set at deploy time and can be updated by the owner via setAuthorizedCaller().

In the demo environment, the deployer wallet acts as both owner and authorized caller, which is why simulate-attack.ts works directly.

Last updated