FeedProjects
Developers
Settings
๐ŸŽ‰ A new chapter begins: Boardroom has joined Agora
Learn more
protocol logo
Explore / Projects
Gearbox DAO

Proposals

Members

Information

Create Proposal

Gearbox DAO

ProposalsMembersInformation
Proposal
Back to Proposals
closedEnded 3 years ago ยท Snapshot (Offchain)

[GIP-38]: Updating Uniswap V2/V3 adapters to prevent paths through arbitrary tokens

By 0xb9b7...6CceeA

Overview

This GIP aims to improve the security of the protocol by disallowing arbitrary tokens in Uniswap V2/V3 paths and limiting the maximal path length to 3 hops.

Problem statement

Currently, UniswapV2Adapter and UniswapV3Adapter only check that the input and output tokens in a swap are allowed tokens, without performing any sanity checks on intermediate tokens.

This leads to an ability to set up an intermediary pool with custom tokens and use it to call untrusted code during a swap. Normally, this does not pose an issue, due to health checks being performed after any swap. However, in certain rare circumstances and with additional techniques there is a potential of bad debt being created.

Proposed changes

The UniswapV2/V3 adapters will be updated to new implementations:

  • UniswapV2Adapter
  • UniswapV3Adapter

The new adapters reference a common contract called UniswapPathChecker to determine whether a path passed during a swap is valid, which implies:

  • The intermediary tokens belong to a fixed list of allowed connector tokens stored in UniswapPathChecker;
  • The path length does not exceed 3 hops (at most 4 tokens are in the passed path array);

The proposed initial list of allowed connectors is [DAI, USDC, WETH, FRAX] These settings should allow all Router-generated paths and all practical use-cases in general, while prohibiting custom connectors (or known, but exotic, connectors, which can be used as a substitute to a custom token for the purpose of creating an attacker-controlled Uniswap pool).

Additional notes

This change is required to enable partial withdrawals in a safe way down the line.

Continue Reading
Connect Wallet to Add Note
0
Votes 490
VoterCast PowerVote & Rationale
0xBE35...16CDa2
26.329M

Yes, update the Uniswap adapters

0x81E8...Fd2c08
22.376M

Yes, update the Uniswap adapters

0xb9b7...6CceeA
21.907M

Yes, update the Uniswap adapters

0xdAb4...40a38D
19.432M

Yes, update the Uniswap adapters

0x76d2...6Cfb0D
14.746M

Yes, update the Uniswap adapters

SHOW MORE
VOTE POWER
0
Connect Wallet
Proposal Status
  • Wed December 21 2022, 03:47 pmVoting Period Starts
  • Sat December 24 2022, 03:47 pmEnd Voting Period
Current Results

1-Yes, update the Uniswap adapters

220.445M

99.73%

2-No, do not update adapters

597,867.155

0.27%
Quorum 221.043M/200M
DocumentationBrandingContact Us
Home
This Project is Currently Disabled

If you would like to enable it, please checkout below.

Boardroom Subscription

Sign up for an individual subscription (access all projects on the platform)

Subscribe
Enable Project

Enable the entire project for every user

Enable Project
Contact Us