Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IGP-83 #94

Merged
merged 30 commits into from
Feb 7, 2025
Merged
Changes from 3 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
144eb7a
initiate IGP-82 with action1
xma8lu Feb 1, 2025
5e976a6
Add new actions till action 6
xma8lu Feb 3, 2025
9f0648f
update and shift to igp-83
xma8lu Feb 3, 2025
5dbd4aa
change name of payload and folder
xma8lu Feb 4, 2025
9633761
add action6,7
xma8lu Feb 4, 2025
a623c4e
add action8, set skippable, add delayTime
xma8lu Feb 5, 2025
670f4b8
minor
xma8lu Feb 5, 2025
e3507b8
Merge branch 'IGP-82' into igp-83
thrilok209 Feb 5, 2025
e0f575a
resolve all comments
xma8lu Feb 5, 2025
68b16a4
refactoring
thrilok209 Feb 5, 2025
1242a8a
Merge branch 'main' into igp-83
thrilok209 Feb 5, 2025
99ce201
Merge branch 'igp-83' into igp-83-1
thrilok209 Feb 5, 2025
7038454
Merge pull request #96 from Instadapp/igp-83-1
thrilok209 Feb 5, 2025
5490691
Fixes
thrilok209 Feb 5, 2025
57651d2
minor update
thrilok209 Feb 5, 2025
60c2e5b
Refactoring
thrilok209 Feb 5, 2025
22e588f
added USD0, fxUSD, BOLD address
thrilok209 Feb 5, 2025
2a39418
restructure
thrilok209 Feb 5, 2025
34cd030
increasing base limits to $10M on shorting vaults
KaymasJain Feb 5, 2025
9048d4e
decreased borrow cap $20M on ezETH T1 vault
KaymasJain Feb 5, 2025
131f50d
increase rebalancing threshold time on BTC DEX
KaymasJain Feb 5, 2025
523cb42
Update range shifting from 1 day to 5 days in BTC DEX
KaymasJain Feb 5, 2025
7698a40
USDC-USDT limits adjustment
KaymasJain Feb 5, 2025
a12074a
fixes
thrilok209 Feb 5, 2025
4922027
update
thrilok209 Feb 5, 2025
738d6f9
update cbbtc-wbtc max supply and borrow shares
thrilok209 Feb 5, 2025
42bcb98
fixes
thrilok209 Feb 5, 2025
5e8a4fc
update rewards
thrilok209 Feb 5, 2025
2d2f802
update
thrilok209 Feb 5, 2025
144b3b7
update
thrilok209 Feb 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 58 additions & 19 deletions contracts/payloads/IGP83/PayloadIGP83.sol
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ contract PayloadIGP83 is PayloadIGPMain {

// Action 8: Set dust limits for USD0-USDC, fxUSD-USDC, USDC-BOLD DEX
action8();

// Action 9: Discontinue fGHO rewards
action9();
}

function verifyProposal() public view override {}
Expand All @@ -81,8 +84,8 @@ contract PayloadIGP83 is PayloadIGPMain {
memory config_ = new IFluidAdminDex.UserSupplyConfig[](1);
config_[0] = IFluidAdminDex.UserSupplyConfig({
user: sUSDe_USDT__USDT_VAULT,
expandPercent: 25 * 1e2, // 25%
expandDuration: 12 hours, // 12 hours
expandPercent: 35 * 1e2, // 35%
expandDuration: 6 hours, // 6 hours
baseWithdrawalLimit: 10_000_000 * 1e18 // 10M shares
});

Expand Down Expand Up @@ -111,7 +114,7 @@ contract PayloadIGP83 is PayloadIGPMain {

protocols[0] = F_USDC_ADDRESS;
tokens[0] = USDC_ADDRESS;
amounts[0] = allowance + (400_000 * 1e6); // 400K
amounts[0] = allowance + (1_500_000 * 1e6); // 1.5M
}

{
Expand All @@ -127,7 +130,7 @@ contract PayloadIGP83 is PayloadIGPMain {

protocols[1] = F_USDT_ADDRESS;
tokens[1] = USDT_ADDRESS;
amounts[1] = allowance + (400_000 * 1e6); // 400K
amounts[1] = allowance + (1_500_000 * 1e6); // 1.5M
}

FLUID_RESERVE.approve(protocols, tokens, amounts);
Expand Down Expand Up @@ -267,20 +270,36 @@ contract PayloadIGP83 is PayloadIGPMain {
function action5() internal isActionSkippable(5) {
address cbBTC_wBTC_DEX_ADDRESS = getDexAddress(3);

// update the threshold to 20%
IFluidDex(cbBTC_wBTC_DEX_ADDRESS).updateThresholdPercent(
20 * 1e4,
20 * 1e4,
16 hours,
1 days
);
{
// update the threshold to 20%
IFluidDex(cbBTC_wBTC_DEX_ADDRESS).updateThresholdPercent(
20 * 1e4,
20 * 1e4,
16 hours,
1 days
);
}

// update the upper and lower range +-0.25%
IFluidDex(cbBTC_wBTC_DEX_ADDRESS).updateRangePercents(
0.25 * 1e4,
0.25 * 1e4,
5 days
);
{
// update the upper and lower range +-0.25%
IFluidDex(cbBTC_wBTC_DEX_ADDRESS).updateRangePercents(
0.25 * 1e4,
0.25 * 1e4,
5 days
);
}

{ // Set max supply shares
IFluidDex(cbBTC_wBTC_DEX_ADDRESS).updateMaxSupplyShares(
175 * 1e18
); // Current 150 * 1e18
}

{ // Set max borrow shares
IFluidDex(cbBTC_wBTC_DEX_ADDRESS).updateMaxBorrowShares(
125 * 1e18
); // Current 120 * 1e18
}
}

// @notice Action 6: Update wstETH-ETH, weETH-ETH, rsETH-ETH DEX configs
Expand Down Expand Up @@ -388,8 +407,8 @@ contract PayloadIGP83 is PayloadIGPMain {
// USDC-BOLD Dex
Dex memory DEX_USDC_BOLD = Dex({
dex: USDC_BOLD_DEX,
tokenA: USD0_ADDRESS,
tokenB: USDC_ADDRESS,
tokenA: USDC_ADDRESS,
tokenB: BOLD_ADDRESS,
smartCollateral: true,
smartDebt: false,
baseWithdrawalLimitInUSD: 10_000, // $10k
Expand All @@ -403,6 +422,26 @@ contract PayloadIGP83 is PayloadIGPMain {
}
}


// @notice Action 9: Discontinue fGHO rewards
function action9() internal isActionSkippable(9) {
address[] memory protocols = new address[](1);
address[] memory tokens = new address[](1);
uint256[] memory amounts = new uint256[](1);

{
IFTokenAdmin(F_GHO_ADDRESS).updateRewards(address(0));

uint256 allowance = 210_000 * 1e18; // 210K GHO
thrilok209 marked this conversation as resolved.
Show resolved Hide resolved

protocols[0] = F_GHO_ADDRESS;
tokens[0] = GHO_ADDRESS;
amounts[0] = allowance;
}

FLUID_RESERVE.approve(protocols, tokens, amounts);
}

/**
* |
* | Proposal Payload Helpers |
Expand Down