Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ci/stable pool deployment support #100

Merged
merged 2 commits into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions docs/SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,28 @@
# Security Policies and Procedures

This document outlines security procedures and general policies for the `mantra-dex` project.
* [Reporting a Bug](#reporting-a-vulnerability)
* [Disclosure Policy](#disclosure-policy)

- [Reporting a Bug](#reporting-a-vulnerability)
- [Disclosure Policy](#disclosure-policy)

## Reporting a Vulnerability

Security is something we take seriously at MANTRA. Thanks for taking the time to improve the security of `mantra-dex`,
we appreciate your efforts and responsible disclosure and will make every effort to acknowledge your contributions.

Please report security bugs by sending an email to security@mantrachain.io. Do not report it publicly on the GitHub
issues tracker. Your report should detail the necessary steps to reproduce the security issue. We will acknowledge your
email within 72 hours and send a detailed response indicating the next steps. After the initial reply to your report,
we will keep you informed of the progress towards a fix and full announcement and may ask for additional information
Please report security bugs by sending an email to security@mantrachain.io. Do not report it publicly on the GitHub
issues tracker. Your report should detail the necessary steps to reproduce the security issue. We will acknowledge your
email within 72 hours and send a detailed response indicating the next steps. After the initial reply to your report,
we will keep you informed of the progress towards a fix and full announcement and may ask for additional information
or guidance.

Report security vulnerabilities in third-party modules to the person or team maintaining the module.

## Disclosure Policy
If we receive a security bug report, we assign it to a primary handler. This person will coordinate the fix and release

If we receive a security bug report, we assign it to a primary handler. This person will coordinate the fix and release
process, involving the following steps:
* Confirm the problem and determine the affected versions.
* Audit code to find any potentially similar problems.
* Rollout the fixes.

- Confirm the problem and determine the affected versions.
- Audit code to find any potentially similar problems.
- Rollout the fixes.
15 changes: 14 additions & 1 deletion scripts/deployment/deploy_pool.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ function display_usage() {
# "swap_fee": "0.002",
# "burn_fee": "0",
# "pool_type": "constant_product",
# "amp_factor": 85,
# "pool_identifier": "pool_identifier",
# "assets": [
# {
Expand All @@ -48,6 +49,10 @@ function read_pool_config() {
burn_fee=$(jq -r '.burn_fee' $pool)
pool_type=$(jq -r '.pool_type' $pool)
pool_identifier=$(jq -r '.pool_identifier' $pool)

if [[ "$pool_type" == "stable_swap" ]]; then
amp_factor=$(jq -r '.amp_factor' $pool)
fi
}

function create_pool() {
Expand Down Expand Up @@ -84,6 +89,12 @@ function create_pool() {
asset_decimals+=($decimals)
done

if [[ "$pool_type" == "stable_swap" ]]; then
pool_type='{"'$pool_type'": {"amp": '$amp_factor'}}'
else
pool_type='"'$pool_type'"'
fi

create_pool_msg='{
"create_pool": {
"asset_denoms":["'${asset_denoms[0]}'","'${asset_denoms[1]}'"],
Expand All @@ -103,11 +114,13 @@ function create_pool() {
},
"extra_fees": []
},
"pool_type": "'$pool_type'",
"pool_type": '$pool_type',
"pool_identifier": "'$pool_identifier'"
}
}'

echo -e"\n$create_pool_msg\n"

echo -e "\e[1;31m⚠️ WARNING ⚠️️\e[0m"

echo -e "\e[1;32mCreating pool with the following configuration:\e[0m"
Expand Down
Loading