Architecture
The diagram below shows how the Aven frontend, CLI, and verifier service interact with each contract and how the contracts call one another.Contract Roles
How the Contracts Relate
1
Stream is created
An employer calls
create_stream on the Stream Contract. Funds are transferred into the contract as escrow immediately.2
Work is tracked and verified
The worker runs
aven-stellar locally. When the session ends, the Aven verifier service calls verify_work on the Stream Contract, which independently recomputes the payment amount and creates a WithdrawalRecord in Pending status.3
Employer reviews
The employer calls
approve_withdrawal or dispute_withdrawal. If the approval deadline passes without action, the worker can still claim the payment automatically (auto-release).4
Payment is released and attested
The worker calls
withdraw_approved. Funds are transferred to the recipient and the Stream Contract immediately calls mint_attestation on the Attestation Contract. If the stream is now fully paid out, a StreamCompletion attestation is also minted.5
Reputation is updated
The Reputation Contract reads
StreamCompletion attestations on demand when compute_score or get_score_breakdown is called. No extra transaction is required — scores update automatically as attestations accumulate.Contract IDs
Each deployed Aven instance exposes three public environment variables that identify the contracts on Stellar testnet:These values are set by the Aven deployment and are already configured in the live application. You do not need to set or know them to use the dashboard. They are public (
NEXT_PUBLIC_) because the browser Stellar SDK uses them directly to build transactions — no secrets are exposed.Contract Pages
Stream Contract
Escrow, work verification, approval workflow, and payment release.
Attestation Contract
Permanent on-chain work proofs minted on every approved payment.
Reputation Contract
Scoring based on your verified on-chain work history.
