← Back to home

TrueP2P

P2P swaps market based on onchain wire transfer confirmation

Screenshots

TrueP2P screenshot 1
TrueP2P screenshot 2
TrueP2P screenshot 3
TrueP2P screenshot 4
TrueP2P screenshot 5

Problem Statement

True P2PProblem:P2P crypto swaps require bank transfer confirmation. This leads to centralization, delays, and errors.example: swap DAI to USD on Bank of AmericaSolution:Protocol for P2P swaps based on onchain wire transfer confirmationHow it worksBob creates a deal to sell DAI.Alice accepts the deal and freezes Bob's DAI.Alice sends USD via Zelle.Alice creates onchain proof of her Zelle transfer.Alice uses this confirmation to close the deal and take Bob's DAI.Onchain proof for Bank (Zelle) transferThe confirmation works with Plaid and the LIT Protocol nodes.Alice connects Plaid and creates an API key with access to transaction history from the bank.Alice calls Programmable PKPs action on LIT Protocol with Plaid transactionId and API key (demo.js).Inside theLitAction, it executes the request on Plaid and verifies that the transaction actually exists in Alice's bank account. (litActionPlaidCheck.js)TheLitActionsigns the transaction information using the decentralizedsignEcdsa().Alice adds the signed transaction to the "vault" smart contract (plaid-transactions-storage.sol), and now everyone can verify that she actually made the transaction from her bank account.Step-by-step-swapBob creates a deal to sell DAI onp2p-market(createPaymentRequest(...))Alice accepts the deal and freezes Bob's DAI (confirmPayment(...))Alice sends USD via Zelle.Alice creates onchain proof of her Zelle transfer onplaid-transactions-storage(addTransaction(...))Alice uses this confirmation to close the deal and take Bob's DAI onp2p-market(reservePayment(...))Main components:p2p-market.sol- P2P Market smart contractplaid-transactions-storage.sol- onchain wire transactions storagelitActionPlaidCheck.js- LIT Action to verify Plaid requestsbos- FrontendDemo:Url:https://bos.gg/#/azbang.near/widget/peer2peerSourceBOS Component:https://bos.gg/#/azbang.near/widget/peer2peerLIT-Protocol action ipfsId:QmVcetXaAnDcHmpX6cWxsGKGSoid4buVK2PkXQEDmgh6wQLIT-Protocol PKPs:https://explorer.litprotocol.com/pkps/110216617645918104171481682055149393821345448971586480839222858944196209976493Goerli Plaid transactions endpoint:https://goerli.etherscan.io/address/0x00e42dc2248f37a28d39f790d49230e2ddd37b99Goerli P2P Market:https://goerli.etherscan.io/address/0xa3724030aA74016d1AE1e1B54bD79608F0E5866F

Solution

The project is written in js and solidity. BOS VM and widgets are used for frontend. Verification of bank transactions is done via LIT Protocol, data is received from Plaid.Solidity contracts are used for p2p market and transactions vaults, Metamask sdk and ethers are used to sign transactions and verify wire transfers.XMTP Protocol is used for a secure chat during P2P deal

Hackathon

ETHGlobal New York

2024

Prizes

  • 🏆

    🥇 Lit Protocol — Best use of PKPs

  • 🏆

    💰 Mantle — Best DeFi

  • 🏆

    🥇 XMTP — Best Use

  • 🏆

    🥇 NEAR — Best Frontend using BoS

  • 🏆

    🏆 Scroll — Best Use

  • 🏆

    🏊‍♂️ Scroll — Pool Prize

  • 🏆

    🏊‍♂️ Arbitrum — Pool Prize

Contributors