Physics of compact stars is under intensive investigation for many decades. Modern studies are focused on the equation of state (EOS) of dense baryonic matter including possible phase transitions to the quark matter. One interesting feature of a strong first order phase transition is that it can generate a sharp discontinuity in the baryon density as a function of radial coordinate, see e.g. ref. [1]. In the extreme situation when the EOS has a zero pressure point at a finite baryon density ρ$_{c}$ , as is the case e.g. for the MIT bag and NJL models [2, 3], the discontinuity in the baryon density occurs at the surface of the star, i.e. ρ ( R ) = ρ$_{c}$ . Such a situation is expected in compact stars made of Strange Quark Matter (SQM), as first predicted in refs. [4, 5]. If the matter is composed of several species with opposite electric charges and different masses, the presence of a sharp discontinuity should lead to a charge separation and generation of an electric field. This effect was first discussed in ref. [6] in context of the necked SQM stars, where the electrons from the bulk SQM matter can penetrate in vacuum through the sharp star’s surface. As demonstrated in ref. [7], supercritical electric fields can be generated at the boundary of a nuclear core surrounded by an electronic cloud. In ref. [8] the structure of compact stars with a net charge at the surface was calculated within the General Relativity. The boundary effect may be important also for understanding the structure of a mixed phase, where domains of two phases have opposite electric charges [9, 10]. The electrostatic interactions are important for the description of neutron-star crusts where atomic nuclei are embedded in a dense electron gas [11, 12]. Our goal in the present paper is to study the conditions leading to the generation of supercritical fields at a star boundary. We solve a simplified problem replacing the spherical star boundary by the planar one. We expect this approximation to work very well for a compact star with radius of about 10 km. We assume further that the net positive charge, associated with protons or quarks, has a smooth-step distribution of the Woods-Saxon type where ρ$_{p}$$_{0}$ is the positive charge density in the bulk ( z → −∞ ) and a is a diffuseness parameter. The star boundary is located at z = z$_{0}$ and ρ$_{p}$ ( z$_{0}$ ) = ρ$_{p}$$_{0}$/ 2. At a → 0 this distribution approaches a rectangular step considered in ref. [7]. For a macroscopic object like a star the condition of global charge neutrality must hold to a very high precision, see discussion in ref. [13]. Therefore, the positive charge of Eq. ρ$_{p}$ ( z ) = ρ$_{p}$$_{0}$ [ 1 + exp ( z − z$_{0}$ a )] − 1 , (1) 2