0

I want to create dex pallet(without using pallet-contracts) with functionality like uniswap with pools of liquidity, this dex gonna work with my multi-token-pallet. So now I'm thinking about how to propperly implement that. So for exmple every pool of liquidity will be some struct in double storrage map, in my multi-token-pallet tokens are associated with AccountId but how can I transfer them to dex pallet, does it have AccountId? Maybe I can create fake signed accounts to deal with multi-token-pallet? Can somone give some ideas how to implement that?

2

1 Answer 1

4

Adam Wierzbicki has created just this. It is based on Uniswap V1. You can find his pallet here: https://github.com/Wiezzel/substrate-dex.

The pallet is not production ready, but is very useful for learning.

Not the answer you're looking for? Browse other questions tagged or ask your own question.