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

BEP8 Mini-BEP2 token features #725

Merged
merged 106 commits into from
Jun 2, 2020
Merged

BEP8 Mini-BEP2 token features #725

merged 106 commits into from
Jun 2, 2020

Conversation

EnderCrypto
Copy link
Contributor

@EnderCrypto EnderCrypto commented Apr 30, 2020

Description

Similar to SME board in the traditional stock markets, introducing Mini-BEP2 Tokens is to benefit the below scenarios in which the normal BEP2 tokens are expensive and not convenient to issue/list:

  • Small enterprise tokens of utility and/or shares
  • Point system
  • Intellectual Property (IP) tokens

Rationale

Different from the normal BEP2, using a mini-token system is good at:

  • Very cheap (much less than BEP2) to issue tokens, as it takes less network resource
  • Easy and very cheap to list tokens, fully self-managed. It does not need to get validators vote to list against BNB and BUSD.

Example

Changes

Notable changes:
New Transactions for Mini token
bnbcli token issue-tiny
bnbcli token issue-mini
bnbcli token set-uri-mini
bnbcli dex list-mini

Existing Transactions supporting Mini token
burn
mint
freeze
unfreeze
new order
cancel order
delist

New RPC API for mini token
/mini-tokens/info
/mini-tokens/list
/dex-mini/pairs

Existing RPC API supporting mini token
/dex/orderbook
/dex/openorders

Preflight checks

  • build passed (make build)
  • tests passed (make test)
  • integration tests passed (make integration_test)
  • manual transaction test passed (cli invoke)

Already reviewed by

...

Related issues

bnb-chain/BEPs#69

@EnderCrypto EnderCrypto force-pushed the mini_token_bak branch 5 times, most recently from 7963ebf to 34ba52d Compare May 5, 2020 17:31
routes[issue.Route] = issue.NewHandler(tokenMapper, keeper)
routes[burn.BurnRoute] = burn.NewHandler(tokenMapper, keeper)
routes[freeze.FreezeRoute] = freeze.NewHandler(tokenMapper, accKeeper, keeper)
routes[issue.Route] = issue.NewHandler(tokenMapper, miniTokenMapper, keeper)
Copy link
Contributor

Choose a reason for hiding this comment

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

can we add a TokenKeeper including all these mappers and other related keepers

@@ -27,6 +29,10 @@ func NewHandler(kp Keeper) sdk.Handler {
}

func handleHashTimerLockedTransfer(ctx sdk.Context, kp Keeper, msg HTLTMsg) sdk.Result {
symbolError := types.ValidateMapperTokenCoins(msg.Amount)
Copy link
Contributor

Choose a reason for hiding this comment

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

why do we need to add this check for existing bep2 tokens

go.mod Outdated
@@ -29,7 +29,7 @@ require (
)

replace (
github.com/cosmos/cosmos-sdk => github.com/binance-chain/bnc-cosmos-sdk v0.25.0-binance.20
github.com/cosmos/cosmos-sdk => github.com/binance-chain/bnc-cosmos-sdk v0.19.1-0.20200529110602-b9a19ff527bf
Copy link
Contributor

Choose a reason for hiding this comment

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

why are we moving backwards

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will merge to the lastest cosmos sdk

@EnderCrypto EnderCrypto changed the title [WIP] Mini token bak BEP8 Mini token features Jun 1, 2020

"github.com/binance-chain/node/common/types"
"github.com/binance-chain/node/common/upgrade"
tokenStore "github.com/binance-chain/node/plugins/tokens/store"
Copy link
Contributor

Choose a reason for hiding this comment

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

please do not reference the token plugin in list plugin

InitPrice int64 `json:"init_price"`
}

func NewMiniMsg(from sdk.AccAddress, baseAssetSymbol string, quoteAssetSymbol string, initPrice int64) ListMiniMsg {
Copy link
Contributor

Choose a reason for hiding this comment

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

NewListMiniMsg

err = cdc.UnmarshalBinaryLengthPrefixed(bz, &tokens)
if err != nil {
fmt.Println(err)
Copy link
Contributor

Choose a reason for hiding this comment

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

logger

@EnderCrypto EnderCrypto merged commit a53b3dc into develop Jun 2, 2020
@EnderCrypto EnderCrypto changed the title BEP8 Mini token features BEP8 Mini-BEP2 token features Jun 2, 2020
@EnderCrypto EnderCrypto mentioned this pull request Jun 2, 2020
@unclezoro unclezoro deleted the mini_token_bak branch May 10, 2022 06:15
forcodedancing pushed a commit that referenced this pull request May 19, 2022
forcodedancing pushed a commit that referenced this pull request May 19, 2022
forcodedancing pushed a commit that referenced this pull request May 19, 2022
forcodedancing pushed a commit that referenced this pull request May 19, 2022
forcodedancing pushed a commit that referenced this pull request May 19, 2022
forcodedancing pushed a commit that referenced this pull request May 19, 2022
forcodedancing pushed a commit that referenced this pull request May 19, 2022
forcodedancing pushed a commit that referenced this pull request May 19, 2022
forcodedancing pushed a commit that referenced this pull request May 19, 2022
forcodedancing pushed a commit that referenced this pull request May 19, 2022
@tinhbao789
Copy link

good project

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants