The Nil-Hecke algebra is defined to be the subalgebra of the endomorphism ring of $\mathbb{C}[x_1,\ldots,x_n]$ generated by the operators of multiplication by $x_i$ and the divided difference operators $\partial_i$ which act by $f\mapsto \frac{f-s_if}{x_i-x_{i+1}}$ with $s_i$ being the simple reflection that swaps $x_i$ and $x_{i+1}$. I know of two places where this appears.

Firstly, in the construction of Schubert polynomials (and hence implicitly in the calculation of the (ordinary or torus equivariant) cohomology of the flag variety).

And secondly, it is equal to the convolution algebra $H^{GL_n}_*(X\times X)$ where $X$ is the variety of complete flags in $\mathbb{C}^n$ and we are taking equivariant Borel-Moore homology.

Due to the similarity of the objects appearing in each case, I feel as though this can't be a coincidence, but don't see for myself a direct relationship or know where this is written down. This may be because I've picked up both objects "on the fly" without a good understanding of the literature. Anyway the question is, what is the relation between these incarnations of the nil-Hecke algebra that I am telling myself should exist?