Polkadex - An Orderbook-based Decentralized Exchange using the Substrate Blockchain Framework.

Overview

Logo

What is Polkadex? ๐Ÿš€

Polkadex is a Open Source, Decentralized Exchange Platform made using Substrate Blockchain Framework that provides traders with the centralized user experience.

Why did we do this? ๐ŸŽ

There are many decentralized exchanges/protocols available in the market for traders but they still prefer to use centralized solutions for their convenience and ease of use knowing very well that their funds are at risk. This is because decentralized solutions are still not user friendly to an average trader. Some of them also have no proper decentralization and also got hacked in the process. We cannot call an exchange decentralized if it can lose or freeze customer funds.

The problems faced by decentralized exchanges are:

  • Inadequate UI/UX experience.
  • Low liquidity
  • Lack of advanced trading features, high-frequency trading, and bots.
  • Lack of proper decentralization and interoperability.

To solve the above problems, our goal is to build a fully decentralized, peer-peer, cryptocurrency exchange for the Defi ecosystem in Substrate. The project envisages the creation of a fully decentralized platform for exchanging tokens in a peer-peer, trustless environment, that enables high-frequency trading, high-liquidity, and lightning-fast transaction speed for supporting Defi applications.

In order to address the first problem, we needed to enable features that attract users into the exchange which includes a fast, responsive UI and trading features. It is mainly to attract day traders and retail investors who prefer centralized exchanges due to convenience and speed of execution. The block time of 3s given by the Babe/Grandpa consensus algorithm allows transaction speeds of up to 400/s under test conditions which is more than sufficient to compete with any centralized solutions in the market today. Please check our analysis here. Since Substrate allows the modular implementation of the consensus algorithm, we think a platform like a Substrate will support the future growth of the exchange by changing consensus to accommodate more transactions per second as better ones emerge.

Secondly, the lack of liquidity is addressed by enabling,

  1. High-frequency trading using feeless transactions.
  2. APIs that enable trading/AMM bots to observe market changes and submit trades.
  3. Advanced trading features like stop limit, market limit, Stop loss, Fill/Kill, Post only, TWAP, etc.

Thirdly, proper decentralization and Interoperability are achieved by having a parachain in Polkadot that brings in liquidity from other blockchains and also using ChainBridge protocol that connects directly to the Ethereum network. Hence, traders have two different mechanisms to bring in liquidity.

The value we provide to the Substrate community is,

  1. They can build custom UI/UX to connect to our network and create their own custom exchange experience.
  2. Traders can contribute their own custom trading algorithms by making use of market data provided by our full nodes.
  3. They get a decentralized trading platform to trade Polkadot & Ethereum tokens.
  4. This will be one of the first Decentralized exchanges to have High-Frequency Trading bot support using APIs directly from full nodes. Web3 Grants

Build the Polkadex Node ๐Ÿ’ƒ

To build Polkadex, you will need a proper Substrate development environment. If you need a refresher setting up your Substrate environment, see Substrate's Getting Started Guide.

Note that cloning master might result in an unstable build. If you want a stable version, check out the latest releases.

# Fetch the code
git clone https://github.com/Polkadex-Substrate/Polkadex.git
cd Polkadex

# Build the node (The first build will be long (~30min))
cargo build --release

If a cargo not found error shows up in the terminal, manually add Rust to your system path (or restart your system):

source $HOME/.cargo/env

Then, you will want to run the node in dev mode using the following command:

./target/release/polkadex-node --dev

For people not familiar with Substrate, the --dev flag is a way to run a Substrate-based node in a single node developer configuration for testing purposes. You can learn more about --dev in this Substrate tutorial.

When running a node via the binary file, data is stored in a local directory typically located in ~/.local/shared/polkadex-node/chains/development/db. If you want to start a fresh instance of the node, you can either delete the content of the folder, or run the following command inside the polkadex folder:

./target/release/node-polkadex purge-chain --dev

This will remove the data folder, note that all chain data is now lost.

Run a local network (two nodes)

  • Install subkey, jq
curl https://getsubstrate.io -sSf | bash -s --
brew install jq
  • Generate node key using subkey
Alice_Node_Key=$(subkey generate --scheme Ed25519 --output-type Json | jq -r '.secretSeed')
  • Run Alice's node
