I've dug up my old JS physics engine and am trying to make some scenes to test its capabilities. One problem I ran across is that restitution is not modeled correctly. In particular, Newton Cradle does not work as expected and it randomly bounces the balls around, as seen here: https://physics.rivsoft.net/Newton (controls are RMB to rotate, wheel to zoom).
As suggested by multiple sources, I'm adding relative normal velocity times restitution to the bias term (for 1D Jacobian), and using velocity at the start of the step for this. However, for obvious reasons this doesn't work if I have multiple velocity resolution steps. How am I supposed to update the bias between steps in order to correctly model restitution?