  We investigate the spin evolution of dark matter haloes and their dependence
on the number of connected filaments from the cosmic web at high redshift
(spin-filament relation hereafter). To this purpose, we have simulated $5000$
haloes in the mass range $5\times10^{9}h^{-1}M_{\odot}$ to
$5\times10^{11}h^{-1}M_{\odot}$ at $z=3$ in cosmological N-body simulations. We
confirm the relation found by Prieto et al. 2015 where haloes with fewer
filaments have larger spin. We also found that this relation is more
significant for higher halo masses, and for haloes with a passive (no major
mergers) assembly history. Another finding is that haloes with larger spin or
with fewer filaments have their filaments more perpendicularly aligned with the
spin vector. Our results point to a picture in which the initial spin of haloes
is well described by tidal torque theory and then gets subsequently modified in
a predictable way because of the topology of the cosmic web, which in turn is
given by the currently favoured LCDM model. Our spin-filament relation is a
prediction from LCDM that could be tested with observations.
