After doing a simple calculation in rust ink! 4.0 smart contract, the result is incorrect and doesn't match the expected result.
Here is the simple formula:
let a0_balance_mul:U256 = U256::from(amount_in_with_lp_fees * self.get_a0_balance());
The variables for the above formula are:
amount_in_with_lp_fees = 100,000,000,000,000,000,000
self.get_a0_balance() = 10,000,000,000,000,000,000
The result that Im getting is :
Which should be :
I've checked both numbers and they are both represented correctly using
Thanks in advance.