Skip to content

doiim/p2pix

Repository files navigation

home

A trustless p2p solution for exchanging FIAT to ERC20 tokens.

menus

In short.

The roadmap ideally would be accomplished through improvements to the PIX API, the smart contract receives and releases its funds based on a transaction proof that is generated every time a PIX payment's transaction receipt is validated.

p2pix_explorer

For example, in case you want to sell 100 USDC for the price of 500 BRL, you create an order that locks it into the contract. Once the user buying the USDC accepts the order it saves the buyer address into the contract and generates a transaction QR Code with the specified value (500 BRL) to the PIX key detailed on the smart contract. Then it allows the necessary transaction to be confirmed and finally sends the Id proof to the smart contract which in return releases the fund to the specified buyer address.

How does it work?

p2pix arquitetura   pitch Bacen   24_out

Sell cryptocurrencies by placing them in an escrow via smart-contracts and define the amount in BRL that will be paid through Pix.

Pix is a “Brazilian instant payment juggernaut ” that we’re using to develop a disintermediation p2p alternative into swapping fiat money for cryptocurrencies. Deal crypto by locking it into a smart-contract and set a price in BRL that will be paid through Pix.

"Person to person via Pix" The name should be self-defining: p2pix. Counterpart-risk-free peer network solution, really without intermediaries, that enables you to exchange fiat money for cryptocurrency. Sell Brazilian stablecoins (assets linked to national fiduciary currency) by placing them in an escrow account with resources locked and automatically released via smart-contracts, define the amount in BRL (Real) that will be paid via Pix. At its launch, the p2pix protocol will allow risk removal for users while creating a 'bridge' between fiat and crypto. In the future, it will be possible for a direct integration to be made between Real Digital and public blockchains.

p2pix_g

Step-by-step…

  1. Connect wallet (supported wallets: MetaMask or WalletConnect);
  2. Type amount in Reais (BRL);
  3. Request token (cryptocurrency) = BRZ or MBRL;
  4. Identify the seller (from the list of people);
  • scan QRcode (or add 'Pix key' manually);
  • paste identification code (API Pix / bank receipt);
  1. Receive in your wallet (important to know about self-custody).

Why this solution?

qrcode

LocalBitcoins used to be, and currently still is in certain places such as in Venezuela, one of the main crypto providers where a substantial amount of volume flows through the parallel economy and revitalizes gross output during downturns.

If there is a lack of crypto infrastructure in a country or it is constrained by government will, capital flow naturally is driven to informal p2p and OTC methods. These transactions are inherently less efficient as there is a lot of friction involved in exchanging cash in person, besides the risk involved in having the custody of physical assets there’s also a logistical overhead in operating the currencies which have been traded. Even if the activity is carried out online you still need a third party to escrow the transaction and be available to be called upon in the case of a dispute. So finality is inherently uncertain, especially time-wise.

gerenciar

This solution is built with the intention of being ported to other payments systems such as what is intended to be achieved with FEDnow, as well with other legacy systems which have the minimum infrastructure necessary to generate the proofs on a receipt. Potentially if CBDC are open to be used by the general public it becomes another venue where settlement of swaps can be done in a trustless manner, where the only centralization point is the currency issuer itself, therefore an inherent risk that can not be mitigated

The protocol requires the token seller to accept some public key as being responsible for signing valid transactions. Ideally, central banks should be providing the payer with a signed message attesting to the successful fiat transfer. This may come true in Brazil with new PIX APIs or in the design of CBDCs.

mobile

Currently what’s achievable with the current central bank infrastructure is to use Cartesi Rollups to effortlessly read and validate a signed JSON message inside the dApp. This format, which is not normally suited for smart contracts, can be handled efficiently by the Cartesi Virtual Machine. Accepting such formats is useful as trusted fiat authorities (central banks, financial institutions) may not provide confirmations in a format naturally suited for smart contracts.

Whitepaper [PT-BR]

https://docs.google.com/document/d/104hX6RFC9miXHWcHdygoxlNpXL3ct4X9DoX63ECyc8U/edit?usp=sharing

MVP data

––––––––––––––––

Solidity smart contract: https://mumbai.polygonscan.com/address/0x08Cd9879D69693E5162B3A3eD24DdAb9118d0f0D

Cartesi smart contracts:

Figma files:

FAQ: https://docs.google.com/document/d/1dgjZ0aYuW_tIeOX26aV6ZR-OYniJl8txZy4SgeIKUu0/edit?usp=sharing

Sandbox: https://p2pix-staging.vercel.app/

Pitches:

[PT-BR]

[EN-US]

Rootstock: Bitcoin Scaling Hackathon (July/2023) https://docs.google.com/presentation/d/1ns-rXz0Vc_LltUZCZop_atN60TUjlBIt_W3KSSQcDDY/edit?usp=sharing