Update swap path cREAL / MOO, MOO / CELO #38
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Found a mistake in the swap path for cREAL and MOO that caused repay MOO debt using cREAL collateral to fail. The error code was 1: Errors.VL_INVALID_AMOUNT.
After updating the swap path, repay is working.
One successful transaction:
https://explorer.celo.org/mainnet/tx/0x071d1e4e68711c9ac68b8071f2cb215fa57a65cd53e95b764a73e97952abc9ca/token-transfers
Eventually, this should be updated to use the path generation logic from Artem's auto repay bot PR, but before that PR is merged, I think we probably can continue using this for now 🤔
Related JIRA ticket:
https://moolamarket.atlassian.net/browse/AMM-1664