Skip to content

Latest commit

 

History

History
45 lines (31 loc) · 1.96 KB

README.md

File metadata and controls

45 lines (31 loc) · 1.96 KB

Setheum Tokenization Protocol 258

Multi-Currency Stablecoin SERP Module

Overview

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.

Implementations

The stp258 module provides implementations for following traits.

  • SettCurrency - Abstraction over a fungible multi-currency stablecoin system.
  • ExtendedSettCurrency - Extended SettCurrency wih additional helper types and methods, like updating balance by a given signed integer amount.

Interface

Dispatchable Functions

  • transfer - Transfer some balance to another account, in a given currency.
  • transfer_native_currency - Transfer some balance to another account, in native currency set in Config::NativeCurrency.
  • update_balance - Update balance by signed integer amount, in a given currency, root origin required.

Acknowledgement

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.