# Purge any chain data from previous runs
./target/release/polkadex-node purge-chain --base-path /tmp/alice --chain local

# Start Alice's node
./target/release/polkadex-node --base-path /tmp/alice \
  --chain local \
  --alice \
  --port 30333 \
  --ws-port 9945 \
  --rpc-port 9933 \
  --node-key $Alice_Node_Key \
  --telemetry-url 'wss://telemetry.polkadot.io/submit/ 0' \
  --validator
2021-06-30 08:12:38 Polkadex Node    
2021-06-30 08:12:38 โœŒ๏ธ  version 3.0.0-6426a73b-x86_64-macos    
2021-06-30 08:12:38 โค๏ธ  by Substrate DevHub <https://github.com/substrate-developer-hub>, 2017-2021    
2021-06-30 08:12:38 ๐Ÿ“‹ Chain specification: Local Testnet    
2021-06-30 08:12:38 ๐Ÿท Node name: Alice    
2021-06-30 08:12:38 ๐Ÿ‘ค Role: AUTHORITY    
2021-06-30 08:12:38 ๐Ÿ’พ Database: RocksDb at /tmp/alice/chains/local_testnet/db    
2021-06-30 08:12:38 โ›“  Native runtime: node-polkadex-265 (node-polkadex-1.tx2.au10)    
2021-06-30 08:12:39 ๐Ÿ”จ Initializing Genesis block/state (state: 0xbe0aโ€ฆ5ef3, header-hash: 0xa55fโ€ฆ7888)    
2021-06-30 08:12:39 ๐Ÿ‘ด Loading GRANDPA authority set from genesis on what appears to be first startup.    
2021-06-30 08:12:39 โฑ  Loaded block-time = 3s from genesis on first-launch    
2021-06-30 08:12:39 ๐Ÿ‘ถ Creating empty BABE epoch changes on what appears to be first startup.    
2021-06-30 08:12:39 Using default protocol ID "sup" because none is configured in the chain specs    
2021-06-30 08:12:39 ๐Ÿท Local node identity is: 12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp    
2021-06-30 08:12:39 ๐Ÿ“ฆ Highest known block at #0    
2021-06-30 08:12:39 ใ€ฝ๏ธ Prometheus server started at 127.0.0.1:9615    
2021-06-30 08:12:39 Listening for new connections on 127.0.0.1:9945.    
2021-06-30 08:12:39 ๐Ÿ‘ถ Starting BABE Authorship worker    
2021-06-30 08:12:44 ๐Ÿ’ค Idle (0 peers), best: #0 (0xa55fโ€ฆ7888), finalized #0 (0xa55fโ€ฆ7888), โฌ‡ 0 โฌ† 0    
2021-06-30 08:12:49 ๐Ÿ’ค Idle (0 peers), best: #0 (0xa55fโ€ฆ7888), finalized #0 (0xa55fโ€ฆ7888), โฌ‡ 0 โฌ† 0    
2021-06-30 08:12:54 ๐Ÿ’ค Idle (0 peers), best: #0 (0xa55fโ€ฆ7888), finalized #0 (0xa55fโ€ฆ7888), โฌ‡ 0 โฌ† 0

Local node identity is: 12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp shows the Peer ID that Bob will need when booting from Alice's node. This value was determined by the --node-key that was used to start Alice's node.

Now that Alice's node is up and running, Bob can join the network by bootstrapping from her node.

./target/release/polkadex-node purge-chain --base-path /tmp/bob --chain local
./target/release/polkadex-node \
  --base-path /tmp/bob \
  --chain local \
  --bob \
  --port 30334 \
  --ws-port 9946 \
  --rpc-port 9934 \
  --telemetry-url 'wss://telemetry.polkadot.io/submit/ 0' \
  --validator \
  --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp

If all is going well, after a few seconds, the nodes should peer together and start producing blocks. You should see some lines like the following in the console that started Alice node.

