Gasless Ethereum account abstraction with Flashbots.
About
With Flashbots, users can send transactions directly to miners so their transactions may be included in a block without ever being seen in the mempool. Miners typically include your transaction in a block because they earn revenue from gas fees, but with flashbots you can include transactions with a gas price of zero, as long as you also include a transaction that pays the miner in ETH in some way.
This is commonly used to protect yourself from bots. For example, by making a large Uniswap trade or executing an arbitrage via Flashbots, bots cannot see your transaction and frontrun it.
Zeneth uses Flashbots for a different reasonโimproving UX.
A major UX problem in Ethereum is that most wallets are not contract wallets, but externally owned accounts (EOAs), such as MetaMask. With EOAs, you always need ETH for gas unless you happen to be interacting with a contract that supports meta-transactions. This can be problematic for user-facing applications as their new users need to acquire both ETH and often some token to user their application.
For example, you don't need ETH for transaction fees on zkSync's Layer 2 network, but if I'm a new user trying to get DAI into zkSync, I need to first find ETH, use that to pay for gas to enter zkSync, then never use that ETH again. This adds a lot of friction to user onboarding.
Zeneth fixes this. You can now bundle any sequence of transactions, send them for zero gas, and at the end use our "SwapBriber" contract which will swap some of your tokens for ETH to pay the miner. In the demo video you can see the following sequence of transactions:
- User signs a zero-gas price transaction approving the zkSync contract to spend their DAI
- User signs a zero-gas price transaction depositing their DAI into zkSync
- User signs a zero-gas price transaction approving the SwapBriber contract to spend their DAI
- User signs a zero-gas price transaction transferring tokens to the SwapBriber contract, which swaps those tokens for ETH and transfers the ETH to the miner
Then, all four of these transactions are sent as a bundle to the miner, who includes them in a block.
Status
Zeneth was built for the ETHGlobal hackathon. You can learn more by watching the hackathon submission video.
The project works on mainnet, but is not currently deployed for public use. Stay tuned to learn more about Zeneth's public launch.
Development
This project is a monorepo with three packages:
contracts
contains the smart contractszeneth-js
is a TypeScript library containing the core Zeneth logicfrontend
is a simple frontend app for interacting with Flashbots
Dependencies
To ensure that everyone is using the same version of nodejs on this project, volta is recommended!
Develop
yarn
yarn dev
Test
yarn test
Serve
yarn build
yarn start