*For the demo link, please send lesser than 0.1 solana (ideally 0.01) as we might not have many funds left in the test NEAR account *
💡 - Inspiration
- Converting crypto to NEAR is complex and takes too long which is becoming a challenge for existing crypto users to get on board.
- It's hard for Near users to receive funds from another network.
- Current decentralized solutions are not good enough. Extremely poor UX and requires users to have deep knowledge in crypto. Very high entry barrier.
- Exchanging fund in CEX is slow and a bad experience. It requires those who just want to try out Near Protocol for some simple actions to pay A LOT of effort. Many of them would just end up giving up.
❓- What it does
Portalz provides an extremely simple way for users to get Near from any other crypto within seconds. Low fee, hastle free
⭐ - How it works
User Flow
- Users select a network (Any blockchain, but for hackathon there's only Solana)
- Users insert their receiver network (Near or Aurora), the receiver account id and amount. Then click "pay"
- A transaction is initiated for the user to send the respective amount of selected crypto to our generated address.
- Users sign the transaction and receive the crypto in their near/aurora wallet.
- Whole process should be completed within a minute (very likely to be <20 seconds)
System Flow
- After user submitted the form (with a selected blockchain), we save the info in our DB and generate a new wallet address using BIP39 standard, and send then address back to frontend.
- We initiate a transaction and the user signs it.
- Once the transaction is approved, it sends a transaction hash to our server.
- Our server retrieve the info from blockchain and verify the transaction.
- If transaction is valid, we proceed with sending the fund we receive to our CEX (binance, coinbase huobi, kucoin or etc) account
- We invoke the CEX's api to make an order using user's requested amount and the selected crypto pair.
- Once order is fully filled, we compute the final exchange rate between the crypto pair.
- We send the received Near/Aurora amount to our Near/Aurora account.
- Without waiting for the withdrawal, we send out that amount to the user's account on Near/Aurora directly with our Near/Aurora wallet (So it eliminates the few minutes waiting process)
- The order is considered complete.
Funds Flow
- We will have A LOT of generated wallets that accept other cryptos. They will have 0 balance because all the funds will be send to our CEX immediately after we receive those.
- We will have a near/aurora wallet (or a few) that sends fund to users' wallet. We use this extra layer to make sure users receive fund quickly without waiting for the CEX withdrawal process. This wallet will also have a fix amount of near as once we received the users' crypto, we will convert them into Near and send it to our wallet. (after deducting a small fee)
- We have a CEX account that should have more and more funds as we charge small percentage of fee from each order
- The fee will be 0.3%~0.4% which is still cheaper/same from doing it cross chain bridge + swaps as users very likely need to route their cryptos a few times.
🔥 - Challenges we run into
There are some third-party dependencies in the project which we have to carefully try out to make sure it works.
🌠 - Accomplishments that we're proud of
The idea and ability to implement a working MVP. It feels good when you work on a product that a lot have mentioned they need and it feels better when they said they really appreciate it (We asked our friends during the Nearcon)
📑 - What we learned
A useful product takes a huge amount of time and effort to think & design, and it's always worth it.
🚩 - What's next for Portalz
Adding "Generate Link" and "webhook" feature allowing anyone to use and build on top of Portalz as a payment gateway.
Built With
- cloud
- react
- typescript
Log in or sign up for Devpost to join the conversation.