Security reviews
This page lists the security reviews carried out on FlowPayra Lite’s on-chain components, the tooling that tests and analyses them, and the addresses of the shared contracts on each network. The structure and the security boundary are described in the security model.
Internal reviews
Section titled “Internal reviews”| Review | Date | Scope | Conclusion | Findings fixed |
|---|---|---|---|---|
| Contract self-review | 2026-10-18 | All sources in contracts/src |
No issue found that could lead to loss of funds or unauthorized transfers. 1 medium (compatibility and availability), 2 low and 10 informational items | 1 medium and 1 low fixed in the contracts, plus one hardening (R4); the other low is handled by the back end |
| Subscriptions self-review (contract and back end) | 2026-10-18 | The subscriptions contract and the subscription back end, keeper and checkout | Contract: 1 medium, 1 low. Back end: 2 medium and several low. A second pass (keeper, accounting, checkout) raised 17 items, one of them a high-severity functional issue in the back-end keeper | All fixed |
| Internal review round 1 | 2026-10-21 | All sources in contracts/src (EVM contracts) |
No issue found that could lead to loss of funds or unauthorized transfers; no high or medium findings. 4 low and 10 informational items | 3 low fixed by contract hardening on 2026-10-22; the fourth is a token listing requirement |
| Internal review round 2 | 2026-11-09 | All sources in contracts/src (including FlowPayFactoryTron) and all sources of the Solana program |
No new high, medium or low findings in the EVM and TRON contracts. 2 low findings in the Solana program; 1 design difference confirmed and left as is | Both low findings fixed |
| Internal review round 3 | 2026-11-16 | All sources in contracts/src, all sources of the Solana program, and the back-end paths its findings involve |
No new findings in the EVM and TRON contracts. Solana: 1 high (quotes not bound to the cluster) and 3 low; 4 informational items | The high and the 3 low findings fixed (program and back end); 3 informational items fixed, 1 (TRON) left unchanged for now |
Each review was a line-by-line manual review with reproduction tests written for its findings. Round 1 merged three independent reviews, and each of its findings was reproduced as a Foundry test.
Findings and their disposition
Section titled “Findings and their disposition”Contract self-review
Section titled “Contract self-review”| ID | Severity | Issue | Disposition |
|---|---|---|---|
| M-1 | Medium | Addresses with code were checked through ERC-1271 only, so EIP-7702 accounts signing with their own key were refused | Fixed: ECDSA recovery first, then ERC-1271 |
| L-1 | Low | After the last period of a subscription was missed, remainingCap still reported a chargeable amount |
Fixed |
| L-2 | Low | subscribeWithSig can be front-run with its funding data stripped |
Contract unchanged; handled by the back end |
| R4 (addition) | — | A split whose receiving address is the clone itself would lock that share in the clone permanently | Fixed: the contract refuses a payee equal to the clone itself |
Subscriptions self-review
Section titled “Subscriptions self-review”| ID | Severity | Issue | Disposition |
|---|---|---|---|
| S-M1 | Medium | Canceling off chain did not stop on-chain charges: charge is open to anyone and the merchant back end could not cancel on chain |
Fixed: cancelByMerchant added |
| S-L1 | Low | cancelWithSig recorded the relayer as the canceling party |
Fixed |
| B-M1, B-M2, B-L1 – B-L4 | Medium / low | Back-end issues: a cancel racing the subscribe transaction, plan edits affecting existing subscriptions, charges after cancel not alerted, and others | Fixed (the plan is snapshotted when a subscription is created; alerts added) |
| R-1 – R-17 | High – low | 17 items in the keeper, accounting and checkout from the second pass | Fixed |
Internal review round 1 (2026-10-21)
Section titled “Internal review round 1 (2026-10-21)”| ID | Severity | Issue | Disposition |
|---|---|---|---|
| L-1 | Low | The cancel functions had no re-entrancy protection: a cancel during a charge produced an event order that misled the back end | Fixed: re-entrancy lock on the three cancel functions; the Subscribed event moved before the funding call |
| L-2 | Low | chargeFirstNow did not guarantee that period 0 was charged: a subscribe transaction landing too late skipped it |
Fixed: terms with chargeFirstNow must land within period 0, otherwise they are refused |
| L-3 | Low | When the payer was also a payee, direct paths and paths through the clone behaved differently | Fixed: the contract refuses a payee equal to the payer |
| L-4 | Low | With a non-compliant EIP-3009 token (one that does not check to == msg.sender), a front-runner could push the payer’s funds into the clone and lock them |
Contract unchanged: treated as a token listing requirement. Since 2026-11-21 the capability probe at listing checks it, and a token that fails is not used through EIP-3009; the 10 EIP-3009 stablecoins re-probed on mainnet that day (USDC, USDG, USDT0 and PYUSD on Ethereum, Base, X Layer, Arc and others) all comply |
| I-1 – I-10 | Informational | Documentation corrections, optional hardening, back-end probes and additional tests | Recorded |
These contract changes altered the release bytecode, and the canonical factory address became 0xEA9846354f6325D6f4161c54b4944882f7f5c539.
Internal review round 2 (2026-11-09)
Section titled “Internal review round 2 (2026-11-09)”| ID | Severity | Where | Issue | Disposition |
|---|---|---|---|---|
| S-1 | Design difference | Solana | The quote signature does not include the payer, so any address holding a quote can pay or subscribe | Left as is: payer funds are unaffected; risk addresses are screened against the actual payer at booking |
| S-2 | Low | Solana | The receiving account was not required to be the associated token account (ATA): a caller of the permissionless charge could route a period into an auxiliary token account the payee does not watch |
Fixed: only the payee’s ATA is accepted |
| S-3 | Low | Solana | PaidOrder records and subscription accounts could not be closed, locking their rent permanently |
Fixed: close_paid_order and close_subscription added; the back end reclaims rent automatically |
| S-4 | Informational | Solana | A source comment about the program’s upgrade authority did not match the devnet deployment | Comment corrected |
| E-1 | Informational | EVM | A period can be charged at any moment within it, so charges for two adjacent periods can be close together | Recorded: consistent with “once per period” in the terms |
| Tooling | Informational | EVM | Slither: nothing at medium or above, 8 informational results. Aderyn: 0 high, 5 low (all code style) | Recorded |
Round 2 made no change to the EVM and TRON contract sources; the release bytecode and the factory address are unchanged. The program on Solana devnet was upgraded to the build with the fixes on 2026-11-09.
Internal review round 3 (2026-11-16)
Section titled “Internal review round 3 (2026-11-16)”| ID | Severity | Where | Issue | Disposition |
|---|---|---|---|---|
| H-1 | High | Solana | A SOL quote was not bound to its cluster: the official program has the same address on every cluster, so one quote signer key and salt gave the same merchant account on mainnet and devnet, a mainnet order’s SOL quote could be executed on devnet with free SOL, and devnet’s booking marked the mainnet order paid | Fixed: the merchant account has its cluster (genesis hash) as a seed and a field, quote digests include it, and creating a merchant account needs the quote signer’s signature; the back end derives the salt per cluster and does not book a payment on a chain where its order has no quote or whose network does not serve the order’s mode |
| L-1 | Low | Solana | The quote does not bind the payer, so whoever held a trial subscription quote could open it first from an empty account, take its address and block the customer | Fixed: the payer is a seed of the subscription address; another payer’s subscription with the same terms is canceled on chain by the back end, with an alert |
| L-2 | Low | Solana (back end) | A payee could close its token account after every payment and have the hot wallet pay its rent again and again | Fixed: the accounts the hot wallet funded are recorded; when one is missing again, sponsoring stops funding it (the payer pays) and the keeper’s charges fund it only a limited number of times |
| L-3 | Low | Solana (back end) | The keeper closed a payment record as soon as the paid quote expired, while a later quote of the same order could still be paid | Fixed: closed only once every quote of the order on that chain has expired |
| I-1 – I-4 | Informational | Solana, TRON | charge does not re-check the mint’s extensions; the Token-2022 extension screen is a deny list; a subscription whose periods were all missed stays Active; the return value of TRON mainnet USDT’s transfer |
The first three fixed: every charge re-checks the extensions; the extension screen is an allow list; the back end sends the merchant’s cancellation for a subscription that has ended but is still Active on chain. The TRON item is left unchanged for now: TRON uses the allowance path only, and the item is handled before any other path is enabled there |
Round 3 made no change to the EVM and TRON contract sources; the release bytecode and the factory address are unchanged. The Solana program build with these fixes was upgraded onto devnet on 2026-11-16; merchant accounts and subscriptions created on devnet before then must be created again.
Testing and analysis tooling
Section titled “Testing and analysis tooling”EVM contracts
Section titled “EVM contracts”| Tool | Coverage | How it runs |
|---|---|---|
| Foundry unit and adversarial tests | Every authorization path, token behaviours (mocks without return values, with fees, blocklists, rebasing, upgradeable and others) and failure branches; hostile merchants, front-runners, re-entrancy, cross-chain and cross-clone replay | forge test on every CI run |
| Foundry fuzz tests | Random amounts, numbers of splits and numbers of periods | As above |
| Foundry invariant tests | Clones hold no balance; payees receive exactly their splits; no order is paid twice; each period is charged at most once; cumulative charges stay within the terms; nothing is charged before the first period or after cancellation or completion; only authorized parties can cancel | As above |
| Foundry fork tests | Real tokens on Ethereum mainnet (USDC, USDT, DAI, Permit2) and Arbitrum One (USDT0) | In CI when the corresponding RPC endpoints are configured |
| Slither | Static analysis; fails on medium or above | CI |
| Aderyn | Static analysis; fails on any high finding | CI |
| Release bytecode check | The release bytecode committed to the repository must match a build from source | CI |
At the time of round 2, forge test reported 124 passing tests, with the two fork suites skipped when no RPC endpoint is configured. Accepted Slither findings are annotated in the source with the reason.
Solana program
Section titled “Solana program”The Solana program has a LiteSVM test suite (26 tests) covering merchant account creation (the quote signer must sign, one account per cluster), a quote of another cluster being refused, another payer’s early subscription no longer blocking the customer, split payments, missing, mismatched and tampered quote signatures, duplicate payments, the Token-2022 extension allow list (checked again at every charge), subscription charge windows and caps, cancellation by each party, a replaced or revoked delegate, payment into ATAs only, and rent recovery. The suite is run with the commands in solana/README.md in the repository.
Shared contract deployments
Section titled “Shared contract deployments”Shared contracts are deployed by FlowPayra once per network and used by every merchant. Merchant contracts (EVM / TRON clones, the Solana merchant account) are created by each merchant. The shared contracts are deployed on these networks:
| Network | Shared contract | Address |
|---|---|---|
| Ethereum, BNB Smart Chain, Base, X Layer, Arc, Robinhood Chain (mainnets) | FlowPayFactory (the EVM factory, with its two implementations) |
0xEA9846354f6325D6f4161c54b4944882f7f5c539 |
| Sepolia, Arc testnet | FlowPayFactory (the EVM factory, with its two implementations) |
0xEA9846354f6325D6f4161c54b4944882f7f5c539 |
| TRON Nile | FlowPayFactoryTron |
TZ4h1akv6MTKMjuYy52z9oJdpT3J6eogj6 |
| Solana devnet | The flowpay program |
3ygRG5JMN1U3EcEFPtmAkHc32Mwg9vNeUB3Q8tYKMAcd |
The EVM factory is deployed through the CREATE2 deployment proxy and has the same address on every chain that uses the canonical deployment path. Deploying the factory creates the two implementations, which also have the same addresses on every chain:
| Contract | Address |
|---|---|
FlowPayFactory |
0xEA9846354f6325D6f4161c54b4944882f7f5c539 |
FlowPayRouterImpl |
0x189689F9D88b76eecA4461575dAb31A9EdE92c3a |
FlowPaySubscriptionsImpl |
0x431637A43aB755181c0Ca82eF36A7b9D54d62D8f |
- The shared contracts on the six EVM mainnets were deployed on 2026-11-21, those on Sepolia and the Arc testnet on 2026-10-24. The sources of all three contracts are verified on Sourcify on each of these networks.
- The TRON Nile factory was deployed on 2026-10-25, and its source is verified on Sourcify.
- The Solana devnet program was deployed on 2026-10-26 and upgraded on 2026-11-09 and 2026-11-16. The sha256 of the program code is
8fb15193a5748f2b9f2fbc39865804aa066328af7d9a7a1e0c6b42993b44ddfd, the build after round 3.
Release bytecode
Section titled “Release bytecode”The addresses of the EVM contracts are determined by the release bytecode: any change to the contracts changes it, and with it the addresses of the factory, the implementations and the merchant contracts. The keccak256 hashes of the init code can be used to check it:
| File | keccak256(init code) |
|---|---|
FlowPayFactory.initcode.hex |
0x1064f8c8197753790f8cae318b2246380e62718a63d07c6f160acf81801506ad |
FlowPayRouterImpl.initcode.hex |
0x749f13f91b75c0296b6a1e4cdfe5e39d73e20f830de8534bb3cb55e65cb40579 |
FlowPaySubscriptionsImpl.initcode.hex |
0xda68b6cd190170d22e79c8aae9099c0880e8c86ef5157cf82400ba02ad0d1806 |
FlowPayFactoryTron.initcode.hex |
0x457061a0017d63ecb949d55e81e98aa18afa85b55211f6a41925856199ee15ed |
The build settings are fixed at solc 0.8.28, evm_version = paris, 10000 optimizer runs and no CBOR metadata, so builds are reproducible.
Review reports
Section titled “Review reports”The full reports are in the repository’s docs/ directory: CONTRACT-REVIEW.md, SUBSCRIPTIONS-REVIEW.md, AUDIT-ROUND1.md, AUDIT-ROUND2.md and AUDIT-ROUND3.md.