Skip to content

Commit

Permalink
IPF: integration interfaces, constants
Browse files Browse the repository at this point in the history
  • Loading branch information
a17 committed Nov 14, 2024
1 parent 6a07076 commit d94f09a
Show file tree
Hide file tree
Showing 7 changed files with 79 additions and 13 deletions.
22 changes: 21 additions & 1 deletion chains/RealLib.sol
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,29 @@ library RealLib {
// 21.10.2024: TVL $78.34K, APR 0%
address public constant POOL_PEARL_SACRA_reETH_10000 = 0x2EC05Ab55867719f433d8ab0a446C48003B3BE8F;

// ALMs
// *** ALMs ***
// Trident
// We extract ALM, Gauge and BoxManager addresses from this factory
address public constant TRIDENT_LIQUID_BOX_FACTORY = 0xEfeFFa36b9FA787b500b2d18a3829271526023b1;

// Ichi
address public constant ICHI_VAULT_DEPOSIT_GUARD = 0x89FFdaa18b296d9F0CF02fBD88e5c633FEFA5f34;
// IchiVaultFactory 0x860F3881aCBbF05D48a324C5b8ca9004D31A146C allVautls(index) 0-9
address public constant IV_PEARL_USTB_PEARL_10000 = 0x2ea611fF2Db242Efb65A548e2B2DF6B5d2a02191;
address public constant IV_PEARL_WREETH_RWA_3000 = 0xC77531EAEe4b0eCa6B4626197277E12CE29bA672;
address public constant IV_PEARL_UKRE_arcUSD_500 = 0x863ca0dED740e8c2111b9e616Fe672278Ba707c6;
address public constant IV_PEARL_CVR_PEARL_500 = 0x7F23e2822470EFA9a642f12916AD89549a28A7C7;
address public constant IV_PEARL_USTB_MORE_100 = 0x7DA0e0187Ee2fB1B979398787179FF202769a0B6;
address public constant IV_PEARL_USDC_PEARL_10000 = 0x04BBef2aa336ff7736eb0994D22170261937A7bF;
address public constant IV_PEARL_arcUSD_UKRE_500 = 0xE68Ab89E2E734A3e2A954823BE3bf6361148c0a0;
address public constant IV_PEARL_PEARL_CVR_500 = 0x378A179B3E8c558d8c69dfe2B0b220F0F9BfD01d;
address public constant IV_PEARL_USDC_MORE_100 = 0x6c357a3E7f92cB048Dc9FB6AB73273efab09feE0;
address public constant IV_PEARL_RWA_WREETH_3000 = 0x797bb030438a0BC2F042dCcdf2598eD62F7348Cb;
// ************

// Pearl
address public constant MULTI_FEE_DISTRIBUTION_FACTORY = 0xb42D5956cDe4386B65C087CfCD16910aB6114F15;

// Oracles
address public constant ORACLE_DIA_WREETH_USDC = 0xA2c62937987815A9Bb9d3b2F4580e629F9FA3Bc8;

Expand Down
2 changes: 1 addition & 1 deletion src/integrations/pearl/IGaugeV2CL.sol
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ interface IGaugeV2CL {
///@notice User harvest function
function collectReward() external;

function periodFinish() external view returns(uint);
function periodFinish() external view returns (uint);

/**
* @notice Notifies the contract of a reward amount.
Expand Down
16 changes: 5 additions & 11 deletions src/integrations/pearl/ILiquidBox.sol
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,10 @@ interface ILiquidBox {
* other words, how much of each token the vault would hold if it withdrew
* all its liquidity from Uniswap.
*/
function getTotalAmounts() external view returns (
uint total0,
uint total1,
uint pool0,
uint pool1,
uint128 liquidity
);
function getTotalAmounts()
external
view
returns (uint total0, uint total1, uint pool0, uint pool1, uint128 liquidity);

/**
* @dev Returns the amount of tokens in existence.
Expand All @@ -64,8 +61,5 @@ interface ILiquidBox {

function gauge() external view returns (address);

function getRequiredAmountsForInput(
uint amount0,
uint amount1
) external view returns (uint, uint);
function getRequiredAmountsForInput(uint amount0, uint amount1) external view returns (uint, uint);
}
42 changes: 42 additions & 0 deletions src/integrations/pearl/IMultiFeeDistribution.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;

interface IMultiFeeDistribution {
/**
* @notice Total balance of an account, including unlocked, locked and earned tokens.
* @param user address.
*/
function totalBalance(address user) external view returns (uint);

/**
* @notice Address and claimable amount of all reward tokens for the given account.
* @param account for rewards
* @return rewardsData array of rewards
* @dev this estimation doesn't include rewards that are yet to be collected from the ICHIVault via collectRewards
*/
function claimableRewards(address account) external view returns (address[] memory, uint[] memory);

/**
* @notice Stake tokens to receive rewards.
* @dev Locked tokens cannot be withdrawn for defaultLockDuration and are eligible to receive rewards.
* @param amount to stake.
* @param onBehalfOf address for staking.
*/
function stake(uint amount, address onBehalfOf) external;

function unstake(uint amount) external;

/**
* @notice Claim all pending staking rewards.
* @param _rewardTokens array of reward tokens
*/
function getReward(
address _onBehalfOf,
address[] memory _rewardTokens
) external returns (uint[] memory claimableAmounts);

/**
* @notice Claim all pending staking rewards.
*/
function getAllRewards() external returns (uint[] memory claimableAmounts);
}
6 changes: 6 additions & 0 deletions src/integrations/pearl/IMultiFeeDistributionFactory.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;

interface IMultiFeeDistributionFactory {
function vaultToStaker(address ichiVault) external view returns (address staker);
}
3 changes: 3 additions & 0 deletions src/strategies/libs/StrategyDeveloperLib.sol
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ library StrategyDeveloperLib {
if (CommonLib.eq(strategyId, StrategyIdLib.TRIDENT_PEARL_FARM)) {
return 0x88888887C3ebD4a33E34a15Db4254C74C75E5D4A;
}
if (CommonLib.eq(strategyId, StrategyIdLib.ICHI_PEARL_FARM)) {
return 0x88888887C3ebD4a33E34a15Db4254C74C75E5D4A;

Check warning on line 48 in src/strategies/libs/StrategyDeveloperLib.sol

View check run for this annotation

Codecov / codecov/patch

src/strategies/libs/StrategyDeveloperLib.sol#L48

Added line #L48 was not covered by tests
}
return address(0);
}
}
1 change: 1 addition & 0 deletions src/strategies/libs/StrategyIdLib.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ library StrategyIdLib {
string internal constant CURVE_CONVEX_FARM = "Curve Convex Farm";
string internal constant YEARN = "Yearn";
string internal constant TRIDENT_PEARL_FARM = "Trident Pearl Farm";
string internal constant ICHI_PEARL_FARM = "Ichi Pearl Farm";
}

0 comments on commit d94f09a

Please sign in to comment.