2021-06-30 08:16:52 Polkadex Node    
2021-06-30 08:16:52 โœŒ๏ธ  version 3.0.0-6426a73b-x86_64-macos    
2021-06-30 08:16:52 โค๏ธ  by Substrate DevHub <https://github.com/substrate-developer-hub>, 2017-2021    
2021-06-30 08:16:52 ๐Ÿ“‹ Chain specification: Local Testnet    
2021-06-30 08:16:52 ๐Ÿท Node name: Bob    
2021-06-30 08:16:52 ๐Ÿ‘ค Role: AUTHORITY    
2021-06-30 08:16:52 ๐Ÿ’พ Database: RocksDb at /tmp/bob/chains/local_testnet/db    
2021-06-30 08:16:52 โ›“  Native runtime: node-polkadex-265 (node-polkadex-1.tx2.au10)    
2021-06-30 08:16:52 ๐Ÿ”จ Initializing Genesis block/state (state: 0xbe0aโ€ฆ5ef3, header-hash: 0xa55fโ€ฆ7888)    
2021-06-30 08:16:52 ๐Ÿ‘ด Loading GRANDPA authority set from genesis on what appears to be first startup.    
2021-06-30 08:16:52 โฑ  Loaded block-time = 3s from genesis on first-launch    
2021-06-30 08:16:52 ๐Ÿ‘ถ Creating empty BABE epoch changes on what appears to be first startup.    
2021-06-30 08:16:52 Using default protocol ID "sup" because none is configured in the chain specs    
2021-06-30 08:16:52 ๐Ÿท Local node identity is: 12D3KooWRHDuuHg5ZQcJhvVDKud9XkFz2Dcs2GQKF9KKuTD6quq7    
2021-06-30 08:16:53 ๐Ÿ“ฆ Highest known block at #0    
2021-06-30 08:16:53 Listening for new connections on 127.0.0.1:9946.    
2021-06-30 08:16:53 ๐Ÿ‘ถ Starting BABE Authorship worker    
2021-06-30 08:16:53 ๐Ÿ” Discovered new external address for our node: /ip4/127.0.0.1/tcp/30334/p2p/12D3KooWRHDuuHg5ZQcJhvVDKud9XkFz2Dcs2GQKF9KKuTD6quq7    
2021-06-30 08:16:53 ๐Ÿ” Discovered new external address for our node: /ip4/192.168.1.37/tcp/30334/p2p/12D3KooWRHDuuHg5ZQcJhvVDKud9XkFz2Dcs2GQKF9KKuTD6quq7    
2021-06-30 08:16:53 Creating inherent data providers took more time than we had left for the slot.    
2021-06-30 08:16:54 ๐Ÿ™Œ Starting consensus session on top of parent 0xa55fa19cc37ca1f8d93bc06ca1f6fee767f18200516d9e349938601a3fe97888    
2021-06-30 08:16:54 ๐ŸŽ Prepared block for proposing at 1 [hash: 0x2959db5e42a7192434d3699d335e5d920da73409963e3081ad43afd93a8cdb4b; parent_hash: 0xa55fโ€ฆ7888; extrinsics (1): [0x4431โ€ฆ4eff]]    
2021-06-30 08:16:54 ๐Ÿ”– Pre-sealed block for proposal at 1. Hash now 0x5263ed1cbf1b4edbc887cc87786471819cd0614d8aeaff3a898c0c3ffda245c2, previously 0x2959db5e42a7192434d3699d335e5d920da73409963e3081ad43afd93a8cdb4b.    
2021-06-30 08:16:54 ๐Ÿ‘ถ New epoch 0 launching at block 0x5263โ€ฆ45c2 (block slot 541685138 >= start slot 541685138).    
2021-06-30 08:16:54 ๐Ÿ‘ถ Next epoch starts at slot 541685338    
2021-06-30 08:16:54 โœจ Imported #1 (0x5263โ€ฆ45c2)    
2021-06-30 08:16:57 ๐Ÿ™Œ Starting consensus session on top of parent 0x5263ed1cbf1b4edbc887cc87786471819cd0614d8aeaff3a898c0c3ffda245c2    
2021-06-30 08:16:57 ๐ŸŽ Prepared block for proposing at 2 [hash: 0x0c513e39a88bcb03d113a18ed824bcbaab03881e9dcdeedbe12e71955dcfe05d; parent_hash: 0x5263โ€ฆ45c2; extrinsics (1): [0xf06aโ€ฆbf04]]    
2021-06-30 08:16:57 ๐Ÿ”– Pre-sealed block for proposal at 2. Hash now 0x4293ecd46db852f5add54a24acfcd1ea12f6c26d5470b61736d7cf0e039e3e39, previously 0x0c513e39a88bcb03d113a18ed824bcbaab03881e9dcdeedbe12e71955dcfe05d.    
2021-06-30 08:16:57 โœจ Imported #2 (0x4293โ€ฆ3e39)    
2021-06-30 08:16:58 ๐Ÿ’ค Idle (1 peers), best: #2 (0x4293โ€ฆ3e39), finalized #0 (0xa55fโ€ฆ7888), โฌ‡ 1.7kiB/s โฌ† 1.9kiB/s 

