Skip to content
This repository was archived by the owner on Aug 26, 2024. It is now read-only.

Commit acd4e8e

Browse files
first commit
0 parents  commit acd4e8e

File tree

427 files changed

+49818
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

427 files changed

+49818
-0
lines changed

.github/ISSUE_TEMPLATE/bug-report.md

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Bug Report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
<ins>**Describe the bug**</ins>
11+
A clear and concise description of what the bug is.
12+
13+
<ins>**To Reproduce**</ins>
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
<ins>**Expected behavior**</ins>
21+
A clear and concise description of what you expected to happen.
22+
23+
<ins>**Screenshots**</ins>
24+
If applicable, add screenshots to help explain your problem.
25+
26+
<ins>**Desktop (please complete the following information):**</ins>
27+
- OS: [e.g. iOS]
28+
- Browser [e.g. chrome, safari]
29+
- Version [e.g. 22]
30+
31+
<ins>**Smartphone (please complete the following information):**</ins>
32+
- Device: [e.g. iPhone6]
33+
- OS: [e.g. iOS8.1]
34+
- Browser [e.g. stock browser, safari]
35+
- Version [e.g. 22]
36+
37+
<ins>**Additional context**</ins>
38+
Add any other context about the problem here.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
name: Custom Asset Support
3+
about: Add support for specific asset in a specific chain
4+
title: Support Asset $XXX
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
<h3> Custom Asset Information: </h3> <br>
11+
12+
*Use the reference below for Asset Information. If not found in the table, please notify Nik via Discord* <br>
13+
[Link to Notion Custom Asset Table](https://www.notion.so/4627d911ce3c4589aef9f7592650e7b2?v=4b3abb4ebfd44018bcf47496d512b778) <br>
14+
15+
**Symbol**: *<ins> ETH </ins>* <br>
16+
**Block Explorer URL**: *https://etherscan.io/address/0x0000000000000000000000000000000000000000* <br>
17+
**Chain**: *<ins> Ethereum </ins>*
18+
19+
*Please mark the tasks below, as appropriate. Then link supporting Github items together in the Comments section either using # or the button in the screenshot below:* <br>
20+
![Screenshot of Github Link Button](https://user-images.githubusercontent.com/103433798/169572470-b7e31053-afab-4225-9816-6403193b86b3.png) <br>
21+
22+
**<ins>Link To Matching Chain Deployment Ticket</ins>:** #*Insert Link Here* <br>
23+
24+
- [ ] **ChainLink / DIA / Flux Supported** _*OR*_
25+
- [ ] **Requires Custom Oracle** <br>
26+
&nbsp;&nbsp;&nbsp;- [Link to Custom Oracle Template](https://github.com/Midas-Protocol/contracts/issues/new?assignees=&labels=&template=custom-oracle.md&title=Custom+Oracle+for+%24XXX)
27+
- [ ] **Requires Custom Liquidator** <br>
28+
&nbsp;&nbsp;&nbsp;- [Link to Custom Liquidator Template](https://github.com/Midas-Protocol/contracts/issues/new?assignees=&labels=&template=custom-liquidation-strategy.md&title=Custom+Liquidation+Strategy+for+%24XXX)
29+
- [ ] **ERC-4626 Support** <br>
30+
&nbsp;&nbsp;&nbsp;&nbsp;- [Link to ERC-4626 Template](https://github.com/Midas-Protocol/contracts/issues/new?assignees=&labels=&template=erc-4626-strategy.md&title=ERC-4626+Strategy+for+%24XXX)
31+
32+
<h3> Tasks: </h3>
33+
34+
- [ ] Edit the supported assets: https://github.com/Midas-Protocol/monorepo/tree/development/packages/sdk/src/chainConfig/assets and add the asset to the respective chain
35+
36+
- [ ] Edit deployment script to set up and deploy oracle and liquidator
37+
38+
*IF it is a uniswap-twap oracle supported asset*
39+
- [ ] For Uniswap-supported assets, redeploy the fuse-twap-bot after adding editing the `supported_pairs` variable in the [ops directory](https://github.com/Midas-Protocol/monorepo/blob/development/ops/main.tf#L28)
40+
41+
*IF requires custom liquidation strategy*
42+
- [ ] Edit the redemption strategies: https://github.com/Midas-Protocol/monorepo/blob/development/packages/sdk/src/chainConfig/redemptionStrategies.ts
43+
- [ ] Edit the redemption strategy data encoding: https://github.com/Midas-Protocol/monorepo/blob/development/packages/sdk/src/modules/liquidation/redemptionStrategy.ts#L23
44+
- [ ] Edit the `chainDeploy/<chain>.ts` deploy script to deploy the liquidation strategy, if not already there
45+
46+
*IF it needs/could use a plugin and/or flywheel*
47+
- [ ] Edit the `chainDeploy/<chain>.ts` deploy script to deploy the plugin & their flywheel(s)
48+
49+
### Deployment
50+
51+
After all the items above are complete, proceed with the deployment of the contracts and changes to the deployment script.
52+
53+
If a plugin and/or Flywheel were deployed with this, then, you also need to:
54+
- [ ] Edit the plugin config: https://github.com/Midas-Protocol/monorepo/blob/development/packages/sdk/src/chainConfig/plugin.ts so that the information about it is made available to the SDK users/FE
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: Custom Liquidation Strategy
3+
about: Liquidation strategy for custom asset
4+
title: Custom Liquidation Strategy for $XXX
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
Implement Custom Liquidation Strategy for the desired asset
11+
12+
### Liquidation Strategy Description
13+
14+
Brief description of the liquidation strategy for the custom asset
15+
16+
### Links and Documentation
17+
18+
**Asset Support Issue**: N/A
19+
**Project Docs**: N/A
20+
**Other Relevant Links**: N/A
21+
22+
### Tasks
23+
24+
- [ ] implement `redeem()`
25+
- [ ] add forge tests
+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: Custom Oracle
3+
about: Describe this issue template's purpose here.
4+
title: Custom Oracle for $XXX
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
Implement Custom Oracle for the desired asset
11+
12+
### Oracle Description
13+
14+
Brief description of what kind of assets this oracle would support
15+
16+
### Links and Documentation
17+
18+
**Asset Support Issue**: N/A
19+
**Project Docs**: N/A
20+
**Other Relevant Links**: N/A
21+
22+
### Tasks
23+
24+
- [ ] implement `getUnderlyingPrice()`
25+
- [ ] add forge tests
+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
name: 'Default Issue '
3+
about: Describe this issue template's purpose here.
4+
title: New Issue
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
## Background
11+
12+
Any information that gives more context as to why this task exists, and why it matters. This might include: links to discussions, documentation, or other GitHub issues / tasks
13+
14+
### Linked Issues & Documentation
15+
16+
- List of linked issues, external links, etc
17+
18+
## Definition Of Done
19+
20+
Describes in 1-2 sentences what the output of the Task is, so that it can be verified by another team member easily. “Feature X is implemented as described and can be verified by using it”
21+
22+
## Acceptance Criteria
23+
24+
Describe criteria required for proper testing after
25+
26+
## Tasks
27+
28+
- [ ] Task 1
29+
- [ ] Task 2
30+
- [ ] Task 3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: ERC-4626 Strategy
3+
about: 'Implements strategy for custom asset '
4+
title: ERC-4626 Strategy for $XXX
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
Implement ERC4626 strategy for the desired asset
11+
12+
### Strategy Description
13+
14+
Brief description of what this strategy enables
15+
16+
### Links and Documentation
17+
18+
**Asset Support Issue**: N/A
19+
**Project Docs**: N/A
20+
**Other Relevant Links**: N/A
21+
22+
### Tasks
23+
24+
- [ ] implement beforeWithdraw
25+
- [ ] implement afterDeposit
26+
- [ ] implement totalAssets
27+
- [ ] add forge tests
+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
name: Feature Request
3+
about: For any new feature requests (resolves an issue, UX improvement or addition)
4+
etc)
5+
title: 'FEATURE: '
6+
labels: ":sparkles: [Feature]"
7+
assignees: ''
8+
9+
---
10+
11+
<ins>**Please describe the reasoning for this feature?**</ins> _Please mark one of the the checkboxes below, then put the description below that, screenshots preferred._ <br>
12+
- [ ] _Is this to resolve a process problem, bug. defect, error or glitch?_ <br>
13+
- [ ] _Is this for a new feature or improvement?_ <br>
14+
***
15+
16+
<ins>**Describe the solution or new feature you'd like.**</ins> _How can we improve our product? What will bring more users to our protocol?_ <br>
17+
18+
19+
<ins>**Describe alternatives that would satisfy requirements.**</ins> _What's an alternative that could satisfy the same requirements I was looking for? Will it be harder? Will it require more resources?._ <br>
20+
21+
<ins>**Additional context.**</ins> <br> _Any information that's relevant that doesn't fit in the categories above?_ <br>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
name: Initial Chain Deployment
3+
about: Task for having a full SC deployment to a new chain
4+
title: 'Initial Chain Deployment: <Chain Name>'
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
## Chain Information
11+
12+
Link to Chain Developer docs: *XXX*
13+
14+
**Mainnet**
15+
Chain Name: *XXX* <br>
16+
Chain ID: *XXX* <br>
17+
RPC URL: *XXX* <br>
18+
Native Token: *explorer url/XXX* <br>
19+
Wrapped Native Token: *explorer url/XXX* <br>
20+
21+
**Testnet**
22+
Chain Name: *XXX* <br>
23+
Chain ID: *XXX* <br>
24+
RPC URL: *XXX* <br>
25+
Native Token: *explorer url/XXX* <br>
26+
Wrapped Native Token: *explorer url/XXX* <br>
27+
28+
**Ecosystem**
29+
Uniswap-clone project name: XXX <br>
30+
Uniswap-clone docs: XXX <br>
31+
32+
## Tasks
33+
*Please mark the tasks below, as appropriate. Then link supporting Github items together in the Comments section either using # or the button in the screenshot below:* <br>
34+
![Screenshot of Github Link Button](https://user-images.githubusercontent.com/103433798/169572470-b7e31053-afab-4225-9816-6403193b86b3.png)
35+
36+
- [ ] Please use the link below to add initial set of assets <br>
37+
- [Link to Custom Asset Template](https://github.com/Midas-Protocol/monorepo/issues/new?assignees=&labels=Custom+Asset+Support&template=custom-asset-support.md&title=Support+Asset+%24XXX)
38+
- [ ] Create chain-specific deploy script inside `chainDeploy`
39+
- [ ] Add the supported chain and its parameters to the [network configs](https://github.com/Midas-Protocol/contracts/blob/main/src/network.ts) of the SDK
40+
- [ ] Blocks per year
41+
- [ ] Chain-specific addresses
42+
- [ ] Supported oracles
43+
- [ ] Add network to hardhat config
44+
- [ ] Run deploy script, export deployments and commit both `deployments.json` and deployments artifacts <br> <br>
45+
**SDK**
46+
- [ ] Add supported assets to chainConfig/supportedAssets
47+
- [ ] Add chain ids to SupportedChains enum
48+
- [ ] Redeploy SDK <br> <br>
49+
**UI**
50+
- [ ] Add Chain Mainnet and Testnet to `SwitchNetworkModal`
51+
- [ ] Add ChainMetadata for Main & Testnet
52+
- [ ] Make sure Main & Testnet are Listed in SupportedChains
53+
- [ ] Deactivate Mainnet via netlify.toml until specific release

.github/issue_template.md

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
## Background
2+
3+
Any information that gives more context as to why this task exists, and why it matters. This might include: links to discussions, documentation, or other Jira issues / tasks
4+
5+
### Linked Issues & Documentation
6+
7+
- List of linked issues, external links, etc
8+
9+
## Definition Of Done
10+
11+
Describes in 1-2 sentences what the output of the Task is, so that it can be verified by another team member easily. “Feature X is implemented as described and can be verified by using it”
12+
13+
## Tasks
14+
15+
- [ ] Task 1
16+
- [ ] Task 2
17+
- [ ] Task 3
18+

.github/pull_request_template.md

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
## Description
2+
3+
<!--- Provide a general summary of your changes in the Title above -->
4+
5+
## Type of change
6+
7+
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
8+
9+
- [ ] Docs change / dependency upgrade
10+
- [ ] Configuration / tooling changes
11+
- [ ] Refactoring
12+
- [ ] Bug fix (non-breaking change which fixes an issue)
13+
- [ ] New feature (non-breaking change which adds functionality)
14+
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
15+
- [ ] Requires changes in customer code
16+
17+
## High-level change(s) description - from the user's perspective
18+
19+
<!--- Describe your changes in more detail -->
20+
21+
## Related Issue(s)
22+
23+
Fixes <!--- Please link to the issue here: -->
24+
25+
## Related pull request(s)
26+
27+
<!--- Please link to the PRs here: -->
28+
29+
<!--- adapted from https://github.com/inversify/inversify-basic-example/blob/master/PULL_REQUEST_TEMPLATE.md -->

0 commit comments

Comments
 (0)