We can use shorter path for NOTE/CANTO pair #186
Labels
bug
Something isn't working
disagree with severity
Sponsor confirms validity, but disagrees with warden’s risk assessment (sponsor explain in comments)
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
Lines of code
https://github.com/code-423n4/2022-09-canto/blob/65fbb8b9de22cf8f8f3d742b38b4be41ee35c468/src/Swap/BaseV1-periphery.sol#L558-L592
Vulnerability details
Impact
Longer path can also lead to computation error.
Proof of Concept
For NOTE/CANTO pair, it is not stable pair in the documentation (https://docs.canto.io/overview/canto-dex-and-lp-interface).
Current implementation gets LP price in terms of CANTO and then change it to NOTE.
But we can calculate it directly in terms of NOTE.
Recommended Mitigation Steps
Do same calculation as stable case for NOTE/CANTO pair.
The text was updated successfully, but these errors were encountered: