generated from AngleProtocol/boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add LUSD-3CRV + 3CRV + 2CRV staker (#37)
- Loading branch information
1 parent
048b819
commit e881cc7
Showing
104 changed files
with
6,104 additions
and
1,810 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
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
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
36 changes: 36 additions & 0 deletions
36
contracts/interfaces/external/curve/IMetaPool2WithReturn.sol
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,36 @@ | ||
// SPDX-License-Identifier: GPL-3.0 | ||
|
||
pragma solidity ^0.8.17; | ||
|
||
import "./IMetaPoolBase.sol"; | ||
|
||
uint256 constant N_COINS = 2; | ||
|
||
//solhint-disable | ||
interface IMetaPool2WithReturn is IMetaPoolBase { | ||
function remove_liquidity_one_coin( | ||
uint256 _burn_amount, | ||
int128 i, | ||
uint256 _min_received | ||
) external returns (uint256); | ||
|
||
function remove_liquidity(uint256 _burn_amount, uint256[N_COINS] memory _min_amounts) | ||
external | ||
returns (uint256[N_COINS] memory); | ||
|
||
function remove_liquidity( | ||
uint256 _burn_amount, | ||
uint256[N_COINS] memory _min_amounts, | ||
address _receiver | ||
) external returns (uint256[N_COINS] memory); | ||
|
||
function remove_liquidity_imbalance(uint256[N_COINS] memory _amounts, uint256 _max_burn_amount) | ||
external | ||
returns (uint256); | ||
|
||
function remove_liquidity_imbalance( | ||
uint256[N_COINS] memory _amounts, | ||
uint256 _max_burn_amount, | ||
address _receiver | ||
) external returns (uint256); | ||
} |
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
42 changes: 42 additions & 0 deletions
42
contracts/interfaces/external/curve/IMetaPool3WithReturn.sol
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,42 @@ | ||
// SPDX-License-Identifier: GPL-3.0 | ||
|
||
pragma solidity ^0.8.17; | ||
|
||
import "./IMetaPoolBase.sol"; | ||
|
||
uint256 constant N_COINS = 3; | ||
|
||
//solhint-disable | ||
interface IMetaPool3WithReturn is IMetaPoolBase { | ||
function remove_liquidity_one_coin( | ||
uint256 _burn_amount, | ||
int128 i, | ||
uint256 _min_received | ||
) external returns (uint256); | ||
|
||
function remove_liquidity(uint256 _burn_amount, uint256[N_COINS] memory _min_amounts) | ||
external | ||
returns (uint256[N_COINS] memory); | ||
|
||
function remove_liquidity( | ||
uint256 _burn_amount, | ||
uint256[N_COINS] memory _min_amounts, | ||
address _receiver | ||
) external returns (uint256[N_COINS] memory); | ||
|
||
function remove_liquidity_imbalance(uint256[N_COINS] memory _amounts, uint256 _max_burn_amount) | ||
external | ||
returns (uint256); | ||
|
||
function remove_liquidity_imbalance( | ||
uint256[N_COINS] memory _amounts, | ||
uint256 _max_burn_amount, | ||
address _receiver | ||
) external returns (uint256); | ||
|
||
function remove_liquidity_one_coin( | ||
uint256 _burn_amount, | ||
uint256 i, | ||
uint256 _min_received | ||
) external returns (uint256); | ||
} |
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
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// SPDX-License-Identifier: GPL-3.0 | ||
pragma solidity ^0.8.17; | ||
|
||
import "../swapper/LevSwapper/curve/implementations/mainnet/CurveLevSwapperFullLUSDv3CRV.sol"; | ||
|
||
/// @title MockCurveLevSwapper2TokensWithBP | ||
/// @author Angle Labs, Inc. | ||
/// @notice Implements a leverage swapper to gain/reduce exposure to the LUSD-3CRV Curve LP token | ||
contract MockCurveLevSwapper2TokensWithBP is CurveLevSwapperFullLUSDv3CRV { | ||
IBorrowStaker internal _angleStaker; | ||
|
||
constructor( | ||
ICoreBorrow _core, | ||
IUniswapV3Router _uniV3Router, | ||
address _oneInch, | ||
IAngleRouterSidechain _angleRouter, | ||
IBorrowStaker angleStaker_ | ||
) CurveLevSwapperFullLUSDv3CRV(_core, _uniV3Router, _oneInch, _angleRouter) { | ||
_angleStaker = angleStaker_; | ||
} | ||
|
||
/// @inheritdoc BaseLevSwapper | ||
function angleStaker() public view override returns (IBorrowStaker) { | ||
return _angleStaker; | ||
} | ||
|
||
function setAngleStaker(IBorrowStaker angleStaker_) public { | ||
_angleStaker = angleStaker_; | ||
} | ||
} |
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
Oops, something went wrong.