@@ -241,6 +318,29 @@ understand how all those pieces fit together.
This audit was performed by anarcat in the beginning of 2022.
### General architecture
The [Docker install documentation](https://docs.btcpayserver.org/Docker/)(?) has an [architecture
overview](https://docs.btcpayserver.org/Docker/#architecture) that has this image:

Upstream says:
> As you can see, BTCPay depends on several pieces of infrastructure, mainly:
>
> * A lightweight block explorer (NBXplorer),
> * A database (PostgreSQL or SQLite),
> * A full node (eg. Bitcoin Core)
>
> There can be more dependencies if you support more than just standard Bitcoin transactions, including:
>
> * C-Lightning
> * LitecoinD
> * and other coin daemons
>
> And more...
### Docker containers
BTCpayserver is a bunch of shell scripts built on top of a bunch of
...
...
@@ -323,10 +423,12 @@ configuration and glue things together, see above.
### Storage and queues
It's unclear what is stored where. Transactions, presumably, get
recorded in the blockchain, but they *may* also be recorded in the
PostgreSQL database?
recorded in the blockchain, but they are also certainly recorded in
the PostgreSQL database.
Unclear.
Transactions can be held in PostgreSQL for a while until a
verification comes in, presumably through NBXplorer. Old transactions
seem to stick around, presumably forever.
### Authentication
...
...
@@ -387,10 +489,21 @@ TODO: how do we test BTC payments works?
## Logs and metrics
<!-- where are the logs? how long are they kept? any PII? -->
<!-- what about performance metrics? same questions -->
BTCpay actually configures the Docker daemon to keep only 5m (5MB?) of