Bayar pakai QIE · pay with QIE
The swap hides inside the join
joinWithQIE buys the exact seat price in QUSDC on QIEDEX and seats the member in the same call. A member holding only QIE never opens a swap screen.
swapETHForExactTokensWQIE/QUSDC pair
Commerce & Real World · QIE Mainnet Hackathon 3.0
Status: tested on a fork of QIE mainnet · mainnet deployment pending
Rina books the futsal court and shares one link; friends pay their seats in QUSDC, QIE's dollar stablecoin, or in QIE. The last seat pays the court owner in that same transaction. If the deadline passes first, everyone takes their QUSDC back.
No admin key · deadline refunds · forks QIE mainnet through the public RPC
Kuitansi patungan · group payment
Futsal Kamis Thursday futsal
Untuk pembayaran · pays
test.qie
0.25 QUSDCper seat · 0.75 QUSDC in total
3/3
Batas waktu · deadline all 3 seats were paid before it, so nobody needed a refund
✓ Paid in full: 0.75 QUSDC to test.qie, inside seat 3's transaction
test.qie is a real mainnet name. Source: evidence/local-flow-run.txt.Status
Mainnet deployment pending. The contract and app are built and tested against the real QUSDC, QIEDEX, Zone and Oracle contracts on a fork of QIE mainnet. This line reads the app's deployment list and changes when the contract is live.
QIE mainnet, read by this page just now
267,557
gas for the last seat on a mainnet fork: swap, seat and payout in one transaction
evidence/local-flow-run.txtLembar 01 · sheet 1: the last seat

The app after the last seat, in a browser run on a mainnet fork (evidence/e2e-local/, pool #2).
fork block 11883271 deploy Patungan gasUsed 3002560 createPoolByName (.qie resolve + title) gasUsed 177664 join (QUSDC, first seat) gasUsed 182829 joinWithQIE (middle seat) gasUsed 248372 joinWithQIE (last seat -> payee paid) gasUsed 267557 payee received 750000 QUSDC units in the last-seat tx (expect 750000) createPool (address payee) gasUsed 128973 cancel (before first join) gasUsed 32930 claimRefund (one member) gasUsed 95422 refundAll (2 members, 1 skipped) gasUsed 120539 pool 3 refundedCount 3 escrow QUSDC 500000 = totalHeld 500000 (pool 2's two seats) native QIE left in contract: 0
A separate run of script/local-flow.sh, lines from evidence/local-flow-run.txt: the payee (owner of test.qie) gains 0.75 QUSDC inside the last seat's own transaction, and no QIE is left behind in the contract.
Browser run on a mainnet fork · selected steps from evidence/e2e-local-run.txt
Lembar 02 · sheet 2: one link, two endings



Lembar 03 · sheet 3: how it works
Bayar pakai QIE · pay with QIE
joinWithQIE buys the exact seat price in QUSDC on QIEDEX and seats the member in the same call. A member holding only QIE never opens a swap screen.
swapETHForExactTokensWQIE/QUSDC pair
Lunas · paid in full
When the final seat is bought, the whole pool goes to the payee in that transaction. Nobody presses a release button.
QUSDC ·PoolPaid
Untuk pembayaran · pays
The payee can be a .qie name. It is resolved when the pool is created and stored, so a later change to the name cannot redirect the money.
domainOwnerByName
Batas harga · price guard
The QIE Oracle's price feed bounds what the swap may cost. It is a sanity bound, never the price paid.
QIE Oracle ·latestRoundData
Dikembalikan · refunded
Past the deadline, or after a cancel, each member claims their QUSDC, or anyone triggers refunds for everyone.
claimRefund · refundAll
Peta · the map
Member to escrow, escrow to the payee or back to the member. Patungan has no admin key and no withdraw function.
Tembusan · the carbon copy we keep
Mainnet transactions: none yet (see Status). Everything above ran on a fork or mocks.README · Honest limits
Distinct wallets are not distinct people. Any usage count we publish counts wallets.README · Honest limits
QUSDC has an issuer-controlled VAULT_ROLE; if the issuer burns escrowed QUSDC, the pool cannot make everyone whole.README · Honest limitsPertanyaan · questions
Not yet. Every write path ran on an anvil fork of QIE mainnet, so it executed against the real QUSDC, QIEDEX, Zone and Oracle contracts and their state. Deploying spends real QIE and is the next step; the status line above changes once the deployment is added to the app's deployment list.
Then nobody is paid. After the deadline each member can take their QUSDC back with claimRefund, and anyone can call refundAll to return everyone's at once (in batches for large pools). The organizer can also cancel early, which opens the same refunds. A seat paid in QIE comes back as QUSDC.
The organizer never holds it. QUSDC sits in the contract until the last seat, then goes to the payee fixed when the pool was created. Patungan has no admin key and no withdraw function. The one risk outside our code is QUSDC's issuer role, listed above.
Members who hold QIE can pay without a separate swap. joinWithQIE buys exactly the seat price and returns unused QIE in the same transaction. It reverts if the swap would cost more than the Oracle's fair value plus a guard set at deploy (1,500 bps in the fork runs; the contract caps it at 2,000).
.qie name do?The organizer types the payee as a name such as test.qie. Patungan resolves it through Zone's domainOwnerByName at creation and stores the address. If the name points somewhere else by the time the transaction is mined, creation reverts with PayeeChanged.
The demo path is not mocked: the browser runs and script/local-flow.sh use a mainnet fork. 47 of the 71 contract tests use mocks for speed and fuzzing. There are no real users yet; pools the builder creates will be labelled as builder wallets (the app already supports the label).