We hear about these crypto-loss and attacks very often. Cross-chain bridges and transactions are one of the most vulnerable aspect of cryptocurrency which needs to be patched in order to onboard larger audience bases. without fund security Web3 and cryptocurrency will merely be a trend forever and never actually reach it's full potential. Fund security and consistency is the most important aspect of cryptocurrency transactions specially cross-chain with number of loopholes.
One major loophole in cross-chain transactions is sending funds to a unknown address due to bug in copy paste address or other malware that mutates the wallet address before sending. This sends the funds to a un-retrievable address and it is lost forever. To solve this problem, Crosspay was born.
Why Crosspay is the best solution in the market?
Chainlink VRF - Everytime a user tries to send funds to a wallet, a verifiable random number is generated using the Chainlink Oracle Networks. It's being verified by more than 3 blocks and therefore considered very secure. The receiver needs to enter this uint256 to accept the payment. If the address is mutated in the path, the contract will not allow the user to enter the verification number and hence funds get locked and later redeemed by the sender.
2FA - Even if the rightful receiver accepts the payment using the verification number, the sender has the last call whether to still revoke or send the transaction. The sender verifies all for one last time and approves the trasaction to go through. In case, the sender sense some fraud or changes his mind he can revoke it even after verification and redeem his funds.
Time Locked - The receiver only gets 30 mins (can be edited later) to accept the incoming payment. If not, the funds are sent back to the sender.
The first challenged I faced was to implement the system to send multiple wallet addresses cross-chain. I was unable to comprehend how to do it and what payload should I use, but soon later Axelar documentation and tutorials gave me the idea and I was able to implement it successfully.
Syncronization between verifiable random number generation and transaction initialization. VRF takes few seconds even after the transaction gets through. In order to handle that I had to use setTimeouts in my program. It didnt't end there, it had few more errors and hurddles but at the end it all worked out for good.
Axelar Documentations and Tutorials helped me throughout this hackathon with valuable insights and actionable steps. There was a small gap in the GMP with tokens sections. I was able to resolve my problems from youtube tutorials by Axelar, but same mentions in the documentation can help in the future.
Discussion