Inspiration
As more blockchains are getting popularity, a lot of users are transferring their tokens between blockchains to use the specific dapps. As such, token creators are creating their own bridge between blockchains.
PakSwap was inspired by two products.
- From Uniswap it takes its restrictionless paradigm.
- OTC platforms to make average users to get into crypto.
What it does
The main principle of PakSwap is to allow average users to trade any token without any restriction, or without serious security challenges. It comes with three basic features of the PakSwap website
- Allow any token in a one EVM blockchain to be bridged in any other EVM based blockchains. Current bridges are putting restriction by approving the token transfer by the government or by a bridge creator.
- Swap token between EVM blockchains that are bridged in the blockchain.
- Decentralized swap of token to the fiat currency. Current p2p token buying platforms are based on ratings of traders. While PakSwap eliminates it, by using the Oracles.
How we built it
The core of the PakSwap are a PakChain, PakBot, Pak smartcontracts in EVM based smartcontracts and PakBridge (PAK) token. The PakChain is a decentralized blockchain application based on Cosmos SDK. It includes in every node Oracles that are connecting to EVM based tokens to verify and track the transactions. For first and second features. Oracles are also will be able to connect to Payment System API to verify the trading token <-> fiat.
Pak smartcontracts are deployed in the EVM blockchains. Users are able to use these smartcontracts to Swap tokens and for bridging tokens. These smartcontract addresses are tracked in PakChain application, to execute the code in another blockchain after verifying the data using the PakBot.
These are the steps for token swapping between blockchains and for a bridging tokens:
- User gets PakBridge (PAK) tokens from exchanges in EVM blockchains (Ethereum, BSC, etc).
- Then he calls the desired method of Pak smartcontracts in EVM blockchains (Ethereum, BSC, etc).
- The PakChain nodes are listening to the Smartcontracts through the /x/pakEvents smartcontracts.
- PakChain verifies the smartcontract event, that all validators got the right data.
- Then, PakChain creates a multisig signature by collecting signatures from every node. Nodes are generating it with /x/pakSig module. After creating a multisig transaction, the proposer sends the transaction to the PakBot.
- PakBot sends the transaction to the Pak smartcontracts in the target blockchain where user had send its tokens.
- In the next block, Validators again verifies new events and create multisig signatures for events. Besides that they verify the target blockchain where events where sent. And if the event wasn't set within the 2 hours, they are taking a fire price from proposer. And the proposer in the next round resubmits the transactions.
Challenges we ran into
The main challenge we run was to avoid using multiple accounts by users. As well as understanding how Cosmos works. Or how to use Cosmos for the deployment.
Accomplishments that we're proud of
Finally, after reading all cosmos product documentations, going through tutorials, video workshops, and reading source codes of the Cosmos, we could say that we are pretty confident in our knowledge, and now we finally understand how to build our Cosmos product. The rest is work of time.
What we learned
We learnt the bridges, and Cosmos Ecosystem. There would be a huge book to describe the technical stuff that we learnt. We also learnt a lot about the Economical part of the blockchain applications. As there are other cross-platform bridges such as Thorchain and Chainflip and so on.
What's next for PakSwap
During the hackhathon we mostly learnt the technical aspects of our service and established a new team for it. The team that didn't work together before. We accomplished the basic framework of PakChain and initial versions of Pak smartcontracts.
After the hackhathon our primary goal goes in following steps:
- Create the MVP of Token Registration and Token Swapping.
- Redesign in security of our MVP to make it production ready.
- Make a legal service by establishing a company.
- Add token A to be swapped to token B.
- Launch production.
- Make an agreement with Payment systems.
- Develop a p2p token to fiat service using the Payment systems API in a decentralized way.
Built With
- cosmos
- javascript
- solidity
- vue
Log in or sign up for Devpost to join the conversation.