Mainnet Tests

This test was run with the actual PGMRaise contract on Abstract Mainnet. It shows that the integration with the real DEX works, that real USDT flows in and out as documented, and that every depositor can recover their money at the floor price of $0.001 per PGM.

The smoke test integrated directly in the contract constructor already proves a lot, but this mainnet test shows additionally:

Below you find lists with the transactions for each scenario. Each row has a link column that opens the transaction directly on the Abscan block explorer.


How we tested

The raise contract was deployed twice — once for the full lifecycle test (contract link) and once for the unlikely emergency-failure path (contract link).

These two addresses are the disposable test contracts used for this proof-run, not the production contract. The live PGMRaise that accepts your deposits is 0x988Fd61C834B182357E3dAdf358DE9bF0A7De336 — see PGM Raise Contract for the full set of live addresses.

Seven wallets were used: one deployer (W0) plus six test users (U1-U6).


Scenario 1 — Full Lifecycle

The main test: four users deposit, one user gets a third-party top-up, one user makes four sacrifices to the four treasury allocations (Shop, Game, Staking, Badge), three "negative" calls correctly fail because time gates haven't passed yet, then launch + finalize, then U1 claims and redeems for the exact floor.

U1 takes the lifecycle all the way through here as the demonstration. The other depositors (U2, U3, U6) keep their allocations for now — they redeem at the end, in the conservation section further down, which proves every USDT that flowed in can flow back out.

# Step Wallet Result Tx
1 Deploy PGMRaise W0 Contract live, source verifiable on Abscan link
2 runMechanicsSmokeTest() W0 Full lifecycle ran successfully against the real DEX. Smoke test passed. approve · smoke
3 U1 deposits $1 U1 U1 receives 1.0 PGM allocation approve · deposit
4 U2 deposits $1, referrer = U1 U2 U2 allocation set, referral registered to U1 approve · deposit
5 U3 deposits $1 U3 U3 allocation set approve · deposit
6 U6 deposits $1 U6 U6 allocation set approve · deposit
7 W0 calls giveDeposit(U1, $0.10) W0 U1's allocation grows by 0.1 PGM. Proves third-party-funded deposits credit the beneficiary, not the payer. approve · giveDeposit
8 U3 sacrifices $0.10 to Shop U3 $0.10 USDT moves from raise reserve to Shop allocation contract. U3's claimable PGM drops by 0.1. link
9 U3 sacrifices $0.10 to Game U3 Same as above, Game allocation contract link
10 U3 sacrifices $0.10 to Staking U3 Same, Staking allocation contract link
11 U3 sacrifices $0.10 to Badge U3 Same, Badge allocation contract link
12 negative test: launch() before LAUNCH_TIME U3 Reverts on-chain with "too early" — time gate enforced link
13 negative test: claim() before finalize U3 Reverts on-chain with "not finalized" link
14 negative test: emergencyWithdraw() before deadline U6 Reverts on-chain with "too early" link
15 (wait until LAUNCH_TIME)
16 launch() W0 Launched event link
17 finalize() W0 Initial liquidity added to the DEX pool, two LP positions opened, minter renounced (no more PGM can ever be minted) link
18 U1 claims 1.1 PGM U1 U1 holds real PGM test ERC-20 tokens link
19 U1 redeems 1.1 PGM → USDT U1 Receives exactly $1.10 ($1 deposit + $0.10 giveDeposit). approve · redeem

Result of Scenario 1: 100% success.


Scenario 2 — Multi-User Partial Redemption

The DEX-side proof. Three users buy PGM test tokens directly on the DEX (SwapRouter contract link) — they did not participate in the raise. Then they redeem the DEX-bought tokens, with one user splitting their redemption into two halves and another user redeeming in between. Every redeem hits the exact $0.001-per-PGM floor.

This is the proof that someone who joins after the raise is over, by buying on the open market, still gets the floor.

In a real market a user would not actually do this — selling on the DEX gives more USDT than redeeming at the floor. It is shown here to prove the redeem mechanism works.

