Math Behind the Distribution Markets