update demurrage function

update demurrage function