Distributions
Concepts

Distributions

Immutable historical records of payouts received by each member per payment.

A Distribution is an on-chain receipt documenting the exact amount and percentage share allocated to an individual member for a specific payment.

What is a Distribution?

Distributions are generated during settle_payment. They provide an undeniable on-chain audit trail for accounting, tax verification, and dispute resolution.

Distribution Struct

rustcontracts/splitpay/src/types.rs
#[contracttype]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct Distribution {
pub payment_id: u64,
pub recipient: Address,
pub amount: i128,
pub share_bps: u32,
}

Split Snapshot Behavior

Suppose Alice and Bob are configured as 60/40 in Pool #1. Payment #1 is settled:

  • Alice receives 60 XLM (Distribution: payment_id=1, recipient=Alice, amount=60, share_bps=6000)
  • Bob receives 40 XLM (Distribution: payment_id=1, recipient=Bob, amount=40, share_bps=4000)

If the pool owner later changes the pool shares to 50/50, Payment #1's distribution records remain 60/40 forever.