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

WBPS. PRUSD #1275

Open
AndreyKortosov opened this issue Nov 18, 2024 · 0 comments
Open

WBPS. PRUSD #1275

AndreyKortosov opened this issue Nov 18, 2024 · 0 comments
Labels
feature Adding support for a new feature in the network WBPS

Comments

@AndreyKortosov
Copy link

AndreyKortosov commented Nov 18, 2024

Context

There is a new stablecoin in the SORA network, pegged to USD 1:1, and is backed by SORA user (investor) money.

The investor will transfer the amount of fiat to the strategic partner, and the presenter of the partner PR manager will mint the same amount in Stablecoin.

When the investor wants to return their money, an amount of PRUSD equal to the withdrawals of user money will be burned.

Acceptance criteria

  1. The investor wants to deposit stablecoins in the account. Make a request via front-end.
    1. The front-end sends the request to the SORA pallet. Inside the request:
      1. Type - deposit
      2. Amount of USD
      3. Payment reference
    2. The SORA pallet saves the request to the internal storage. The storage consists:
      1. id
      2. type (deposit, withdraw)
      3. investor account
      4. date
      5. amount
      6. payment reference (string, 100 characters)
      7. status (pending, approved, declined)
      8. details (string, 200 characters)
      9. manager
  2. The investor wants to withdraw stablecoins to the bank account. Make a request via front-end.
    1. The front-end sends the request to the SORA pallet. Inside the request:
      1. Type - withdraw
      2. Amount of USD
      3. Bank Details in crypto format
    2. The SORA pallet
      1. saves the request to the internal storage
      2. hold the amount of stablecoin on the investor's wallet
  3. The PR manager requests to see a list of requests.
    1. The front-end request to show the list of requests.
    2. The SORA pallet takes from the internal storage list of requests with a filter by the manager, order by date and statuses (pending on the top), and with pagination.
    3. The front-end shows the list of requests.
  4. The PR manager sees the deposit requests.
    1. If the PR manager finds the money on a bank account based payment reference, the request is accepted via the button accept.
      1. The front-end requests to the SORA pallet accept the request for depositing.
      2. The SORA pallet
        1. mint amount of PRUSD
        2. send to the investor account
        3. change status from pending -> approved
      3. The front-end shows the successful result.
    2. Otherwise, the request was declined.
      1. The front-end requests to the SORA pallet declined the request for depositing.
      2. The SORA pallet
        1. change status from pending -> declined
  5. The PR manager sees the withdrawal requests.
    1. If the PR manager agrees and sends USD to the attached bank accounts, the request is accepted via the button accept.
      1. The front-end asks payment reference of the withdrawal transaction.
      2. The front-end requests to the SORA pallet accept the request of withdrawal.
        1. The SORA pallet
          1. unhold the amount of stablecoin in the investor's wallet
          2. burn the amount of stablecoin
          3. change status from pending -> approved
    2. Otherwise, the PR manager declines the request via the button.
      1. The front-end requests to the SORA pallet declined the request for depositing.
        1. unhold the amount of stablecoin in the investor's wallet
        2. change status from pending -> declined
@AndreyKortosov AndreyKortosov moved this to Backlog in SORA Backend Nov 18, 2024
@AndreyKortosov AndreyKortosov added feature Adding support for a new feature in the network WBPS labels Nov 18, 2024
@wer1st wer1st moved this from Backlog to In Progress in SORA Backend Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Adding support for a new feature in the network WBPS
Projects
Status: In Progress
Development

No branches or pull requests

1 participant