two-sides martingale prototype