Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/contracts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Constructor parameters: `reputationBoost`, `aiAgent`, `treasury`, `pubMinFee`, `

| Function | Description |
|----------|-------------|
| `submitPublication(cid, paidSubmissionFee)` | Submit a publication with IPFS CID. Requires `msg.value == I_PUBLISHER_STAKE + paidSubmissionFee`. Emits `SubmitPublication`. |
| `submitPublication(cid)` | Submit a publication with IPFS CID. Requires `msg.value >= I_PUBLISHER_STAKE + I_PUBLISHER_MIN_FEE`. The stake is fixed; the submission fee is derived as `msg.value - I_PUBLISHER_STAKE` and stored as `paidSubmissionFee` (funds VRF). Emits `SubmitPublication`. |
| `payReviewerStake()` | Stake exactly `I_REVIEWER_STAKE` to join the reviewer pool. Registers the member if new. |
| `claim(amount)` | Withdraw `amount` from `availableStake`. Non-reentrant. |
| `receive()` | Accept ETH donations into `rewardPool`. |
Expand Down
3 changes: 2 additions & 1 deletion docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ sequenceDiagram
IPFS-->>S: rootCid (manifest)

Note over S,BC: Phase 2 -- On-Chain Submission
S->>BC: submitPublication(cid, paidSubmissionFee) + stake
S->>BC: submitPublication(cid) with msg.value (stake + fee)
Note right of BC: stake=fixed I_PUBLISHER_STAKE; paidFee=msg.value-stake
BC->>BC: emit SubmitPublication

Note over BC,DB: Phase 3 -- Event Projection
Expand Down
4 changes: 2 additions & 2 deletions packages/agents/graphs/submission/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ LangGraph agent that autonomously pre-validates scientific submissions for origi

## Trigger Chain

A user calls `submitPublication(cid, fee)` on the `BioVerifyV3` smart contract, which emits a `SubmitPublication` event. That event flows through the infrastructure pipeline into this agent:
A user calls `submitPublication(cid)` on the `BioVerifyV3` smart contract (sending `msg.value = stake + fee`), which emits a `SubmitPublication` event. The stake is protocol-fixed; the fee is derived on-chain as `msg.value - stake`. That event flows through the infrastructure pipeline into this agent:

```mermaid
sequenceDiagram
Expand All @@ -17,7 +17,7 @@ sequenceDiagram
participant Inngest
participant Agent as Submission Agent

User->>BioVerifyV3: submitPublication(cid, fee) + stake
User->>BioVerifyV3: submitPublication(cid) with msg.value (stake + fee)
BioVerifyV3-->>AlchemyNotify: emits SubmitPublication event
AlchemyNotify->>NextAPI: POST /api/webhooks/alchemy/all-events
NextAPI->>CQRS: decode log + processContractEvent()
Expand Down
Loading