Multi-Currency Stablecoin SERP Module
The stp258 module provides a mixed stablecoin system, by configuring a
native currency which implements ExtendedBasicCurrency
, and a
multi-currency which implements SettCurrency
.
It also provides an adapter, to adapt frame_support::traits::Currency
implementations into ExtendedBasicCurrency
.
The stp258 module provides functionality of both ExtendedSettCurrency
and ExtendedBasicCurrency
, via unified interfaces, and all calls would be
delegated to the underlying multi-currency and base currency system.
A native currency ID could be set by Config::GetNativeCurrencyId
, to
identify the native currency.
The stp258 module provides implementations for following traits.
SettCurrency
- Abstraction over a fungible multi-currency stablecoin system.ExtendedSettCurrency
- ExtendedSettCurrency
wih additional helper types and methods, like updating balance by a given signed integer amount.
transfer
- Transfer some balance to another account, in a given currency.transfer_native_currency
- Transfer some balance to another account, in native currency set inConfig::NativeCurrency
.update_balance
- Update balance by signed integer amount, in a given currency, root origin required.
This Pallet is inspired by the ORML Currencies Pallet originally developed by Open Web3 Stack, for reference check The ORML Repo.
This Pallet is inspired by the Stablecoin Pallet originally developed by Alexander Popiak, for reference check The Apopiak/Stablecoin Repo.