Skip to navigation

P2P Crypto — overview

P2P Crypto is a stablecoin market between CorpX accounts. The advertiser publishes price and limits; whoever takes the ad opens an order. The buyer’s BRL stays held at CorpX until the crypto arrives, and both parties sign the order contract before the transfer. CorpX intermediates: it checks the transaction on the network, keeps the money and decides disputes.

The p2p_crypto feature starts disabled for every tenant. While it is off, every route under /v1/p2p and /v1/accounts/{accountId}/p2p answers 403 feature_disabled.

One book

The market is a single CorpX book. With the feature on, the tenant joins the whole book: its accounts’ ads show up for the accounts of every participating tenant, and its accounts take ads from any of them. There is no separate book per tenant, and no way to keep to your own ads only.

The rules are the same for everyone: pairs, levels and fee, deadlines and the contract are set by CorpX. A tenant can have its own per-order and per-day caps, which apply to its accounts (the lowest cap among CorpX’s and the two tenants of the order is the one that applies). The username is unique across the whole market.

In an order between tenants, the amount is held in the buyer’s account, in the buyer’s tenant, and goes by internal transfer to the seller, in the seller’s tenant. Each party gets the webhooks in its own tenant. The counterparty stays anonymous: no response or webhook says which tenant it belongs to.

Actors

ActorRole
BuyerPays in BRL and receives the crypto in their wallet.
SellerSends the crypto and receives the BRL.
AdvertiserWhoever published the ad. Can be the seller (sell ad) or the buyer (buy ad). Pays the intermediation fee.
CorpXHolds the amount, checks the transfer, pays the seller, charges the fee and decides disputes.
The networkTron, Ethereum or Polygon. It is where the crypto moves; CorpX only reads it.
EllipticRisk screening of wallets and transactions.
DracmaElectronic signature of the order contract.

How the money and the crypto move

The crypto never passes through CorpX: it goes straight from the seller’s wallet to the buyer’s. The BRL never leaves CorpX: it stays held in the buyer’s account and goes to the seller by internal transfer.

Glossary

TermWhat it is
AdA buy or sell offer with price, limits and stock.
OrderA trade opened on an ad. Its id is ord_….
HoldThe lock on the buyer’s amount. It appears in Balance holds with source.type: p2p_order.
txidThe transaction hash on the network, reported by the seller.
ReleaseThe buyer confirms receipt; the hold pays the seller.
DisputeWhen a party contests. CorpX decides to release to the seller or refund the buyer.
KYC intermediation feeThe CorpX fee, in basis points over the amount, set by the advertiser’s level.
ReceiptThe summary of the concluded trade, with the parties identified.

Scopes

ScopeGrants
p2p.readMarket, public profiles, and the account’s profile, wallets, ads and orders (read). read also reads.
p2p.walletsRegister, change the default and remove wallets.
p2p.adsProfile, advertiser request and ads.
p2p.tradeOpen, cancel, report txid, release and dispute orders. Issued by CorpX only.

Every order route is M2M only. Releasing goes through the cashout locks and the buyer’s transaction PIN. Opening goes through them only when the taker buys (sell ad): that is whose balance is held. Taking a buy ad means selling, nothing leaves that account, and it opens without a PIN.

Section map

Privacy

Until the trade concludes, each party sees only the other’s username and reputation, never its tenant. The counterparty’s name and document appear only on the receipt (GET .../receipt), after conclusion, with the document masked. In the statement, the counterparty of every order leg is ORDEM P2P CRIPTO.

Error codes are in the P2P Crypto section of Error Handling.