Security

Phase 1 is intentionally simple: fewer features, fewer failure modes.

No custody

User funds live in Morpho on Ethereum and are never touched by Vetorica contracts or servers. The credit token lives on Robinhood Chain and represents no claim on the underlying assets.

Minimal contract surface

VetoricaCredit is a non-transferable ERC-20 with two privileged functions: mintFromYield (REPORTER_ROLE, idempotent per yieldId) and spendFrom (OPERATOR_ROLE, idempotent per spendId). There is no admin mint, no redeem, and no transfer path, approvals and transfers revert.

Idempotency everywhere

Minting is deduplicated both on-chain (processedYields) and in the backend (yield_reports + deterministic yieldIds). Spends are reserved transactionally, then confirmed on-chain, a lost receipt can't double-charge or permanently block an agent.

API authentication

Mutations require a bearer token obtained by signing a one-time nonce with the owner's wallet. Agents authenticate with a per-agent API key (only its hash is stored) via the X-Agent-Key header.

Known limitations (Phase 1)

  • DEFAULT_ADMIN_ROLE can grant reporter/operator roles, it indirectly controls minting. Multisig/timelock admin is a Phase-2 hardening item.
  • Session tokens are stateless HMAC, no revocation list until Phase 2.
  • The yield reader trusts the Morpho API's USD valuations; dust thresholds limit drift.
  • Deep-chain reorgs are out of scope for the event indexer.