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

Construction - SERP #438

Merged
merged 21 commits into from
Aug 8, 2021
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
12,589 changes: 0 additions & 12,589 deletions Cargo.lock

This file was deleted.

6 changes: 4 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ members = [
"lib-serml/dex/*",
"lib-serml/evm/*",
"lib-serml/example",
"lib-serml/serp/*",
"lib-serml/serp/serp-prices",
"lib-serml/serp/serp-settpay",
"lib-serml/serp/serp-staking",
"lib-serml/serp/serp-treasury",
"lib-serml/settmint/*",
"lib-serml/support",
"lib-serml/tokens/*",
Expand All @@ -25,7 +28,6 @@ members = [
"runtime/newrome",
"runtime/setheum",

"lib-openrml/auction",
"lib-openrml/authority",
"lib-openrml/bencher",
"lib-openrml/benchmarking",
Expand Down
18 changes: 4 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,30 +55,20 @@ DRAM("Setheum Dirham", 12) = 1, // Staking Reward and Governance Token - System

1. The Setter - The Setter is a basket currency pegged to the Top 10 Strongest and most valuable currencies. It serves as the medium of Exchange and the Defacto stablecoin of the Setheum Ecosystem. All other Setheum system stablecoins orbit around the Setter (SETT) and the SettMint for minting Setheum Currencies (system stablecoins) accepts only the Setter as the Minting Reserve Asset. Only with the Setter (SETT) can a user participate in the DNAR Auctions to stabilize the price of the Setter, while the Setter is Auctioned to stabilize the price of all the other SettCurrencies (system stablecoins). It's the star that brightens many planets - 10 to be exact


2. [The SERP](./lib-serp) - The SERP (Setheum Elastic Reserve Protocol) is algorithmically responsible for stabilizing the prices of the Setheum Stable Currencies. No human interferrance is needed for this, it's all algorithmically handled by the SERP. The SERP is the backbone of Setheum, it is based on my TES (Token Elasticity of Supply) algorithm based on PES (Price Elasticity of Supply) such that the demand curve or price of a currency determines the supply serping point, meaning the supply curve of a SettCurrency will be adjusted according to the demand curve of that specific SettCurrency. The result will be burning or minting an amount equivalent to the serping point produced by the SERP-TES, the burning amount will be bought back by the SERP automatically through the SerpAuction and the bought amount will be burnt to meet the satisfaction of the demand curve to prop the price back up to its peg, the opposite is done to lower the price of an under-supplied currency that is on demand and above its peg on the demand curve, for this the mint amount is divided into receipients including the SettPayTreasury where CashDrops are deposited for users to claim, the System Treasury under Governance, the Charity Fund stewarded by the Setheum Foundation, and the WelfareTreasury, more on the Welfare Treasury below.
2. [The SERP](./lib-serp) - The SERP (Setheum Elastic Reserve Protocol) is algorithmically responsible for stabilizing the prices of the Setheum Stable Currencies. No human interferrance is needed for this, it's all algorithmically handled by the SERP. The SERP is the backbone of Setheum, it is based on my TES (Token Elasticity of Supply) algorithm based on PES (Price Elasticity of Supply) such that the demand curve or price of a currency determines the supply serping point, meaning the supply curve of a SettCurrency will be adjusted according to the demand curve of that specific SettCurrency. The result will be burning or minting an amount equivalent to the serping point produced by the SERP-TES, the burning amount will be bought back by the SERP automatically through the built-in-DEX and the bought amount will be burnt to meet the satisfaction of the demand curve to prop the price back up to its peg, the opposite is done to lower the price of an under-supplied currency that is on demand and above its peg on the demand curve, for this the mint amount is divided into receipients including the SettPayTreasury where CashDrops are deposited for users to claim, the System Treasury under Governance, the Charity Fund stewarded by the Setheum Foundation, and the WelfareTreasury, more on the Welfare Treasury below.

In The SERP and Setheum lingua, I coined these terms:
* serp: to increase or decrease the supply of a Setheum stable Currency at its serping point in the curve, on either the x or y axis, the negative or the positive.
* serpup: to increase the supply of a Setheum stablecurrency at its serping point.
* serpdown: to decrease the supply of a Setheum stablecurrency at its serping point.

3. [The SerpAuction](./lib-serml/serp/serp-auction) - The SerpAuction is the Auction House of the SERP, it is the only endpoint of the SERP that interacts with the user. This lets the SERP auction off freshly minted Setheum Currency for Another to burn the latter and set the price stable to its peg. And when a currency is above its peg, as I mentioned abovein the SERP - the SERP System mints that demand-supply gap at the serping point and mints it to the recipients of the SerpUps.

The SerpAuctions are inspired by the Maker Protocol (MakerDAO) Auctions.
There are 2 Types of SerpAuctions:
* Diamond Auctions: A reverse auction to buy back a fixed amount of the Setter (SETT) with a decreasing amount of DNAR.
* Setter Auctions: A reverse auction to buy back a fixed amount of a SettCurrency (except for the Setter ofcourse) with a decreasing amount of Setter (SETT).

4. The WelfareTreasury - The WelfareTreasury is the Treasury that receives some amount of each SerpUp, this amount is then used by the Welfare Council (this council governs the WelfareTreasury) to buy back the DNAR by swapping on the DEX, the Council only has to call and approve the Buy Back, they don't have so much control over the swap. They just can call it and approve it. Then all the DNAR bought back is automatically burnt by the SERP.

5. [The SettMint](./lib-serml/settmint) - The Settmint is partly inspired by the Maker Protocol (MakerDAO), except that SettMint is on a very different principle of Setheum that ought not to be violated.
3. [The SettMint](./lib-serml/settmint) - The Settmint is partly inspired by the Maker Protocol (MakerDAO), except that SettMint is on a very different principle of Setheum that ought not to be violated.
SettMint is not a CDP but quite similar, as users can hold, authorize & transfer positions, users can reserve the Setter (SETT) to mint any SettCurrency of their choice without the need for over-collateralization, debt, interest rates, liquidation, or even stability fees. The stability of the Currencies is handles by the SERP, and the the Setter used as the reserve currency is also a SettCurrency (Setheum System Stablecoin) therefore eliminating position volatility and the risk of liquidation as all risk parameters have been eliminated with the Setter and Setheum's strong principle on the matters of the SettMint and Setheum's Monetary Policy.
This is one of the reasons I see Setheum as one of the most Sophisticated Advanced Economic Systems yet so simple, easy to use and understand, and even easier to get started.

6. The SettPay - The SettPay is responsible for the CashDrops that are dispatched by the SERP to the claimants (transactors that claim cashdrops). It is under the governance of the "Financial Council". They decide how much percent claimants get based on how much they spent, these params are custom and governable for every Setheum System currency including the DNAR. For example, DNAR spenders get 2.58% cashdrop per claimed transaction if their spent amount is >= 10000 dollars, else if their spent amount is < 10000 dollars && >= 100 then they get 4% cashdrop, else if their spent amount is < 100 then they get 5% cashdrop. The Welfare Council can update these parameters by governance proposals and voting without the need for forking or even a runtime upgrade.
4. The SettPay - The SettPay is responsible for the CashDrops that are dispatched by the SERP to the claimants (transactors that claim cashdrops). It is under the governance of the "Financial Council". They decide how much percent claimants get based on how much they spent, these params are custom and governable for every Setheum System currency including the DNAR. For example, DNAR spenders get 2.58% cashdrop per claimed transaction if their spent amount is >= 10000 dollars, else if their spent amount is < 10000 dollars && >= 100 then they get 4% cashdrop, else if their spent amount is < 100 then they get 5% cashdrop. The Welfare Council can update these parameters by governance proposals and voting without the need for forking or even a runtime upgrade.

3. [The SEVM](./lib-serml/evm) - The Setheum EVM is an Ethereum Virtual Machine (EVM) compatibility layer that implements the EVM on Setheum and bridges to Ethereum that opens the ground for interoperability between Ethereum and Setheum.
5. [The SEVM](./lib-serml/evm) - The Setheum EVM is an Ethereum Virtual Machine (EVM) compatibility layer that implements the EVM on Setheum and bridges to Ethereum that opens the ground for interoperability between Ethereum and Setheum.
The SEVM lets developers onboard, deploy or migrate their Ethereum Solidity Smart Contracts on Setheum seamlessly with little to no change in their code.
The SetheumEVM has a beautiful library of developer tools that let developers deploy, manageand interact with their smart contracts and upgradable smart contracts on the S-EVM with popular and well documented tools like Truffle, MetaMask, et al.
The Setters.JS is the Web3 Ethers.JS compatibility library for the Setheum EVM, to let users access the Setheumand the EVM both with a single wallet without having to use two separate wallets for compatibility.
Expand Down
2 changes: 2 additions & 0 deletions lib-serml/democracy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,5 @@ This call can only be made by the `VetoOrigin`.
- `cancel_referendum` - Removes a referendum.
- `cancel_queued` - Cancels a proposal that is queued for enactment.
- `clear_public_proposal` - Removes all public proposals.

License: Apache-2.0
47 changes: 0 additions & 47 deletions lib-serml/dex/incentives/Cargo.toml

This file was deleted.

Loading