From af23c53f96680d0349d77a6e7857aafe2d6eae8a Mon Sep 17 00:00:00 2001 From: siegfriedbz Date: Sat, 25 Apr 2026 18:15:11 +0200 Subject: [PATCH] chore(docs): update READMEs --- apps/contracts/README.md | 2 +- docs/architecture.md | 3 ++- packages/agents/graphs/submission/README.md | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/contracts/README.md b/apps/contracts/README.md index 4343f30..74a9f6a 100644 --- a/apps/contracts/README.md +++ b/apps/contracts/README.md @@ -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`. | diff --git a/docs/architecture.md b/docs/architecture.md index 3f56e97..a4431a7 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -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 diff --git a/packages/agents/graphs/submission/README.md b/packages/agents/graphs/submission/README.md index d00b6d0..a0dd7e8 100644 --- a/packages/agents/graphs/submission/README.md +++ b/packages/agents/graphs/submission/README.md @@ -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 @@ -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()