Using docker

The following commands will setup a local polkadex network made of 2 nodes. It's using the node key (0000000000000000000000000000000000000000000000000000000000000001). But you should generate your own node key using the subkey as the above.

docker build . -t polkadex-node
docker-compose -f 2nodes.yml up --force-recreate

Connecting Polkadot JS Apps to a Local Polkadex Node

The development node is a Substrate-based node, so you can interact with it using standard Substrate tools. The two provided RPC endpoints are:

  • HTTP: http://127.0.0.1:9933
  • WS: ws://127.0.0.1:9944

Start by connecting to it with Polkadot JS Apps. Open a browser to: https://polkadot.js.org/apps/#/explorer. This will open Polkadot JS Apps, which automatically connects to Polkadot MainNet.

Click on the top left corner to open the menu to configure the networks, and then navigate down to open the Development sub-menu. In there, you will want to toggle the "Local Node" option, which points Polkadot JS Apps to ws://127.0.0.1:9944. Next, select the Switch button, and the site should connect to your Polkadex development node.

How to run a validator

Here is a guide Run a validator (Polkadex)

Contribute ๐Ÿ˜

We would love to work with anyone who can contribute their work and improve this project. The details will be shared soon.

License ๐Ÿ“œ

Licensed Under GPLv3

Comments
  • Implements Polkapool Pallet

    Implements Polkapool Pallet

    1. Implements the transaction store dispatchable function
    2. Adds the required types to Config trait
    3. Sets up the on_initialize function

    Complete the following items to complete this PR

    • [x] Remove MinStakeAmount from config trait The min stake amount should be determined using the weight of the dispatchable function, and then instead of MinStakeAmount, the config should define MinStakePerWeight. The min stake required is calculated by the weight of the transaction multiplied by MinStakePerWeight

    • [x] Remove MaxAllowedTxns from config trait The number of allowed transactions should be limited based on the transaction's weight instead of the number of txns. Limiting the number of txns based on the total weight gives a pre-determined resource usage in every block. Therefore, the config trait should define MaxAllowedWeight, which is defined as an x% (say 20% for testing) of the total block weight in runtime.

    • [x] Similarly MinStakePeriod should also be removed for MinStakePeriodPerWeight ( up for discussion ) Here too, the total time a user should be staking the tokens depends on the total weight of the transaction multiplied by MinStakePeriodPerWeight

    Points to consider

    1. The goal is to make it costlier for an attacker to continue exploiting the system for feeless transactions.
    2. If it is based on total weight, heavier transactions will have a long stake period compared to lighter transactions, but this doesn't solve an attacker sending lots of lighter transactions.
    3. We can implement a quadratic formula where the Stake period increases with more and more usage in a short period of time.
    • [x] Implement a simple shuffler algorithm for shuffling a vector of calls based on the randomness from on-chain.

    Moved this task Extend theCallFilteronly to allow a pre-determined contract address from the contract's pallet ( up for discussion, is there a better way to filter feeless transactions) to #212

    • [x] Governance dispatchable to slash the stake of defaulting users.
    feature 
    opened by Gauthamastro 10
  • Testing OCEX pallet

    Testing OCEX pallet

    This PR adds unit tests for the OCEX pallet extrinsics

    This branch also consists the following PRs merged

    • #488
    • #487
    • #485
    • #484

    This PR also resolves refactor withdrawal which was in #483 as this branch is updated to polkadot-v0.9.28

    A0-PleaseReview 
    opened by felixfaisal 7
  • Update to substrate september tag + 1

    Update to substrate september tag + 1

    The following libraries should be updated on the node side to the substrate september tag:

    • [x] OCEX pallet (https://github.com/Polkadex-Substrate/Polkadex/issues/366)
    • [x] pallet substratee registry, there is a branch already created here: https://github.com/Polkadex-Substrate/pallet-substratee-registry/tree/substrate-monthly-2021-09%2B1
    • [x] Polkadex primitives, possible branch: https://github.com/Polkadex-Substrate/polkadex-primitives/tree/substrate-monthly-2021-09+1
    • [x] ORML pallets: https://github.com/Polkadex-Substrate/open-runtime-module-library
    • [x] The node itself: https://github.com/Polkadex-Substrate/Polkadex/tree/develop

    As discussed in https://github.com/Polkadex-Substrate/sgx-runtime/pull/4 branch="master" should be specified in the .toml and the commit https://github.com/paritytech/substrate/commit/dd297887c653e344c566e976c050b01f7dea8eef) used (tag commit 20a9bbb1fe47fcd62fcd64b2fa32456b4f434aaf causes problems for GA, but both commits are the same).

    It would be great if you could tick mark the specific libraries that have been updated. :)

    opened by haerdib 7
  • Randomized selection of participants is not implemented for IDO

    Randomized selection of participants is not implemented for IDO

    The polkadex IDO pallet allows anyone to create an IDO round. Once that is created, the caller of it can whitelist participants to the IDO round. Also, anyone who is registered as a participant should be able to show_interest in participating in the round. These interested participants should be selected using BABE Randomness. This is not yet implemented in the IDO pallet.

    feature security 
    opened by Gauthamastro 5
  • Generic ERC-20 token transfer

    Generic ERC-20 token transfer

    1. Update chainbridge & example pallet under https://github.com/Polkadex-Substrate/chainbridge-substrate repo.
    • [x] Transfer ERC20 token from ethereum to Polkadex ChainSafe(H160) asset

    Current workflow: When deposit event happens on ethereum side, Chainbridge relayer captures it and make an extrinsic call to Polkadex. (acknowledge_proposal)

    acknowledge_proposal โ†’ vote_for โ†’ commit_vote, try_resolve_proposal โ†’ finalize_execution or cancel_execution โ†’ call.dispatch (Example.transfer)

    In Example.transfer, it transfers the amount of tokens using the bridge account as the source. Need to figure out how we can mint these assets as generic.

    • [x] Transfer ChainSafe(H160) asset from Polkadex to ERC20 token This is currently WIP.
    1. Update runtime Need to replace the current native Currency with the ChainSafe asset in runtime
    feature 
    opened by frankli-dev 5
  • Wont build - ubuntu 20.04

    Wont build - ubuntu 20.04

    please help

    root@ubuntu-s-1vcpu-1gb-polkadex:~/Polkadex# cargo build --release Compiling node-polkadex-runtime v2.0.0-rc6 (/root/Polkadex/runtime) Compiling node-polkadex v2.0.0-rc6 (/root/Polkadex/node) error: could not compile node-polkadex

    Caused by: process didn't exit successfully: rustc --crate-name node_polkadex --edition=2018 node/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C metadata=276300912b27e3ac -C extra-filename=-276300912b27e3ac --out-dir /root/Polkadex/target/release/deps -L dependency=/root/Polkadex/target/release/deps --extern jsonrpc_core=/root/Polkadex/target/release/deps/libjsonrpc_core-9b0b0492c96f271b.rmeta --extern jsonrpc_core_client=/root/Polkadex/target/release/deps/libjsonrpc_core_client-603a0c90edc1f736.rmeta --extern jsonrpc_derive=/root/Polkadex/target/release/deps/libjsonrpc_derive-f4487a8f83370a07.so --extern node_polkadex_runtime=/root/Polkadex/target/release/deps/libnode_polkadex_runtime-2b4b7f159fb3a3b6.rmeta --extern pallet_transaction_payment_rpc=/root/Polkadex/target/release/deps/libpallet_transaction_payment_rpc-9571780298b0097c.rmeta --extern rpc=/root/Polkadex/target/release/deps/librpc-d4277266da7a6c28.rmeta --extern runtime_api=/root/Polkadex/target/release/deps/libruntime_api-f154747cca61e4ad.rmeta --extern sc_basic_authorship=/root/Polkadex/target/release/deps/libsc_basic_authorship-8bff4cca6753195d.rmeta --extern sc_cli=/root/Polkadex/target/release/deps/libsc_cli-5f946e43d367d576.rmeta --extern sc_client_api=/root/Polkadex/target/release/deps/libsc_client_api-97175913e7850850.rmeta --extern sc_consensus=/root/Polkadex/target/release/deps/libsc_consensus-6ce14f90ffe97330.rmeta --extern sc_consensus_babe=/root/Polkadex/target/release/deps/libsc_consensus_babe-e63846dc67e4b858.rmeta --extern sc_executor=/root/Polkadex/target/release/deps/libsc_executor-dca1c4963320bee5.rmeta --extern sc_finality_grandpa=/root/Polkadex/target/release/deps/libsc_finality_grandpa-90fe0e5b86f2c5f0.rmeta --extern sc_rpc=/root/Polkadex/target/release/deps/libsc_rpc-f193b9368bdcbffd.rmeta --extern sc_rpc_api=/root/Polkadex/target/release/deps/libsc_rpc_api-a5bf96f7b482689f.rmeta --extern sc_service=/root/Polkadex/target/release/deps/libsc_service-22ea5f9d9278674d.rmeta --extern sc_transaction_pool=/root/Polkadex/target/release/deps/libsc_transaction_pool-3cf652806ace7654.rmeta --extern sp_api=/root/Polkadex/target/release/deps/libsp_api-c5fa8a76061b02c9.rmeta --extern sp_block_builder=/root/Polkadex/target/release/deps/libsp_block_builder-386d012d05ba4d95.rmeta --extern sp_blockchain=/root/Polkadex/target/release/deps/libsp_blockchain-bc367ed12e740e05.rmeta --extern sp_consensus=/root/Polkadex/target/release/deps/libsp_consensus-c684c93b78b31b5a.rmeta --extern sp_consensus_babe=/root/Polkadex/target/release/deps/libsp_consensus_babe-0eee42cae05b4bde.rmeta --extern sp_core=/root/Polkadex/target/release/deps/libsp_core-6c35f85790f0f226.rmeta --extern sp_finality_grandpa=/root/Polkadex/target/release/deps/libsp_finality_grandpa-8a92cb7367a22be7.rmeta --extern sp_inherents=/root/Polkadex/target/release/deps/libsp_inherents-4d842d058ef3183a.rmeta --extern sp_runtime=/root/Polkadex/target/release/deps/libsp_runtime-d2cbe6284c68a828.rmeta --extern sp_transaction_pool=/root/Polkadex/target/release/deps/libsp_transaction_pool-d4ca49994cc2f87b.rmeta --extern structopt=/root/Polkadex/target/release/deps/libstructopt-d07791ba3397a584.rmeta --extern substrate_frame_rpc_system=/root/Polkadex/target/release/deps/libsubstrate_frame_rpc_system-d36bb9cf78d899bb.rmeta -L native=/root/Polkadex/target/release/build/ring-562b25fb7dbe1699/out -L native=/root/Polkadex/target/release/build/libz-sys-68b6c7804e5ae034/out/build -L native=/root/Polkadex/target/release/build/zstd-sys-9bb7b935c7dbcd10/out -L native=/root/Polkadex/target/release/build/wasmtime-runtime-afcdc8d0320438a5/out -L native=/root/Polkadex/target/release/build/librocksdb-sys-6e30ee65f7cd0b83/out -L native=/root/Polkadex/target/release/build/librocksdb-sys-6e30ee65f7cd0b83/out (signal: 9, SIGKILL: kill) root@ubuntu-s-1vcpu-1gb-polkadex:~/Polkadex#

    opened by mahalamobile 5
  • Upgrade main net to october tag

    Upgrade main net to october tag

    Mainnet must be upgraded to latest substrate-monthly tag to keep up with security problems found upstream.

    Before deployed on main net, tests of

    • [ ] runtime upgrade must be completed.
    • [ ] storage migration?
    • [ ] other
    opened by simonsso 4
  • Uniswap v2 Ink smart contract

    Uniswap v2 Ink smart contract

    Is your feature request related to a problem? Please describe. Related to Polkapool

    Describe the solution you'd like https://github.com/Uniswap/uniswap-v2-core/tree/master/contracts https://github.com/Uniswap/uniswap-v2-periphery/tree/master/contracts Convert solidity smart contract into ink smart contract

    Describe alternatives you've considered TDD;

    Additional context TDD;

    duplicate enhancement feature 
    opened by frankli-dev 4
  • Remove Generic Asset and Old engine pallet

    Remove Generic Asset and Old engine pallet

    Is your feature request related to a problem? Please describe. As we have completely removed Generic Assets and the Old Polkadex engine in these PRs https://github.com/Polkadex-Substrate/Polkadex/pull/77 and https://github.com/Polkadex-Substrate/Polkadex/pull/72. We can remove the pallets generic asset and polkadex from the pallets folder

    enhancement 
    opened by Gauthamastro 4
  • Refactor Withdrawal Extrinsic

    Refactor Withdrawal Extrinsic

    This PR refactors withdrawal extrinsic wherein it utilises the BTreeMap provided in the snapshot rather than a Bounded. This PR also includes a helper function that returns the vector of withdrawals for a user.

    A0-PleaseReview 
    opened by felixfaisal 3
  • Build Failiure

    Build Failiure

    I've cloned latest version of polkadex. cargo build --release causing error.

    These are the runtime error Im getting

    Screenshot from 2021-11-15 22-52-31

    Screenshot from 2021-11-15 22-52-56

    rustup show looks like this.

    Screenshot from 2021-11-15 22-53-20

    Is there any solution to this?/

    bug un-confirmed 
    opened by munnatamton 3
  • fixed small typo

    fixed small typo

    Describe your changes

    Issue ticket number and link

    Checklist before requesting a review

    • [ ] I have performed a self-review of my code.
    • [ ] If it is a core feature, I have added thorough tests.
    • [ ] I removed all Clippy and Formatting Warnings.
    • [ ] I added required Copyrights.
    opened by mohamadzoh 0
  • Bump secp256k1 from 0.24.0 to 0.24.2

    Bump secp256k1 from 0.24.0 to 0.24.2

    Bumps secp256k1 from 0.24.0 to 0.24.2.

    Changelog

    Sourced from secp256k1's changelog.

    0.24.2 - 2022-12-05

    0.24.1 - 2022-10-25

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • [588] Setup automated release deployment

    [588] Setup automated release deployment

    In this pr was:

    • [X] - Refactored release build github workflow with usage of softprops/action-gh-release action, since old action is archived and not maintained anymore (deprecated).
    • [X] - Added dockerfile to build image with release build.
    • [X] - Extended release workflow with action to build and upload dockerimage with release to the Docker Hub.
    • [X] - Extended release workflow with action to upload/update OnFinality network spec.

    This PR closes issue #588.

    CI/CD A0-PleaseReview 
    opened by serhii-temchenko 1
  • Setup automated release deployment

    Setup automated release deployment

    Deployment process should be improved with extended github action which will build docker image on the new release event and upload it to the dockerhub.
    Setup as well onFinality deployment on release event.

    CI/CD 
    opened by serhii-temchenko 1
  • Remove Insert enclave

    Remove Insert enclave

        I assume this should be removed?
    

    Originally posted by @serhii-temchenko in https://github.com/Polkadex-Substrate/Polkadex/pull/533#discussion_r984294215

    pre-mainnet 
    opened by Gauthamastro 1
