Function compute_settlement_shares

Source
pub fn compute_settlement_shares(
    escrow_shares: u128,
    expected_amount: u128,
    collected_amount: u128,
) -> EscrowSettlement
Expand description

Compute the shares to burn and refund based on collected vs expected amounts.

If the full withdrawal amount was collected, burn all escrow shares. If partial, compute proportionally.