In this transaction, rebalance fails because, (quoting @bweick from slack)
nvm so basically there 1.005 Sets we try to withdraw 13159 per Set which would calculate to 13224.795
which is rounded down to 13224 so that's the amount we get back from Perp
When we then go to make a position out of it 13224/1.005 = 13158.20 so rounded down to 13158
And then we try to trade 13159
In this transaction, rebalance fails because, (quoting @bweick from slack)