We study dominant strategy implementable direct mechanisms that minimize the expected surplus from core deviations. Using incentive compatibility conditions, we formulate the core deviation miminimization problem as a calculus of variations problem and then numerically solve it for some particular cases.