Restricted Router Withdrawals #750
Replies: 5 comments 4 replies
-
I think its a little bit better to have both functions. The reason I thought both functions is to confirm the recipient once more by calling |
Beta Was this translation helpful? Give feedback.
-
The goal of restricting router recipient is to give router operators better fund security by separating the risk management of the router's signer key from the custody of the funds themselves. This means we need to make sure that routers can:
|
Beta Was this translation helpful? Give feedback.
-
Updated to reflect above discussions |
Beta Was this translation helpful? Give feedback.
-
Tracking in #820 |
Beta Was this translation helpful? Give feedback.
-
Done! Archiving |
Beta Was this translation helpful? Give feedback.
-
Summary
The current contracts allow a compromised router to drain their onchain liquidity to any arbitrary address. Instead, provide a feature where routers can optionally set their recipient address. If this is not set, routers are able to withdraw liquidity to anywhere.
Motivation
If a routers signing key is compromised, the attacker could drain the liquidity stored on the contract and send it to any specified address. This effectively means the key is in control of all unused liquidity on chain, which prevents router operators from adding large amounts of liquidity directly to the contract. Routers should be able to delegate the safe withdrawal address of any unused liquidity, creating a separation of concerns between router key and liquidity safety.
Proposed Solution
The contract should expose the following interface and mappings:
It is important to allow the role of an
owner
to be burned when a router is in operation and impose no restrictions on therecipient
(who may not have arbitrary code execution abilities)Test Cases
The following cases should be implemented:
Outstanding Questions
proposeRenunciation
vsacceptRenunciation
but the ideas are the sameTasks / PRs
Beta Was this translation helpful? Give feedback.
All reactions