Skip to content

Conversation

@Joeysantoro
Copy link
Contributor

@Joeysantoro Joeysantoro commented Jun 5, 2022

PR Type: Feature

PR Description: This proposal accomplishes two ETH PCV related actions.

  1. An LBP of 20000 ETH to DAI
  2. Tighten Eth PSM redemption fee from 75bps to 60bps

PR Checklist - Feature (Proposal)

  • All Tests Passing
  • Proposal Added to ProposalsConfig
  • Fork Block Correct
  • Remove Any .only's on Tests
  • Update Documentation If Needed
  • Update Roles Config
  • Proposal Submitted

@Joeysantoro Joeysantoro requested a review from a team as a code owner June 5, 2022 17:39
xklob
xklob previously approved these changes Jun 5, 2022
@xklob xklob self-requested a review June 5, 2022 22:20
Copy link
Contributor

@thomas-waite thomas-waite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, would clear up some of the comments

xklob
xklob previously approved these changes Jun 6, 2022
Copy link
Contributor

@xklob xklob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

{
target: 'pcvGuardianNew',
values: '0',
method: 'setSafeAddresses(address[])',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metacomment - there is a singular version of this function that is easier to call

Copy link
Contributor

@thomas-waite thomas-waite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Want to deploy and verify the contracts, then add to this PR before merging?

expect(ethGained).to.be.bignumber.at.most(ethers.constants.WeiPerEther.mul(6));

// Put in 10k DAI, got out ~5 WETH
// Implies price of $2000 per WETH
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

@Joeysantoro
Copy link
Contributor Author

Joeysantoro commented Jun 7, 2022

Contracts deployed and verified

Calldata:

0x8f2a0bb000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000002c000000000000000000000000000000000000000000000000000000000000000000d0c2b4e41c5fdf9375f2b1601caf0af18e81d6257ea3abb3b72a989fc3698da0000000000000000000000000000000000000000000000000000000000054600000000000000000000000000000000000000000000000000000000000000000700000000000000000000000002435948f84d7465fb71de45aba6098fc6ec299300000000000000000000000002435948f84d7465fb71de45aba6098fc6ec299300000000000000000000000002435948f84d7465fb71de45aba6098fc6ec2993000000000000000000000000f7991f4698ffb6716982aec7f78964dd731c4a54000000000000000000000000ff6f59333cfd8f4ebc14ad0a0e181a83e655d257000000000000000000000000ff6f59333cfd8f4ebc14ad0a0e181a83e655d25700000000000000000000000098e5f5706897074a4664dd3a32eb80242d6e694b00000000000000000000000000000000000000000000000000000000000000070000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000700000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000002600000000000000000000000000000000000000000000000000000000000000340000000000000000000000000000000000000000000000000000000000000038000000000000000000000000000000000000000000000000000000000000003e0000000000000000000000000000000000000000000000000000000000000044000000000000000000000000000000000000000000000000000000000000000648320357d00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000f7991f4698ffb6716982aec7f78964dd731c4a540000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a4fe68d76e0000000000000000000000005b86887e171bae0c2c826e87e34df8d558c079b9000000000000000000000000f7991f4698ffb6716982aec7f78964dd731c4a5400000000000000000000000000000000000000000000043c33c1937564800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a4fe68d76e000000000000000000000000e0f73b8d76d2ad33492f995af218b03564b8ce20000000000000000000000000f7991f4698ffb6716982aec7f78964dd731c4a54000000000000000000000000000000000000000000027b46536c66c8e3000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000048119c065000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024dea02892000000000000000000000000df9ff5c077d9f3427ade67ac2d27a864be6f3187000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024dea02892000000000000000000000000f24401f6992faeacbc5d6c6991db15b5f8364a1b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000245d841af5000000000000000000000000000000000000000000000000000000000000003c00000000000000000000000000000000000000000000000000000000

Execute Calldata:

0xe38335e500000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000002a000000000000000000000000000000000000000000000000000000000000000000d0c2b4e41c5fdf9375f2b1601caf0af18e81d6257ea3abb3b72a989fc3698da000000000000000000000000000000000000000000000000000000000000000700000000000000000000000002435948f84d7465fb71de45aba6098fc6ec299300000000000000000000000002435948f84d7465fb71de45aba6098fc6ec299300000000000000000000000002435948f84d7465fb71de45aba6098fc6ec2993000000000000000000000000f7991f4698ffb6716982aec7f78964dd731c4a54000000000000000000000000ff6f59333cfd8f4ebc14ad0a0e181a83e655d257000000000000000000000000ff6f59333cfd8f4ebc14ad0a0e181a83e655d25700000000000000000000000098e5f5706897074a4664dd3a32eb80242d6e694b00000000000000000000000000000000000000000000000000000000000000070000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000700000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000002600000000000000000000000000000000000000000000000000000000000000340000000000000000000000000000000000000000000000000000000000000038000000000000000000000000000000000000000000000000000000000000003e0000000000000000000000000000000000000000000000000000000000000044000000000000000000000000000000000000000000000000000000000000000648320357d00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000f7991f4698ffb6716982aec7f78964dd731c4a540000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a4fe68d76e0000000000000000000000005b86887e171bae0c2c826e87e34df8d558c079b9000000000000000000000000f7991f4698ffb6716982aec7f78964dd731c4a5400000000000000000000000000000000000000000000043c33c1937564800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a4fe68d76e000000000000000000000000e0f73b8d76d2ad33492f995af218b03564b8ce20000000000000000000000000f7991f4698ffb6716982aec7f78964dd731c4a54000000000000000000000000000000000000000000027b46536c66c8e3000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000048119c065000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024dea02892000000000000000000000000df9ff5c077d9f3427ade67ac2d27a864be6f3187000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024dea02892000000000000000000000000f24401f6992faeacbc5d6c6991db15b5f8364a1b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000245d841af5000000000000000000000000000000000000000000000000000000000000003c00000000000000000000000000000000000000000000000000000000

thomas-waite
thomas-waite previously approved these changes Jun 7, 2022
Copy link
Contributor

@thomas-waite thomas-waite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, minor comments

console.log('WETH gained: ', ethGained);

// Accelerate time and check ended
await time.increase(LBP_FREQUENCY);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also fast forwarded time, performed a second swap and validated that the amountOut increased - to check that the weights were decreasing as expected. No strong feelings, it's a bit paranoid

},
ethToDaiLBPPool: {
artifactName: 'IWeightedPool',
address: '0x34809aEDF93066b49F638562c42A9751eDb36DF5',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would recommend verifying this LBPPool contract and inspecting the variables. Neat trick to verify these LBP pools is to pull the source code of an already verified contract and then use the standard-json input verification method:

curl -s [https://api.etherscan.io/api\?module\=contract\&action\=getsourcecode\&address\=0x32F0DC9E2D890BAC95106a65eB82db70Bc58BaDB\&apikey\=AETHERSCANPIKEY](https://api.etherscan.io/api/?module\=contract\&action\=getsourcecode\&address\=0x32F0DC9E2D890BAC95106a65eB82db70Bc58BaDB\&apikey\=AETHERSCANPIKEY) | jq -r '.result[0].SourceCode' | sed 's/{{/{/' | sed 's/}}/}/' > sol.json

@Joeysantoro Joeysantoro merged commit 140f3d2 into develop Jun 7, 2022
@Joeysantoro Joeysantoro deleted the feat/ETHLBP branch June 7, 2022 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants