-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade 3CRV Convex Meta Vault (#84)
* feat: Added afterRemoveVault hook and updateAssestsPerShare after vault is removed * feat: test for update assetsPerShare after removal of underlyingVault * Hardhat tasks to snap vault data (#72) * chore: small update to vault deposit and mint HH tasks * chore: removed links to missing FraxBP diagrams * feat: added convex-3crv-snap HH task chore: added assets in underlying vaults to convex-3crv-mv-snap HH task * chore: test to get data for a worked sandwich attack on a Convex 3Crv vault * chore: added collected fees to vault snaps * chore: added worked Curve Metapools example for article * Docs and fork tests (#73) * chore: added process diagram for chargePerformanceFee * chore: README updated * chore: fork test donation of USDT and DAI * chore: Added maxFee protection to liq-init-swap HH task chore: better reporting of rewards in liq-collect-rewards HH task * chore: add gas price to liq-init-swap HH task * chore: HH task liq-donate-tokens further parameterized * Fix to charge performance fee (#75) * chore: Updated HH task convex-3crv-snap * chore: added stored assets/share to convex-3crv-mv-snap HH task fix: logs in mv-charge-perf-fee HH task * fix: charge of performance fee needs to store assets per share with fee shares included * chore: updated PerfFeeAbstractVault version * chore: added docgen script using solidity-docgen * chore: Added HH task vault-max-withdraw * feat: Added HH task vault-slippage to measure deposit and redeem slippage * chore: README updated with docgen * chore: creates npm publish action (#78) * chore: creates npm publish action * chore: adds comments to npmrc * chore: updates github actions to do not run when draft * chore: updates github actions to do not run when draft * chore: updates publish config on web-config.ts * test: increase test coverage on Liquidator (#79) * test: increse test coverage on Liquidator * chore: simplified Curve library tests (#81) * fix: to Curve3CrvAbstractMetaVault reset allowance * test: increase test coverage on libraries * chore: added updateAssetPerShare and chargePerformanceFee to fork tests * chore: removed modules not used by metavaults * chore: increased coverage of Curve3CrvMetapoolCalculatorLibrary * chore: bumper version to 0.0.6 * hardhat deploy tasks have optional proxy flag (#85) * feat: added optional proxy flag to contract deployments so only the implementation can be deployed * chore: removed unused import in liquidator Hardhat tasks file Co-authored-by: Nick Addison <nick@addisonbrown.com.au> Co-authored-by: tushargargght <tushargargght@gmail.com> Co-authored-by: doncesarts <doncesarts@gmail.com>
- Loading branch information
1 parent
8ac027a
commit 02754fc
Showing
65 changed files
with
2,238 additions
and
1,052 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,39 @@ | ||
name: Publish | ||
on: | ||
release: | ||
types: [created] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 16 | ||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir) | ||
- uses: actions/cache@v3 | ||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- run: yarn install | ||
- run: yarn compile | ||
- run: yarn lint-ts | ||
|
||
publish-npm: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
registry-url: https://registry.npmjs.org/ | ||
- run: npm ci | ||
- run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.GH_NPM_TOKEN}} |
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 |
---|---|---|
|
@@ -4,7 +4,7 @@ on: | |
branches: | ||
- master | ||
- release-v* | ||
|
||
- main | ||
jobs: | ||
analyze: | ||
runs-on: ubuntu-latest | ||
|
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
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 |
---|---|---|
|
@@ -39,6 +39,8 @@ artifacts | |
# Typechain | ||
/types/generated | ||
|
||
docs/natspec | ||
|
||
# VS Code Solidity Extension | ||
bin/contracts | ||
|
||
|
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
@mstable:registry=https://npm.pkg.github.com | ||
# Github Package Registry | ||
# @mstable:registry=https://npm.pkg.github.com |
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
This file was deleted.
Oops, something went wrong.
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,51 @@ | ||
// SPDX-License-Identifier: AGPL-3.0-or-later | ||
pragma solidity 0.8.17; | ||
|
||
/** | ||
* @title Collects reward tokens from vaults, swaps them and donated the purchased token back to the vaults. | ||
* Supports asynchronous and synchronous swaps. | ||
* @author mStable | ||
* @dev VERSION: 1.0 | ||
* DATE: 2022-05-11 | ||
*/ | ||
interface ILiquidatorV2 { | ||
function collectRewards(address[] memory vaults) | ||
external | ||
returns ( | ||
address[][] memory rewardTokens, | ||
uint256[][] memory rewards, | ||
address[][] memory purchaseTokens | ||
); | ||
|
||
function initiateSwap( | ||
address rewardToken, | ||
address assetToken, | ||
bytes memory data | ||
) external returns (uint256 batch, uint256 rewards); | ||
|
||
function swap( | ||
address rewardToken, | ||
address assetToken, | ||
uint256 minAssets, | ||
bytes memory data | ||
) | ||
external | ||
returns ( | ||
uint256 batch, | ||
uint256 rewards, | ||
uint256 assets | ||
); | ||
|
||
function initiateSwaps( | ||
address[] memory rewardTokens, | ||
address[] memory assetTokens, | ||
bytes[] memory datas | ||
) external returns (uint256[] memory batchs, uint256[] memory rewards); | ||
|
||
function settleSwaps( | ||
address[] memory rewardTokens, | ||
address[] memory assetTokens, | ||
uint256[] memory assets, | ||
bytes[] memory datas | ||
) external returns (uint256[] memory batchs, uint256[] memory rewards); | ||
} |
Oops, something went wrong.