Meet Tally, the community owned and operated Web3 wallet. In this contest, we're looking at Tally Swap, the 0x-based DEX aggregator embedded in the wallet.
- $28,500 worth of ETH award pot
- $1,500 worth of ETH gas optimization award pot
- Join C4 Discord to register
- Submit findings using the C4 form
- Read our guidelines for more details
- Starts October 20, 2021 00:00 UTC
- Ends October 22, 2021 23:59 UTC
🐕 tally.cash — 🐦 @tallycash — 🤖 Discord
To build the contracts, run
yarn install
yarn build
Contract Name | Lines of Code |
---|---|
Swap.sol |
263 |
Math.sol |
20 |
EmergencyGovernable.sol |
64 |
EmergencyPausable.sol |
26 |
MockZrxExchangeProxy.sol |
73 |
MockToken.sol |
9 |
Total | 455 |
The main contract is Swap.sol
, which executes quotes provided off-chain by the
0x API in the Tally wallet, taking swap fees for the
DAO. It relies on SafeMath.sol
, SafeERC20.sol
, and ReentrancyGuard.sol
from the OpenZeppelin contracts library.
The Tally wallet is an EOA wallet that runs as a browser extension. Though Tally isn't a "smart contract wallet", preferring to custody user funds outside smart contracts to save on gas, a number of features in the wallet require paired smart contracts. Tally Swap is one of those features.