Platform: Code4rena
Start Date: 20/10/2021
End Date: 22/10/2021
Period: 3 days
Status: Completed
Reporters: moneylegobatman, CloudEllie
Pot Size: $30,000 ETH
Participants: 15
Reporters: moneylegobatman, CloudEllie
Judge: 0xean
Id: 44
League: ETH
WatchPug | 1/15 | $15,827.11 | 6 | 2 | 1 | 2 | 1 | - | - | 0 |
harleythedog | 2/15 | $4,928.01 | 3 | 1 | 0 | 0 | 0 | - | - | 0 |
pants | 3/15 | $4,127.54 | 3 | 0 | 0 | 1 | 1 | - | - | 0 |
cmichel | 4/15 | $1,288.31 | 3 | 0 | 0 | 1 | 0 | - | - | 0 |
pauliax | 5/15 | $1,047.46 | 3 | 0 | 0 | 1 | 0 | - | - | 0 |
leastwood | 6/15 | $589.46 | 1 | 0 | 0 | 0 | 0 | - | 0 | 0 |
JMukesh | 7/15 | $461.32 | 2 | 0 | 0 | 1 | 0 | - | 0 | 0 |
elprofesor | 8/15 | $461.32 | 2 | 0 | 0 | 1 | 0 | - | 0 | 0 |
TomFrenchBlockchain | 9/15 | $439.24 | 2 | 0 | 0 | 0 | 0 | - | - | 0 |
0xngndev | 10/15 | $266.84 | 2 | 0 | 0 | 0 | 0 | - | - | 0 |
Auditor per page
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.
🐕 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.