project screenshot 1
project screenshot 2
project screenshot 3

Peer2Pirate

Peer 2 Peer, permissionless fiat <> crypto ramp for the polygon blockchain

Peer2Pirate

Created At

ETHMexico

Project Description

The idea is to exchenge "value" instead of tokens taking advantage of all the DeFi infra that's already been made, specially DEXs and DEX aggreagators.

The main output of this hack is a smartcontract that acts as an escrow between two parties. Suppose Alice has $100 worth of token A that she wants to exchange for fiat, then she would interact with our escrow contract which will swap token A for USDC, it would now have a balance of ~100 USDC (thus, preserving value) and a "selling" order is created that someone else has to take.

Now let's imagine Bob wants to buy $100 worth of token B, he could then interact with the escrow contract (through a website) and take the order Alice created. Both user's would get in touch with each other (via xmtp, for example) and agree on a payment method. When Bob executes the payment he need to modify the state of the escrow contract flagging it as payed, and then notify Alice that she must now verify she has recieved the funds. Once she get's the funds, she executes another function on the smartcontract that will swap it's balance of 100 USDC to the corresponding amount on token B and then it would transfer them to Bob's wallet.

With this process we could make a P2P market where there is no "coincidence of wants" at the token level, only at the "value" level.

How it's Made

The escrow contract is written in solidity and at the moment we are using 0x's smartcontracts and API to perform token swaps within the contract.

Frontend is all typescript using ethers, react and node.

We didn't have enough time to glue it all together but we would have used theGraph to query the data from the escrow contract and the "selling orders". We also would have used xmtp to make the users chat between each other.

background image mobile

Join the mailing list

Get the latest news and updates