-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Burn using 0xdead to enable taking reserves on L2s #1058
Conversation
… price against USDC
@@ -21,8 +24,5 @@ ETH_GAS=15000000 | |||
## Solidity Compiler Version ## | |||
SOLC_VERSION=0.8.18 | |||
|
|||
## AJNA token address for target chain ## | |||
AJNA_TOKEN=0xaadebCF61AA7Da0573b524DE57c67aDa797D46c5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This wasn't being used anywhere. Had it commented-out in my env file for many months.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -433,9 +435,7 @@ abstract contract Pool is Clone, ReentrancyGuard, Multicall, IPool { | |||
); | |||
|
|||
// burn required number of ajna tokens to take quote from reserves | |||
IERC20(_getArgAddress(AJNA_ADDRESS)).safeTransferFrom(msg.sender, address(this), ajnaRequired); | |||
|
|||
IERC20Token(_getArgAddress(AJNA_ADDRESS)).burn(ajnaRequired); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IERC20Token
import can be removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey kirill, do we need to concern about non-standard bridged token? or this can be note to deployer to run integration test before deploying it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since AJNA token is already circulating, it should be quite easy to test all success paths on a live L2 deployment with bridged quote, collateral and bwAJNA tokens
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ran on Base yesterday, and Arbitrum, Optimism, and Polygon PoS today. Renamed variables to be less Base-specific, even though token address is hardcoded in the test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
When taking reserve auctions, replace
burn
with a transfer to the 0xdead address.Purpose
Discovered the L2-bridged bwAJNA tokens did not have a standard
burn(uint256 amount)
method. Base/Optimism/Polygon have a two-param burn, Arbitrum doesn't have one at all. Sending to 0x0 is prohibited by wormhole and gnosis, so using 0xdead instead.Impact
Small decrease in gas cost is expected, since we're eliminating the call yet still transfer to another address, rather than transferring to pool before burning. Significant decrease in gas cost observed.
Pool contract size reduced by 103 bytes.
Unit test failure unreleated to these changes.
Tasks