Releases(v4.0.0)
Substrate blockchain generated with Substrate Startkit

Substrate Node Template A new FRAME-based Substrate node, ready for hacking ?? Getting Started This project contains some configuration files to help

HoangDuong 1 Oct 19, 2021
Substrate blockchain generated with Substrate Startkit

Substrate Node Template A new FRAME-based Substrate node, ready for hacking ?? Getting Started This project contains some configuration files to help

HoangDuong 1 Oct 19, 2021
Substrate blockchain generated with Substrate Startkit

Substrate Node Template A new FRAME-based Substrate node, ready for hacking ?? Getting Started This project contains some configuration files to help

Liam Parry 0 Nov 6, 2021
A Multi-chain Decentralized Exchange (DEX) built on CosmWasm for the WYND DAO.

WynDex A Multi-chain Decentralized Exchange (DEX) built on CosmWasm for the WYND DAO. Overview License The initial pool types were copied from astropo

null 7 Jan 31, 2023
Node implementation for aleph blockchain built with Substrate framework

This repository contains the Rust implementation of Aleph Zero blockchain node based on the Substrate framework. Aleph Zero is an open-source layer 1

Aleph Zero Foundation 55 Dec 15, 2022
xx network Substrate based blockchain node

xx network Substrate based blockchain node Rust Setup First, complete the basic Rust setup instructions. MacOS users: setup to compile for Linux Befor

