Calculating the ideal Investment amount to stake The Graph