Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Kickstart] Portales debut on Moonriver Grant Hackathon #1

Open
26 of 31 tasks
tnkerer opened this issue May 11, 2022 · 0 comments
Open
26 of 31 tasks

[Kickstart] Portales debut on Moonriver Grant Hackathon #1

tnkerer opened this issue May 11, 2022 · 0 comments
Assignees
Labels
documentation Improvements or additions to documentation task A small task in the scope of a bigger project

Comments

@tnkerer
Copy link
Collaborator

tnkerer commented May 11, 2022


Portales Logo

What is Portales?

Portales is a Cross-Bridge solution for fast wrapping assets. Portales' long-term goal is to make off-chain event listeners (Oyentes) decentralized by incentivizing node maintainers with PORT tokens.

How does Portales work?

Portales Front

A user wants to bridge assets between two chains. By interacting with Portales Front-End DAPP, it is possible to send a request using a Crypto Wallet (i.e., Metamask) to the Portales Smart Contract requesting a cross-chain swap to initiate. Upon receiving the request from the user, a transaction is sent to the blockchain resulting in a SwapStarted event.

Portales Front

A listener instance called Oyente leverage Ethers.js ability to filter EVM events to monitor all SwapStarted events originating from a Portales Smart Contract and handle these as user requests for a cross-chain swap. Oyente is responsible for calling a fillSwapRequest() function on the target chain. There are four possible states for a transaction once Oyente catches a new SwapStarted event:

  • Initiated: Oyente received a new SwapStarted event and just started processing it
  • Error: Oyente was unable to process the request, or the target chain reverted the transaction
  • Processed: Oyente has sent a transaction to the target chain, but confirmation is still pending
  • Finalized: The swap transaction is confirmed on the target chain

Oyente is also responsible for populating a database with the following data:

  • Oyente Event ID
  • Sender Address
  • Receiver Address
  • Origin Chain ID
  • Target Chain ID
  • Tx Hash
  • Tx Status
  • Transfer Amount

Our authorial API will make this data available for the front-end so the end-user can follow the transaction status live on the web app.

In the Scope of the Moonriver Grant Hackathon, what is the definition of done?

Relevant links:

Moonriver Grant Hackathon

What Are Blockchain Bridges?

Filtering EVM Events using Ethers.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation task A small task in the scope of a bigger project
Projects
Status: 🚀 In Progress
Development

No branches or pull requests

4 participants