# tx-sitter
At [Worldcoin](https://worldcoin.org) we are looking to build an open-source transaction manager. Our motivation is to save fees compared to existing solutions, to run a high transaction volume while keeping our private keys private, and to contribute a useful project back to the ecosystem. If you are interested in being a potential collaborator or early user, we'd love if you reached out and gave us your feedback or potential feature recommendations.
- Existing [tx-sitter repo](https://github.com/worldcoin/tx-sitter)
- Link to tx-sitter [Telegram group](https://t.me/tx_sitter)
## Feature wish list (descending priority order)
- Provide **an API for sending and managing ethereum transactions** across a set of senders
- The API abstracts away details such as nonce management, transaction resubmission, and gas pricing.
- Multiple senders (relayers) with different credentials (separation between apps)
- Handle **transaction signing** and **key management** through [a variety of signers](https://github.com/gakonst/ethers-rs/issues/1), particularly including secure key storage in AWS KMS
- Provision a **reliable upstream connection**
- it’s resilient to connection failures, it reconnects with exponential backoff
- connects to multiple upstream JSON-RPC providers and monitors each for currency
- forwards received transactions to all upstreams
- Easier **reporting**
- Provides a single source of truth regarding all our blockchain interactions
- Our total gas spend is a single SQL query away!
- Centralizing our tx infrastructure enables **monitoring and alerting**
- tracks and reports the balance of each account it manages
- alters when market gas prices rise above threshold
- alerts when daily/hourly spend crosses soft limit
- alerts when account balance drops below threshold
- alerts when transactions are stuck for longer than threshold
- Provides **management api** and **spend policies**
- “panic button” which halts all spend, or all spend for specific services / senders.
- transactions can be approved/rejected based on configurable rules
- senders can be limited to specific whitelisted receivers
- accounts can be given hard spend limits
- stuck transactions can be manually escalated or replaced with no-op transactions
- Specify max gas price
- Specify different gas price models (normal, fast, …)
- Forwards **metatransactions**:
- properly signed transactions which match a set of policies are given an appropriate amount of gas and sent to the chain
- Advanced **sender management**:
- **virtual accounts**: transactions may be sharded across multiple sending accounts for better performance (by default the geth mempool only holds ≤64 txns from each sender)
- **flashbots escalation** for important stuck transactions
- **transaction priotity** and reordering, preventing priority inversions for services which might experience them
- Handles **multiple chains**:
- initially: just EVM chains
- ETH Mainnet and Testnets
- Polygon & other rollups
- Transaction status API
- The relayer should return on submission an txId (and maybe also the intermediate txHash, which might be subject to change)
- There should be an API endpoint that returns the tx status based on txId
- `'pending' | 'sent' | 'submitted' | 'inmempool' | 'mined' | 'confirmed' | 'failed'` (Open Zeppelin)
- Endpoint to list all tx since time delta (useful for syncing, e.g. for activity stream for wallet)
- TS / Rust sdk or wrapper around ethers
## Other Specs:
- Database schema: [https://github.com/worldcoin/tx-sitter/pull/6/files#diff-505bee61425c4ce3b06899c7f080d49dcb4f4963af2632860a98c13deafcd01b](https://github.com/worldcoin/tx-sitter/pull/6/files#diff-505bee61425c4ce3b06899c7f080d49dcb4f4963af2632860a98c13deafcd01b)
- gRPC API: [https://github.com/worldcoin/tx-sitter/pull/14](https://github.com/worldcoin/tx-sitter/pull/14)