-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update OETH harvester CRV config (#1546)
* initial commit * add the other gov proposal and add a fork test * minor fix * lint * add migration data * add migrations * update oeth harvester CRV config to have 4000 max CRV per swap and caller gets 2% of proceeds
- Loading branch information
1 parent
75ff573
commit e3123f0
Showing
3 changed files
with
60 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
const { parseUnits, formatUnits } = require("ethers").utils; | ||
const { deploymentWithProposal, log } = require("../utils/deploy"); | ||
|
||
/* The 059 harvest change proposal has timed out. This just re-submits it. | ||
*/ | ||
module.exports = deploymentWithProposal( | ||
{ | ||
deployName: "063_oeth_harvest_crv_limit", | ||
forceDeploy: false, | ||
}, | ||
async ({ assetAddresses, ethers }) => { | ||
// Current contracts | ||
const cOETHHarvesterProxy = await ethers.getContract("OETHHarvesterProxy"); | ||
const cOETHHarvester = await ethers.getContractAt( | ||
"OETHHarvester", | ||
cOETHHarvesterProxy.address | ||
); | ||
|
||
const oldCrvTokenConfig = await cOETHHarvester.rewardTokenConfigs( | ||
assetAddresses.CRV | ||
); | ||
log( | ||
`Old CRV swap limit: ${formatUnits( | ||
oldCrvTokenConfig.liquidationLimit, | ||
18 | ||
)} CRV` | ||
); | ||
|
||
const crvSwapLimit = "4000"; | ||
const newCrvSwapLimit = parseUnits(crvSwapLimit, 18); | ||
log(`New CRV swap limit: ${crvSwapLimit} CRV`); | ||
|
||
// Governance Actions | ||
// ---------------- | ||
return { | ||
name: "Update OETH Harvester config for CRV", | ||
actions: [ | ||
// 1. Update CRV config with new 4k CRV limit | ||
{ | ||
contract: cOETHHarvester, | ||
signature: | ||
"setRewardTokenConfig(address,uint16,uint16,address,uint256,bool)", | ||
args: [ | ||
assetAddresses.CRV, | ||
oldCrvTokenConfig.allowedSlippageBps, | ||
200, // harvestRewardBps - increased from 1% to 2% | ||
oldCrvTokenConfig.uniswapV2CompatibleAddr, | ||
newCrvSwapLimit, | ||
oldCrvTokenConfig.doSwapRewardToken, | ||
], | ||
}, | ||
], | ||
}; | ||
} | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters