Working as a Software engineer in investment bank

As salaam alaikum
I am working as A Data engineer in equities team of an investment bank . Although it is named equities the activities are minced between equity and ficc.
To be exact our team calculate brokerages for transaction of products (bonds,repos,equity derivatives,etc) to check if the brokers are not over charging the firm .We build the software for such calculators.Is the role haraam??
Also if I immediately leave the firm I have to return a joining bonus paid to me by the firm with interest.
What should I do?

Wasalam

May Allah bless you.
What is your role as an engineer?

May Allah bless you too. My role is to build the software that does the calculation.

This would be permissible, as you directly assisting in supporting non shariah compliant contracts.
If you cannot afford to leave this job now, then my advice to you would be to leave the firm as soon as it is financially convenient to you inshaAllah. Also, ensure you find another job before you leave this one if you are in need of income.

And Allah knows best!