  The simultaneous presence of a strong quasi periodic oscillation of period of
about 10 seconds in the optical and X-ray lightcurves of the X-ray transient
XTE J1118+480 suggests that a significant fraction of the optical flux
originates from the inner part of the accretion flow, where most of the X-rays
are produced. We present a model of magnetic flares in an accretion disc corona
where thermal cyclo-synchrotron emission contributes significantly to the
optical emission, while the X-rays are produced by inverse Compton scattering
of the soft photons produced by dissipation in the underlying disc and by the
synchrotron process itself. Given the observational constraints, we estimate
the values for the coronal temperature, optical depth and magnetic field
intensity, as well as the accretion rate for the source. Within our model we
predict a correlation between optical and hard X-ray variability and an
anticorrelation between optical and soft X-rays. We also expect optical
variability on flaring timescales (about tens of milliseconds), with a power
density spectrum similar to the one observed in the X-ray band. Finally we use
both the available optical/EUV/X-ray spectral energy distribution and the low
frequency time variability to discuss limits on the inner radius of the
optically thick disc.
