Outbound submission
The institution, or an upstream Lerian product, hands Lerian STA a file for BACEN. Lerian STA then obtains a protocol number from BACEN. It uploads the file’s bytes. BACEN validates the bytes against the declared SHA-256. The transfer advances through BACEN’s lifecycle:
Upload retries within a bounded budget. Once Lerian STA exhausts the retry budget, it cancels the transfer. Each protocol also carries a bounded wall-clock TTL — 44 hours by default. Lerian STA must finish the upload before BACEN expires the protocol.
Inbound discovery and download
Lerian STA polls BACEN for available files, per active tenant, on a configured cadence. For each file, Lerian STA matches the file’s BACEN system code against the tenant’s inbound source configurations. It then downloads the bytes. It verifies the bytes against BACEN’s reported SHA-256. It stores the file durably in object storage. A hash mismatch or a download failure retries within a bounded budget. Once Lerian STA exhausts the budget, it quarantines the transfer to a terminal failure — inconsistent or canceled. It does not deliver the file to its source product.
Operator actions
An operator can act only where the transfer’s state and configuration permit it:
- Cancel only when the canonical state machine permits a transition to
Canceled; it is not allowed from every non-terminal state. - Retry an outbound transfer only when it is non-terminal, has upload budget remaining, and its protocol TTL has not expired.
- Mark urgent only for an inbound transfer in
AvailableForDownloadwhose source configuration has urgency enabled; it fails closed otherwise.

