Function calculateCollateralShares