xx network 11 Dec 20, 2022
The Data Highway Substrate-based blockchain node.

DataHighway-Parachain, a parachain on the Polkadot network. Planned features include a decentralized LPWAN roaming hub for LoRaWAN IoT devices and network operator roaming agreements, participative mining, an inter-chain data market, and DAO governance.

DataHighway 11 Dec 2, 2022
Selendra is a multichains interoperable nominated Proof-of-Stake network for developing and running Substrate-based and EVM compatible blockchain applications.

Selendra An interoperable nominated Proof-of-Stake network for developing and running Substrate-based and EVM compatible blockchain applications. Read

Selendra 16 Nov 29, 2022
Subsocial full node with Substrate/Polkadot pallets for decentralized communities: blogs, posts, comments, likes, reputation.

Subsocial Node by DappForce Subsocial is a set of Substrate pallets with web UI that allows anyone to launch their own decentralized censorship-resist

DappForce 74 Nov 24, 2022
Web-Scale Blockchain for fast, secure, scalable, decentralized apps and marketplaces.

Building 1. Install rustc, cargo and rustfmt. $ curl https://sh.rustup.rs -sSf | sh $ source $HOME/.cargo/env $ rustup component add rustfmt When buil

Solana Foundation 9.8k Jan 3, 2023
The Decentralized and Scaled Blockchain

