Skip to content

Conversation

ShadowsNetwork
Copy link
Contributor

@ShadowsNetwork ShadowsNetwork commented Dec 5, 2020

Grant Application Checklist

  • The application-template.md has been copied, renamed ( "project_name.md") and updated.
  • A BTC address for the payment of the milestones is provided inside the application.
  • The software of the project will be released under the Apache license version 2.0 as specified in the terms and conditions.
  • The total funding amount of the project is below CHF 30k at the time of submission.

Copy link
Collaborator

@Noc2 Noc2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the application. I have a few questions/comments:

@Noc2 Noc2 added the changes requested The team needs to clarify a few things first. label Dec 7, 2020
@ShadowsNetwork
Copy link
Contributor Author

@Noc2 #Thank you for your comments. The following is the answer to your question

What is unique about your Ingester Module compared to the existing oracle modules and the work done by acala (see for example https://github.com/open-web3-stack/open-runtime-module-library/tree/master/oracle)? Could you not simply reuse their work? I’m also not sure how your solution ensures decentralization.

We use off-chain-workers to implement the Ingester Module (see https://substrate.dev/docs/en/knowledgebase/learn-substrate/off-chain-workers), which is completely different from the existing oracle modules. We cannot reuse their work for the following reasons:

  1. When we need to synthesize relatively unpopular assets on the chain, such as the global movie box office index, chainlink and other oracle service providers do not provide the asset price, then we need to request trust agency data through the off-chain-workers HTTP client.
  2. In the future, we may add community voting functions in the Ingester Module to reduce the risk of external data. For example, we can query the prices of the same assets issued by three institutions at the same time, If the data deviation of these three data sources exceeds a certain threshold, the voting process will be triggered. let the community vote to decide which price to use, and give DOS rewards to the winner of the vote. Of course, this mechanism requires that our dependence on external data is not so real-time.

Also what are the unique features of your Exchange and MintX modules (see https://github.com/w3f/General-Grants-Program/blob/master/grants/polkadot_stack.md for other solutions)?

Unlike the existing DEX based on order book or liquidity( Such as acala exchange is based on liquidity, and Polkadex is based on an order book), we are based on the debt pool model. All trades are executed against the contract, known as P2C (peer-to-contract) trading. This provides infinite liquidity up to the total amount of collateral in the system, zero slippage, and permissionless on-chain trading. For details, please refer to our white paper System Architecture chapter. (https://github.com/ShadowsNetwork/whitepaper/blob/main/ShadowsNetworkWhitePaper.pdf)

Could you reduce the price? It’s currently above the 30k limit.

Sorry, the calculation is wrong here, it has been corrected.

@ShadowsNetwork
Copy link
Contributor Author

@Noc2
Is there anything unclear that I need to describe?

@Noc2
Copy link
Collaborator

Noc2 commented Dec 8, 2020

Okay. Thanks a lot for the additional information and update. In this case you should take a look at the ares protocol. It seems you are right Acala is using off-chain worker, but it’s not used for laminars synthetic-protocol. Just one more question from my side: Could you also integrate unit-test into the deliverables for both milestones as well as some kind of medium article or tutorial.

@ShadowsNetwork
Copy link
Contributor Author

@Noc2
Thank you for your suggestions, the functions provided by aresprotocols are amazing. We will consider using it to obtain external data. But currently aresprotocols are also under development, so we currently plan to continue to develop our Ingester Module. I look forward to cooperating with aresprotocols to strengthen ecological links in the future.
We have added Tutorial and Testing to the milestone.

Copy link
Collaborator

@Noc2 Noc2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and thanks for the update. I will share it with the rest of the team.

@Noc2 Noc2 added ready for review The project is ready to be reviewed by the committee members. and removed changes requested The team needs to clarify a few things first. labels Dec 8, 2020
@laboon
Copy link
Collaborator

laboon commented Dec 9, 2020

Can you provide some details on the debt pool model? I am not familiar with this and could not find any detailed information in the white paper.

@ShadowsNetwork
Copy link
Contributor Author

@laboon Hi! Here are some descriptions about the mortgage pool:

The debt pool is the core design of the shadows network and one of the biggest highlights. The debt in the debt pool is generated by stake DOS, which is the native token of the shadows network.

When users stake DOS to create synthetic assets (such as synthesizing xUSD), "debt" is generated. The sum of debts of all DOS stakers is called the "debt pool".

Let's take an example of minting xUSD and buying xBTC to illustrate what a debt pool is. Here it is assumed that the price of DOS is the same as USD, the stake rate is 800%, and the initial debt of the system is 0.

  1. Alice used 800 DOS to mint 100 xUSD. At this time, the total debt of the system is: 100 xUSD, and Alice's personal debt in the entire debt pool accounts for 100%.
  2. Bruce used 2400 DOS to mint 300 xUSD. At this time, the total system debt becomes: 400 xUSD, and the total supply of xUSD is 400.
    Alice's personal debt in the entire debt pool becomes 25%, and Bruce's personal debt is 75%.
  3. If Alice intends to use all 100 xUSD to buy 1 x BTC (assuming that the price of BTC is 100$ at this time), the steps involved in the transaction are as follows:
    3.1. Destroy 100 xUSD, including reducing the xUSD balance of Alice's wallet address and updating the total supply of xUSD,
    3.2. Destroy 100 xUSD debt
    3.3. Mint 1 xBTC and update the xBTC balance of Alice wallet address to 1
    3.4. Add 1 xBTC debt
    At this time, the total debt of the system is 300 xUSD and 1 xBTC. The total supply of xUSD is 300 and the total supply of xBTC is 1.

It can be seen from the above process that the transaction of synthetic assets is mainly to interact with smart contracts, there is no order book, and no counterparty. Synthetic asset transactions only exchange debt from one synthetic asset to another synthetic asset, and use the debt changes in the debt pool to cast or destroy synthetic assets, so that users don’t have to worry about liquidity issues, and there is no slippage problem. It is the essence of the debt pool.

@laboon
Copy link
Collaborator

laboon commented Dec 10, 2020

Interesting, thank you for the explanation!

@mmagician mmagician merged commit a411030 into w3f:master Dec 10, 2020
@github-actions
Copy link
Contributor

Congratulations! As part of the Open Grants Program, we want to help winning teams acknowledge their grants publicly while observing the foundation’s guidelines. To that end, we’ve created a badge for grant-winning teams. Here is a link to the download and guidelines.

Once you complete your first grant milestone, would you be interested in collaborating on an announcement about the work you’re doing? If so, then please get in touch with us at grantspr@web3.foundation prior to making the announcement (at least two weeks notice is preferred) so that we can coordinate on timing and content.

Please don’t announce the grant publicly before you finished at least the first milestone of the project.

@Noc2
Copy link
Collaborator

Noc2 commented Jan 12, 2021

@ShadowsNetwork Could you please remove the web3 foundation grants badge from your website. You are only allowed to use this once you successfully delivered the first milestone, see : https://github.com/w3f/General-Grants-Program/blob/master/grants/grant-badge-guidelines.md

@ShadowsNetwork
Copy link
Contributor Author

@Noc2
Sorry for not paying attention to the news. There was a misunderstanding about this before, but it has now been removed.

@Noc2
Copy link
Collaborator

Noc2 commented Jan 15, 2021

Thanks!

@alxs
Copy link
Contributor

alxs commented Mar 9, 2021

This grant has been terminated due to copyright infringements. See here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for review The project is ready to be reviewed by the committee members.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants