-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(treasury): add swap functionalities through osmosis (#126)
## Overview This PR updates the treasury and staking contracts, allowing the staking contract to send protocol fees to the treasury and enabling a `trader` account to perform swap operations, helping the treasury hedge against asset price fluctuations. To prevent the `trader` from converting the treasury's assets into unwanted ones, a list of swap routes can be defined. This forces the `trader` to use only a predefined set of pools and only in a predefined direction. For example, if the Osmosis pool 1 has the OSMO/USDC pair, we can enforce that the `trader` can only swap OSMO for USDC, but not the other way around. closes: MILKTIA-35 ## What changes have been made in this PR? - [ ] Add swap functionalities to the treasury contract - [ ] Allow the staking contract to send the protocol fees to the treasury - [ ] Fix lint errors reported by `cargo clippy` ## Checklist --- - [ ] Appropriate labels applied - [ ] Targeted PR against correct branch - [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work. - [ ] Wrote unit and integration - [ ] Updated relevant documentation
- Loading branch information
Showing
42 changed files
with
3,534 additions
and
2,386 deletions.
There are no files selected for viewing
File renamed without changes.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.