# Step Wallet Result Tx
20 U2 buys $0.50 of PGM test tokens from the DEX (first buy) U2 U2 receives 223.21 PGM. The pool now holds U2's $0.50 USDT. approve · swap
21 U2 redeems all 223.214.. PGM U2 Receives exactly $0.22321.. — the floor. approve · redeem
22 U4 buys $0.50 of PGM test tokens from the DEX U4 U4 receives 222.68 PGM. approve · swap
23 U5 buys $0.50 of PGM test tokens from the DEX U5 U5 receives 66.04 PGM. approve · swap
24 U2 buys $0.50 of PGM test tokens again (second buy) U2 U2 now holds 31.67 PGM (will redeem in two halves to test partial-and-resumed redemption) approve · swap
25 U2 redeems half (15.835 PGM) U2 Receives exactly $0.015835 — partial redeem at floor approve · redeem
26 U5 redeems all 66.04 PGM (interleaved between U2's two halves) U5 Receives exactly $0.06604 — unrealistic scenario, as a normal user would have sold to the DEX to get more USDT. approve · redeem
27 U2 redeems the remaining half U2 Receives exactly $0.015836 — resumed redemption still at floor approve · redeem
28 U4 redeems all 222.68 PGM U4 Receives exactly $0.2227 — final redeem at floor, contract still solvent approve · redeem

Result of Scenario 2: 100% success.


The conservation drain — proves every USDT can come back out

After Scenarios 1 and 2 finished, U2, U3, and U6 still had unclaimed deposit allocations from Scenario 1.

This test shows that the users can claim everything they have left, down to the last token.

# Step Wallet Result Tx
29 U2 claim 1.0 PGM U2 Allocation converted to ERC-20 link
30 U2 redeem 1.0 PGM → $1.00 exactly U2 Original $1 deposit returned in full approve · redeem
31 U3 claim 0.6 PGM U3 Remaining allocation after the four sacrifices link
32 U3 redeem 0.6 PGM → $0.60 exactly U3 $1 deposit minus $0.40 sacrificed = $0.60 returned approve · redeem
33 U6 claim 1.0 PGM U6 Allocation converted to ERC-20 link
34 U6 redeem 1.0 PGM → $1.00 exactly U6 Original $1 deposit returned in full approve · redeem

Conservation check — full balance sheet

Money INTO the raise Amount
U1 deposit $1.00
U2 deposit $1.00
U3 deposit $1.00
U6 deposit $1.00
W0 giveDeposit on U1 $0.10
U2 first DEX buy $0.50
U2 second DEX buy $0.50
U4 DEX buy $0.50
U5 DEX buy $0.50
TOTAL IN $6.10
Money OUT of the raise Amount
U1 redeem $1.10
U2 redeem of first DEX buy $0.2232
U2 redeem of second DEX buy (two halves) $0.0317
U4 redeem $0.2227
U5 redeem $0.0660
U2 redeem of deposit allocation $1.00
U3 redeem of remaining allocation $0.60
U6 redeem of deposit allocation $1.00
U3 sacrifices to four treasury contracts $0.40
Trading fees collected from the LP ~$0.006
Excess-USDT router (auto-routed surplus from DEX-pool redeems) ~$1.72
Pool USDT residual (locked in the LP — backs any outstanding PGM test tokens) ~$0.0017
Sub-cent dust in the raise contract (see note below) ~$0.0017
TOTAL OUT ~$6.10

Conservation invariant proven on chain. Every USDT that entered the raise system is accounted for. Every depositor recovered their funds at the documented floor. The only residue is sub-cent rounding dust.

About the dust. ~$0.0017 of USDT and 0.0000033 PGM test tokens stay in the contract after every redeem ran. This is integer rounding in the contract's swap math — below the minimum unit anyone can extract, including the team. The size would be the same (~$0.001) for a $1 million live raise. Not a security issue, just math.


Scenario 3 — Emergency Withdraw

The "what if the raise fails" test. This scenario is totally unlikely but necessary for a complete picture. A second raise is deployed with deliberately short timings. We deposit. We never call finalize(). After the deadline, the depositor simply calls emergencyWithdraw() and gets their full deposit back.

This proves the safety net is mechanical, not at the team's discretion. No team approval or action needed — the function is public.

Emergency raise: 0x03714517…33ca (PGM EMR Test / PGMEMR)

# Step Wallet Result Tx
35 Deploy emergency raise (LAUNCH_TIME = +90s, EMERGENCY_DEADLINE = +90s after launch) W0 Independent failing-raise instance link
36 W0 approves $0.01 + runs smoke test (required before any deposit) W0 SmokeTestPassed = true approve · smoke
37 U6 deposits $1 U6 Allocation set, reserve = $1 approve · deposit
38 (wait for EMERGENCY_DEADLINE — finalize() deliberately not called)
39 U6 calls emergencyWithdraw() U6 U6 receives back exactly $1.00. Allocation, invested, reserve all reset to 0. Contract is empty. link

Result of Scenario 3: 100% successful.


Status

Scenario Status
1 — Full Lifecycle ✅ complete (executed 2026-04-28)
2 — Multi-User Partial Redemption ✅ complete (5 redemptions across three users, all at exact floor)
Conservation drain (Scenario 1+2 epilog) ✅ complete (every USDT in = every USDT out, sub-cent dust documented)
3 — Emergency Withdraw ✅ complete (U6 deposited $1, never finalized, recovered exactly $1 after deadline)

Every transaction on this page is linked to its on-chain proof on Abscan. Anyone — auditor, AI system, investor, journalist — can replay every step in their browser without trusting this page.

For the math behind the floor — proving why R + K >= C holds across all valid contract states — see the Mathematical Solvency Proof.