Optimal Mechanism Design with Aftermarket Competitions