Skip to content

code-423n4/2021-10-tally

Repository files navigation

Tally Contest 🐕

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 Swap

Tally contest details


Useful links ⭐️

🐕 tally.cash — 🐦 @tallycash — 🤖 Discord

Quickstart

To build the contracts, run

yarn install
yarn build

Contract overview

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

Dependencies

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.

System overview

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages