Let $\mathcal M$ be the collection of martingle diffusions starting at zero and ending in $\{-1,1\}$. Equivalently, $X\in \mathcal M$ iff there exists a measurable function $a$ s.t. it holds almost surely
$$X_t=\int_0^t a(s,X_s)dW_s ~\in~ [-1,1],~ \forall t\ge 0 \quad\mbox{and} \quad X_{\infty}:=\lim_{t\to\infty}X_t\in \{-1,1\}.$$
What is the condition on $a$ so that the above properties of $X$ can be satisfied? My guess is
$$a(t,x)=(1-|x|)^{p}k(t,x) \quad \mbox{or}\quad a(t,x)={\bf 1}_{\{|x|<1\}}k(t,x)$$
for some $p>0$ and suitable function $k$. The simplest example is given as $a(t,x)={\bf 1}_{\{|x|<1\}}$ by Mateusz Kwaśnicki (Martingale representation of a stopped Brownian motion)
Any answer, comments and references are highly appreciated.
PS : For the time-homogeneous case, i.e. $a(t,x)\equiv a(x)$, Mateusz provides a sufficient and necessary condition on $a$ to ensure the properties of $X$. I still look for the condition for general $a$.