# Leveraging Blockchain and Consignment Contracts to Optimize Food Supply Chains Under Uncertainty
## Appendix A Proof of Traditional System Without Blockchain
### Proof of Consignment Policy Without Blockchain  
Given a particular consignment agreement that includes a fixed fee \(Cf\) and a commission per unit \(\psi\), the manufacturer maximizes its profit based on the order quantity. \[E(\phi_{CP}^{r})=\int_{0}^{q^{*}}(\psi D_{WBC}-h_{TS}^{r}(q^{*}-D_{WBC})f(x)dx+ \int_{q^{*}}^{\infty}[\psi q^{*}-S^{\prime}(D_{WBC}-q^{*})]f(x)dx+C_{f}\]  
\[E(\phi_{CP}^{m})=\int_{0}^{q^{*}}((p_{WBC}-\psi)D_{WBC}-h_{TS}^{r}(q-D_{WBC})-cq) f(x)dx+\int_{q^{*}}^{\infty}[(p_{WBC}-\psi)q-S^{m}(D_{WBC}-q)-cq]f(x)dx-C_{f}\]  
\[E(\phi_{CP}^{r})=\int_{0}^{q^{*}}(\psi(D_{0}^{WBC}-\eta_{1}p_{WBC}-\alpha-\beta h _{c})x-h_{CP}^{r}(q^{*}-(D_{0}^{WBC}-\eta_{1}p_{WBC}-\alpha-\beta h_{c})xf(x)dx+\]  
\[\int_{q^{*}}^{\infty}\psi q^{*}-s^{\prime}(D_{0}^{WBC}-\eta_{1}p_{WBC}-\alpha- \beta h_{c})x-q^{*}f(x)dx+C_{f}\]\[E(\phi_{CP}^{m})=\int_{0}^{q^{*}}[(p_{WBC}-\psi)((D_{0}^{WBC}-\eta_{1}p_{WBC}- \alpha-\beta h_{c})]-h_{CP}^{m}((D_{0}^{WBC}-\eta_{1}p_{WBC}-\alpha-\beta h_{c})\] \[-cq)f(x)dx+\int_{q^{*}}^{\infty}(p_{WBC}-\psi)q^{*}-s^{m}(D_{0}^{ WBC}-\eta_{1}p_{WBC}-\alpha-\beta h_{c})-cqf(x)dx-X\] \[E(\phi_{CP}^{t}) = \int_{0}^{q}((p_{WBC}(D_{0}^{WBC}-\eta_{1}p_{WBC}-\alpha-\beta h_{ c})))-cq-h_{CP}^{t}(q-[D_{0}^{WBC}-\eta_{1}p_{WBC}-\alpha-\beta h_{c}])f(x)dx\] \[+ \int_{q}^{\infty}((p_{WBC}-c)q-s^{t}(D_{0}^{WBC}-\eta_{1}p_{WBC}- \alpha-\beta h_{c})xf(x)dx\] \[\frac{dE(\phi_{CP}^{t})}{dq}=0\]  
\[\frac{d}{dq}\int_{0}^{q*}(\psi(D_{0}^{WBC}-\eta_{1}p_{WBC}-\alpha -\beta h_{c})x-h_{CP}^{r}(q*-(D_{0}^{WBC}-\eta_{1}p_{WBC}-\alpha-\beta h_{c})\] \[E(\phi_{CP}^{m})=\int_{0}^{q^{*}}((p_{WBC}-\psi)D_{WBC}-h_{TS}^{r}(q-D_{WBC})-cq) f(x)dx+\int_{q^{*}}^{\infty}[(p_{WBC}-\psi)q-S^{m}(D_{WBC}-q)-cq]f(x)dx-C_{f}\]0 \[E(\phi_{CP}^{m})=\int_{0}^{q^{*}}((p_{WBC}-\psi)D_{WBC}-h_{TS}^{r}(q-D_{WBC})-cq) f(x)dx+\int_{q^{*}}^{\infty}[(p_{WBC}-\psi)q-S^{m}(D_{WBC}-q)-cq]f(x)dx-C_{f}\]1 \[E(\phi_{CP}^{m})=\int_{0}^{q^{*}}((p_{WBC}-\psi)D_{WBC}-h_{TS}^{r}(q-D_{WBC})-cq) f(x)dx+\int_{q^{*}}^{\infty}[(p_{WBC}-\psi)q-S^{m}(D_{WBC}-q)-cq]f(x)dx-C_{f}\]2 using the Leibniz rule, we have left \[E(\phi_{CP}^{m})=\int_{0}^{q^{*}}((p_{WBC}-\psi)D_{WBC}-h_{TS}^{r}(q-D_{WBC})-cq) f(x)dx+\int_{q^{*}}^{\infty}[(p_{WBC}-\psi)q-S^{m}(D_{WBC}-q)-cq]f(x)dx-C_{f}\]3 \[E(\phi_{CP}^{m})=\int_{0}^{q^{*}}((p_{WBC}-\psi)D_{WBC}-h_{TS}^{r}(q-D_{WBC})-cq) f(x)dx+\int_{q^{*}}^{\infty}[(p_{WBC}-\psi)q-S^{m}(D_{WBC}-q)-cq]f(x)dx-C_{f}\]4 \[E(\phi_{CP}^{m})=\int_{0}^{q^{*}}((p_{WBC}-\psi)D_{WBC}-h_{TS}^{r}(q-D_{WBC})-cq) f(x)dx+\int_{q^{*}}^{\infty}[(p_{WBC}-\psi)q-S^{m}(D_{WBC}-q)-cq]f(x)dx-C_{f}\]5 now, similarly, we have \[E(\phi_{CP}^{m})=\int_{0}^{q^{*}}((p_{WBC}-\psi)D_{WBC}-h_{TS}^{r}(q-D_{WBC})-cq) f(x)dx+\int_{q^{*}}^{\infty}[(p_{WBC}-\psi)q-S^{m}(D_{WBC}-q)-cq]f(x)dx-C_{f}\]6 \[E(\phi_{CP}^{m})=\int_{0}^{q^{*}}((p_{WBC}-\psi)D_{WBC}-h_{TS}^{r}(q-D_{WBC})-cq) f(x)dx+\int_{q^{*}}^{\infty}[(p_{WBC}-\psi)q-S^{m}(D_{WBC}-q)-cq]f(x)dx-C_{f}\]7 \[E(\phi_{CP}^{m})=\int_{0}^{q^{*}}((p_{WBC}-\psi)D_{WBC}-h_{TS}^{r}(q-D_{WBC})-cq) f(x)dx+\int_{q^{*}}^{\infty}[(p_{WBC}-\psi)q-S^{m}(D_{WBC}-q)-cq]f(x)dx-C_{f}\]8 \[E(\phi_{CP}^{m})=\int_{0}^{q^{*}}((p_{WBC}-\psi)D_{WBC}-h_{TS}^{r}(q-D_{WBC})-cq) f(x)dx+\int_{q^{*}}^{\infty}[(p_{WBC}-\psi)q-S^{m}(D_{WBC}-q)-cq]f(x)dx-C_{f}\]9 \[E(\phi_{CP}^{r})=\int_{0}^{q^{*}}(\psi(D_{0}^{WBC}-\eta_{1}p_{WBC}-\alpha-\beta h _{c})x-h_{CP}^{r}(q^{*}-(D_{0}^{WBC}-\eta_{1}p_{WBC}-\alpha-\beta h_{c})xf(x)dx+\]0 \[E(\phi_{CP}^{r})=\int_{0}^{q^{*}}(\psi(D_{0}^{WBC}-\eta_{1}p_{WBC}-\alpha-\beta h _{c})x-h_{CP}^{r}(q^{*}-(D_{0}^{WBC}-\eta_{1}p_{WBC}-\alpha-\beta h_{c})xf(x)dx+\]1  
The retailer receives payment for products supplied when the optimal amount in the supply chain matches the quantity ordered by the retailer, less a commission of \(\psi\) per unit.