Massa: The Decentralized and Scaled Blockchain Massa is a truly decentralized blockchain controlled by thousands of people. With the breakthrough mult

null 1.2k Dec 31, 2022
[Open Source] Blockchain Decentralized Lightweight VPN in Rust

[Open Source] Blockchain Decentralized Lightweight VPN in Rust DCVPN_Rust (Decentralized VPN in Rust) is an open-source initiative started by @anandgo

Anand Gokul 29 Jun 2, 2023
Substrate: The platform for blockchain innovators

Substrate ยท Substrate is a next-generation framework for blockchain innovation ?? . Trying it out Simply go to substrate.dev and follow the installati

Parity Technologies 7.7k Dec 30, 2022
An Ethereum compatible Substrate blockchain for bounties and governance for the Devcash community.

Substrate Node Template A fresh FRAME-based Substrate node, ready for hacking ?? Getting Started Follow the steps below to get started with the Node T

null 4 Mar 30, 2022
Substrate: The platform for blockchain innovators

Substrate ยท Substrate is a next-generation framework for blockchain innovation ?? . Trying it out Simply go to docs.substrate.io and follow the instal

Viktor Karazhov 1 Jan 8, 2022
A privacy-preserving blockchain on Substrate

Zerochain Zerochain is a generic privacy-protecting layer on top of Substrate. It provides some useful substrate modules and toolkit for protecting us

LayerX 256 Dec 26, 2022
X25519 elliptic curve Diffie-Hellman key exchange in pure-Rust, using curve25519-dalek.

x25519-dalek A pure-Rust implementation of x25519 elliptic curve Diffie-Hellman key exchange, with curve operations provided by curve25519-dalek. This

dalek cryptography 252 Dec 26, 2022
Implementation of Proof of Existence consensus using Substrate Framework, Frame, Pallets, RUST

Substrate Node Template A fresh FRAME-based Substrate node, ready for hacking ?? Getting Started Follow the steps below to get started with the Node T

Vijayendra Gaur 1 Jun 8, 2022