Help wanted with tranche based bonus in a crowdsale

A post was split to a new topic: How to calculate rate for a crowdsale