Closed crypto-vincent closed 10 months ago
Turns out having exactly zero profits trips up the computation for the precision loss 😢
Example: https://explorer.solana.com/tx/5wvq3AK3eViBtgbyhRNQL3TMNxzyVnbr4NJgeeRgtgiCtDb8ybMeG1168GuTzVnEYRKNP83uQ5u8fjxPsxrvVFJg
So this PR adds an additional protection and also adds an integration test to verify that this new version works for exactly zero profits
Deployed on main-net, merging this branch now.
Turns out having exactly zero profits trips up the computation for the precision loss 😢
Example: https://explorer.solana.com/tx/5wvq3AK3eViBtgbyhRNQL3TMNxzyVnbr4NJgeeRgtgiCtDb8ybMeG1168GuTzVnEYRKNP83uQ5u8fjxPsxrvVFJg
So this PR adds an additional protection and also adds an integration test to verify that this new version works for exactly zero profits