Tagged contract-optimization