For each day:
# yesterday's balance + (yesterday's balance * interest)
# example:
balance = 1.234
interest = 0.023
new balance = (1.234 +( 1.234 * 0.023)) = 1.262382
if there are new deposits add into new balance here.
Next day
I have done simmilar calculations and figured out that you have from the earnings probably also to withdraw 10% as some kind of management/success participation fee/ or name it like you want
But this is only my opinion/idea of how to calculate the numbers