Skip to main content
Ryvo currently uses two signed message types:
  1. ryvo-cmt-v5 - unilateral cumulative commitment for one payment channel.
  2. Ryvo-round - cooperative clearing-round message body used by BLS-authenticated clearing rounds.
Commitment signatures are verified through Ed25519 pre-instructions. Cooperative rounds are verified through aggregate BLS signatures over one shared round body.

Common encoding rules

Every signed message begins with:
  1. A one-byte kind.
  2. A one-byte version.
  3. A 16-byte message_domain.

Message domain

message_domain is derived inside the program as:
This binds every signed message to both the program deployment and the chain ID it runs on. A commitment signed for one deployment will not verify on another, even if the payer, payee, channel, and amount are all identical. See Deployment for the live program ID and chain ID.

Compact unsigned integers

Participant IDs and cumulative amounts use compact unsigned integer encoding in the signed body (seven data bits per byte, continuation bit in the MSB). Reference implementations typically call this helper encodeCompactU64.

Token ID

token_id is encoded as a little-endian u16 in both message types.

ryvo-cmt-v5

The unilateral cumulative commitment message. Used by:
  • settle_individual
  • settle_commitment_bundle

Layout

Semantics

  • committed_amount is cumulative, not incremental. If the channel is already settled to 1_000_000 and the new message says 1_250_000, the on-chain delta is 250_000.
  • Operator or coordinator compensation is not embedded in ryvo-cmt-v5. If a flow needs to pay an operator, that payment is expressed as its own ordinary channel commitment.

Ryvo-round

The cooperative clearing-round message. Used by settle_clearing_round.

Layout

Semantics

The round is organized by payer block. Each block says:
  1. Which participant is the payer.
  2. How many outgoing channel targets that payer is advancing.
  3. For each target, which signed participant in the roster is the payee.
  4. What the new cumulative amount for that channel should be.
Reusing the roster through payee_ref keeps the signed body compact, payee IDs are referenced, not repeated. Participants register BLS keys and co-sign the same logical round body off-chain. Settlement submits one aggregate BLS signature and the program advances every included channel target in one transaction. See Clearing rounds for a worked example and the settlement semantics.

Which message to use

  • Use ryvo-cmt-v5 when one payer is updating one channel. This includes bundled settlement, which batches many ryvo-cmt-v5 messages for one payee into one transaction.
  • Use Ryvo-round when several participants are willing to sign one shared message so many channels can be advanced in one on-chain transaction.

See also