Custody Transfer, Allocation, and Leak Detection