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

Currencies #470

Merged
merged 2 commits into from
Aug 20, 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
15 changes: 5 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,11 @@ DRAM("Setheum Dirham", 12) = 1, // Staking Reward and Governance Token - System

#### The SettCurrencies - SERP Stablecoins
```
USDJ("Setheum US Dollar", 12) = 3,
EURJ("Setheum Euro", 12) = 4,
JPYJ("Setheum Japanese Yen", 12) = 5,
GBPJ("Setheum Pound Sterling", 12) = 6,
AUDJ("Setheum Australian Dollar", 12) = 7,
CADJ("Setheum Canadian Dollar", 12) = 8,
CHFJ("Setheum Swiss Franc", 12) = 9,
SEKJ("Setheum Swedish Krona", 12) = 10,
SGDJ("Setheum Singapore Dollar", 12) = 11,
SARJ("Setheum Saudi Riyal", 12) = 12,
SETUSD("SetDollar", 12) = 3,
SETEUR("SetEuro", 12) = 4,
SETGBP("SetPound", 12) = 5,
SETCHF("SetFranc", 12) = 6,
SETSAR("SetRiyal", 12) = 7,
```

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 (SETR) and the SettMint for minting Setheum Currencies (system stablecoins) accepts only the Setter as the Minting Reserve Asset. Only with the Setter (SETR) 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
Expand Down
16 changes: 8 additions & 8 deletions lib-serml/dex/dex/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ pub type AccountId = u128;

pub const ALICE: AccountId = 1;
pub const BOB: AccountId = 2;
pub const USDJ: CurrencyId = CurrencyId::Token(TokenSymbol::USDJ);
pub const SETUSD: CurrencyId = CurrencyId::Token(TokenSymbol::SETUSD);
pub const BTC: CurrencyId = CurrencyId::Token(TokenSymbol::RENBTC);
pub const DRAM: CurrencyId = CurrencyId::Token(TokenSymbol::DRAM);
pub const DNAR: CurrencyId = CurrencyId::Token(TokenSymbol::DNAR);

parameter_types! {
pub static USDJBTCPair: TradingPair = TradingPair::from_currency_ids(USDJ, BTC).unwrap();
pub static USDJDRAMPair: TradingPair = TradingPair::from_currency_ids(USDJ, DRAM).unwrap();
pub static SETUSDBTCPair: TradingPair = TradingPair::from_currency_ids(SETUSD, BTC).unwrap();
pub static SETUSDDRAMPair: TradingPair = TradingPair::from_currency_ids(SETUSD, DRAM).unwrap();
pub static DRAMBTCPair: TradingPair = TradingPair::from_currency_ids(DRAM, BTC).unwrap();
}

Expand Down Expand Up @@ -142,8 +142,8 @@ impl Default for ExtBuilder {
fn default() -> Self {
Self {
balances: vec![
(ALICE, USDJ, 1_000_000_000_000_000_000u128),
(BOB, USDJ, 1_000_000_000_000_000_000u128),
(ALICE, SETUSD, 1_000_000_000_000_000_000u128),
(BOB, SETUSD, 1_000_000_000_000_000_000u128),
(ALICE, BTC, 1_000_000_000_000_000_000u128),
(BOB, BTC, 1_000_000_000_000_000_000u128),
(ALICE, DRAM, 1_000_000_000_000_000_000u128),
Expand All @@ -158,16 +158,16 @@ impl Default for ExtBuilder {

impl ExtBuilder {
pub fn initialize_enabled_trading_pairs(mut self) -> Self {
self.initial_enabled_trading_pairs = vec![USDJDRAMPair::get(), USDJBTCPair::get(), DRAMBTCPair::get()];
self.initial_enabled_trading_pairs = vec![SETUSDDRAMPair::get(), SETUSDBTCPair::get(), DRAMBTCPair::get()];
self
}

pub fn initialize_added_liquidity_pools(mut self, who: AccountId) -> Self {
self.initial_added_liquidity_pools = vec![(
who,
vec![
(USDJDRAMPair::get(), (1_000_000u128, 2_000_000u128)),
(USDJBTCPair::get(), (1_000_000u128, 2_000_000u128)),
(SETUSDDRAMPair::get(), (1_000_000u128, 2_000_000u128)),
(SETUSDBTCPair::get(), (1_000_000u128, 2_000_000u128)),
(DRAMBTCPair::get(), (1_000_000u128, 2_000_000u128)),
],
)];
Expand Down
Loading