Open Chris-Hibbert opened 3 years ago
The PriceAuthority's results are often (maybe always?) useful as a ratio.
Let's add a Ratio to the return results, and if that's more useful, we can drop the separate amountIn and amountOut.
amountIn
amountOut
Shouldn't be any. This is about clarity and usefulness of the return results.
New value in the result, no new computation. Add some tests in PriceAuthority, and make use of it.
We could just add a helper for now.
What is the Problem Being Solved?
The PriceAuthority's results are often (maybe always?) useful as a ratio.
Description of the Design
Let's add a Ratio to the return results, and if that's more useful, we can drop the separate
amountIn
andamountOut
.Security Considerations
Shouldn't be any. This is about clarity and usefulness of the return results.
Test Plan
New value in the result, no new computation. Add some tests in PriceAuthority, and make use of it.