generated from bgd-labs/bgd-forge-template
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: ALC funding with 500k GHO (#242)
* ALC funding with 500k GHO * basic fixes * adjusting md file * fixing md file and lint * Update src/20240306_AaveV3Ethereum_AaveLiquidityCommiteeFunding/AaveLiquidityCommiteeFunding_20240306.s.sol Co-authored-by: Harsh Pandey <[email protected]> --------- Co-authored-by: luigy <[email protected]> Co-authored-by: Harsh Pandey <[email protected]>
- Loading branch information
1 parent
b3f95d1
commit e7ca796
Showing
5 changed files
with
405 additions
and
0 deletions.
There are no files selected for viewing
104 changes: 104 additions & 0 deletions
104
...306_AaveV3Ethereum_AaveLiquidityCommiteeFunding/AaveLiquidityCommiteeFunding.md
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,104 @@ | ||
--- | ||
title: "Aave Liquidity Commitee Funding" | ||
author: "karpatkey_TokenLogic" | ||
discussions: "https://governance.aave.com/t/arfc-aave-liquidity-committee-funding/16793" | ||
snapshot: "https://snapshot.org/#/aave.eth/proposal/0xd6229e068e755336339bd8a314136e18ef00b22a95430476b6fa3665e9300548" | ||
--- | ||
|
||
# Summary | ||
|
||
This publication proposes funding the Aave Liquidity Committee with 500k GHO to continue supporting GHO's liquidity and DeFi integrations over the next 3 months. | ||
|
||
# Motivation | ||
|
||
Since its initial [funding in October 2023](https://governance-v2.aave.com/governance/proposal/343/), the Aave Liquidity Committee (previously GLC) has actively supported GHO liquidity across various DEXes by deploying and incentivising liquidity pools. | ||
|
||
As a result of these efforts: | ||
|
||
- Deeper on-chain liquidity | ||
- Lower slippage, especially for GHO to USDC swaps | ||
|
||
In combination with other efforts like stkGHO, ALC's initiatives have played a critical role in supporting GHO's peg recovery. | ||
|
||
Throughout the period, the ALC leveraged on both Uniswap v3 and, more frequently, Maverick to tailor liquidity distribution at specific price ranges which helped absorb GHO downward market volatility. A list of active Boosted Positions can be found [here](https://app.mav.xyz/boosted-positions?chain=1). | ||
|
||
While some pools are incentivised by voting with pre-existing DAO holdings (e.g. vlAURA), others like Maverick's concentrated liquidity Boosted Positions require additional expenses. It is worth noting, the Aave DAO is expected to benefit from the next airdrop by Maverick. We expect Maverick, and potentially Merkle on Uniswap v3, to remain key tools for supporting tailored liquidity shaping efforts in provided peg resilience. | ||
|
||
Concentrated GHO liquidity was [recently introduced in Balancer](https://twitter.com/GyroStable/status/1757365157917815001) with the creation of several E-CLP pools. These pools are being jointly incentivised with use to the Aave DAO's vlAURA holding. When there is excess vlAURA votes, these votes have been delegated to Paladin in return for approximately 70% APR nominated in USDC. | ||
|
||
The following charts depict some of the impact these efforts had on GHO's ecosystem, highlights: | ||
|
||
- GHO/USDC Maverick pools captured most of the volume | ||
- 0.2% bin width pool processed most of the volume during high volatility period | ||
- 0.1% bin width pool is starting to replace the 0.2% bin width pool trading volume. This is due to incentive efforts shifting to Boosted Positions within the 0.1% bin width pool to create deeper liquidity and reducing price volatility | ||
- GHO/USDC/USDT Balancer provides continuous yield source for LP | ||
- Trading volumes and TVL on Balancer are expected to increase when the BPT is integrated by [other protocols](https://twitter.com/Matthew_Graham_/status/1762076544241955070) and leveraged farming is introduced | ||
- Gyrsocope E-CLP pools on Balancer are starting to capture a larger share of the market volume in recent weeks | ||
- As the peg improves, one pool will be retained and the dual token deposit requirement will help provide resilience for the peg | ||
|
||
The next chapter for GHO focuses on the following key areas: | ||
|
||
- 1.00:1.00 peg with USD | ||
- Reducing price volatility | ||
- Deeper liquidity to support DeFi integrations | ||
- Grow non stable-coin-paired liquidity pools | ||
- Targeted liquidity distributions to support Borrow Cap increases | ||
|
||
These efforts will need to scale to match GHO's expected growth profile. The primary liquidity pools are to remain stable coins, and we expect to introduce other asset pairs in the future, as well as participation in the launch of various projects like [Ethena](https://app.ethena.fi/liquidity) and [f(x) Protocol's launch](https://x.com/protocol_fx/status/1762822716854354015?s=20). | ||
|
||
Though there is inherent uncertainty in future stable coin rates, price volatility, and upcoming opportunities for new DeFi integrations, we believe a high-level budget will look like the following: | ||
|
||
| Objective | Category | Budget | | ||
| ----------------- | -------------- | -------- | | ||
| Liquidity | Peg Resilience | 360k GHO | | ||
| DeFi Integrations | Create Utility | 140k GHO | | ||
| Total | | 500k GHO | | ||
|
||
It is important to note that this estimation excludes efforts to drive GHO liquidity or integrations beyond Ethereum. | ||
|
||
# Performance Indicators | ||
|
||
The below details some high level GHO metrics we propose tracking: | ||
|
||
| Description | Optimal Value | | ||
| ------------------------------ | ---------------------------------------------------------------------------------- | | ||
| TVL DEX Liquidity Pools | 50M | | ||
| TVL in Utility Liquidity Pools | 15M excl. stkGHO | | ||
| DEX Liquidity Composition | < 50% GHO (< 33% for 3pools) | | ||
| Swap Price Impact $5M Swap | < 0.10% (GHO to USDC) | | ||
| Annualised Peg Volatility | < 5.00% | | ||
| Price level for > 90% time | $0.995 using [Redstone Medium Price](https://app.redstone.finance/#/app/token/GHO) | | ||
|
||
Please note, each of the above targets has external dependencies beyond the control of the ALC. The above table serves as a North Star for the ALC to strive towards over the next 3 months on the assumption the Borrow Cap is continually increased beyond the current 35M Bucket Size. Having measurable targets provides a clear direction and goal to achieve. | ||
|
||
The [stkGHO implementation](https://app.aave.com/staking), [USDe integration](https://app.ethena.fi/liquidity) and coordinated efforts to attract users to acquire GHO are all great examples of how growth initiatives drive GHO utility, adoption and have a positive impact the spot price. | ||
|
||
Each of the above metrics, plus more, will be shown on the TokenLogic analytics dashboard. | ||
|
||
# Specification | ||
|
||
Swap the following assets for GHO: | ||
|
||
- Withdraw 250k Aave V2 USDT from the collector | ||
- Withdraw 250k Aave V2 USDC from the collector | ||
- Swap 250k USDT withdrawn above for GHO | ||
- Swap 250k USDC withdrawn above for GHO | ||
|
||
Create an allowance of 500k GHO to ALC SAFE. | ||
|
||
ALC SAFE: `0x205e795336610f5131Be52F09218AF19f0f3eC60` | ||
|
||
## References | ||
|
||
- Implementation: [AaveV3Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240306_AaveV3Ethereum_AaveLiquidityCommiteeFunding/AaveV3Ethereum_AaveLiquidityCommiteeFunding_20240306.sol) | ||
- Tests: [AaveV3Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240306_AaveV3Ethereum_AaveLiquidityCommiteeFunding/AaveV3Ethereum_AaveLiquidityCommiteeFunding_20240306.t.sol) | ||
- [Snapshot](https://snapshot.org/#/aave.eth/proposal/0xd6229e068e755336339bd8a314136e18ef00b22a95430476b6fa3665e9300548) | ||
- [Discussion](https://governance.aave.com/t/arfc-aave-liquidity-committee-funding/16793) | ||
|
||
# Disclosure | ||
|
||
TokenLogic and karpatkey receive no payment for this proposal. TokenLogic and karpatkey are both delegates within the Aave community. | ||
|
||
# Copyright | ||
|
||
Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). |
58 changes: 58 additions & 0 deletions
58
...6_AaveV3Ethereum_AaveLiquidityCommiteeFunding/AaveLiquidityCommiteeFunding_20240306.s.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,58 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
import {GovV3Helpers, IPayloadsControllerCore, PayloadsControllerUtils} from 'aave-helpers/GovV3Helpers.sol'; | ||
import {EthereumScript} from 'aave-helpers/ScriptUtils.sol'; | ||
import {AaveV3Ethereum_AaveLiquidityCommiteeFunding_20240306} from './AaveV3Ethereum_AaveLiquidityCommiteeFunding_20240306.sol'; | ||
|
||
/** | ||
* @dev Deploy Ethereum | ||
* deploy-command: make deploy-ledger contract=src/20240224_Multi_FundingUpdate/FundingUpdate_20240224.s.sol:DeployEthereum chain=mainnet | ||
* verify-command: npx catapulta-verify -b broadcast/FundingUpdate_20240224.s.sol/1/run-latest.json | ||
*/ | ||
contract DeployEthereum is EthereumScript { | ||
function run() external broadcast { | ||
// deploy payloads | ||
address payload0 = GovV3Helpers.deployDeterministic( | ||
type(AaveV3Ethereum_AaveLiquidityCommiteeFunding_20240306).creationCode | ||
); | ||
|
||
// compose action | ||
IPayloadsControllerCore.ExecutionAction[] | ||
memory actions = new IPayloadsControllerCore.ExecutionAction[](1); | ||
actions[0] = GovV3Helpers.buildAction(payload0); | ||
|
||
// register action at payloadsController | ||
GovV3Helpers.createPayload(actions); | ||
} | ||
} | ||
|
||
/** | ||
* @dev Create Proposal | ||
* command: make deploy-ledger contract=src/20240224_Multi_FundingUpdate/FundingUpdate_20240224.s.sol:CreateProposal chain=mainnet | ||
*/ | ||
contract CreateProposal is EthereumScript { | ||
function run() external { | ||
// create payloads | ||
PayloadsControllerUtils.Payload[] memory payloads = new PayloadsControllerUtils.Payload[](1); | ||
|
||
// compose actions for validation | ||
IPayloadsControllerCore.ExecutionAction[] | ||
memory actionsEthereum = new IPayloadsControllerCore.ExecutionAction[](1); | ||
actionsEthereum[0] = GovV3Helpers.buildAction( | ||
type(AaveV3Ethereum_AaveLiquidityCommiteeFunding_20240306).creationCode | ||
); | ||
payloads[0] = GovV3Helpers.buildMainnetPayload(vm, actionsEthereum); | ||
|
||
// create proposal | ||
vm.startBroadcast(); | ||
GovV3Helpers.createProposal( | ||
vm, | ||
payloads, | ||
GovV3Helpers.ipfsHashFile( | ||
vm, | ||
'src/20240306_AaveV3Ethereum_AaveLiquidityCommiteeFunding/AaaveLiquidityCommunityFunding.md' | ||
) | ||
); | ||
} | ||
} |
95 changes: 95 additions & 0 deletions
95
...eum_AaveLiquidityCommiteeFunding/AaveV3Ethereum_AaveLiquidityCommiteeFunding_20240306.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,95 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
import {IERC20} from 'solidity-utils/contracts/oz-common/interfaces/IERC20.sol'; | ||
import {SafeERC20} from 'solidity-utils/contracts/oz-common/SafeERC20.sol'; | ||
import {MiscEthereum} from 'aave-address-book/MiscEthereum.sol'; | ||
import {AaveV2Ethereum, AaveV2EthereumAssets} from 'aave-address-book/AaveV2Ethereum.sol'; | ||
import {AaveV3Ethereum, AaveV3EthereumAssets} from 'aave-address-book/AaveV3Ethereum.sol'; | ||
import {AaveSwapper} from 'aave-helpers/swaps/AaveSwapper.sol'; | ||
import {IProposalGenericExecutor} from 'aave-helpers/interfaces/IProposalGenericExecutor.sol'; | ||
|
||
/** | ||
* @title Funding Update | ||
* @author karpatkey_TokenLogic | ||
* - Snapshot: https://snapshot.org/#/aave.eth/proposal/0x4dd4dff7096bf7ab8c4c071975d40f4cf709c41b4b6b7c60777a6dd50d2ecd09 | ||
* - Discussion: https://governance.aave.com/t/arfc-funding-update/16675 | ||
*/ | ||
contract AaveV3Ethereum_AaveLiquidityCommiteeFunding_20240306 is IProposalGenericExecutor { | ||
using SafeERC20 for IERC20; | ||
|
||
AaveSwapper public constant SWAPPER = AaveSwapper(MiscEthereum.AAVE_SWAPPER); | ||
address public constant ALC_SAFE = 0x205e795336610f5131Be52F09218AF19f0f3eC60; | ||
|
||
address public constant MILKMAN = 0x11C76AD590ABDFFCD980afEC9ad951B160F02797; | ||
address public constant PRICE_CHECKER = 0xe80a1C615F75AFF7Ed8F08c9F21f9d00982D666c; | ||
|
||
address public constant GHO_USD_FEED = 0x3f12643D3f6f874d39C2a4c9f2Cd6f2DbAC877FC; | ||
|
||
uint256 public constant USDC_V2_TO_SWAP = 250_000e6; | ||
uint256 public constant USDT_V2_TO_SWAP = 250_000e6; | ||
|
||
uint256 public constant GHO_ALLOWANCE = 500_000 ether; | ||
|
||
function execute() external { | ||
// Swap 250k USDC and USDT to GHO - Intent | ||
_swap(); | ||
|
||
// Authorize ALC to transfer 500k GHO from the COLLECTOR | ||
AaveV3Ethereum.COLLECTOR.approve(AaveV3EthereumAssets.GHO_UNDERLYING, ALC_SAFE, GHO_ALLOWANCE); | ||
} | ||
|
||
function _swap() internal { | ||
// Withdraw Aave V2 USDC & Transfer to SWAPPER & swap for GHO | ||
|
||
AaveV3Ethereum.COLLECTOR.transfer( | ||
AaveV2EthereumAssets.USDC_A_TOKEN, | ||
address(this), | ||
USDC_V2_TO_SWAP | ||
); | ||
|
||
AaveV2Ethereum.POOL.withdraw( | ||
AaveV2EthereumAssets.USDC_UNDERLYING, | ||
type(uint256).max, | ||
address(SWAPPER) | ||
); | ||
|
||
SWAPPER.swap( | ||
MILKMAN, | ||
PRICE_CHECKER, | ||
AaveV3EthereumAssets.USDC_UNDERLYING, | ||
AaveV3EthereumAssets.GHO_UNDERLYING, | ||
AaveV3EthereumAssets.USDC_ORACLE, | ||
GHO_USD_FEED, | ||
address(AaveV3Ethereum.COLLECTOR), | ||
IERC20(AaveV2EthereumAssets.USDC_UNDERLYING).balanceOf(address(SWAPPER)), | ||
100 | ||
); | ||
|
||
// Withdraw Aave V2 USDT & Transfer to SWAPPER & swap for GHO | ||
|
||
AaveV3Ethereum.COLLECTOR.transfer( | ||
AaveV2EthereumAssets.USDT_A_TOKEN, | ||
address(this), | ||
USDT_V2_TO_SWAP | ||
); | ||
|
||
AaveV2Ethereum.POOL.withdraw( | ||
AaveV2EthereumAssets.USDT_UNDERLYING, | ||
type(uint256).max, | ||
address(SWAPPER) | ||
); | ||
|
||
SWAPPER.swap( | ||
MILKMAN, | ||
PRICE_CHECKER, | ||
AaveV3EthereumAssets.USDT_UNDERLYING, | ||
AaveV3EthereumAssets.GHO_UNDERLYING, | ||
AaveV3EthereumAssets.USDT_ORACLE, | ||
GHO_USD_FEED, | ||
address(AaveV3Ethereum.COLLECTOR), | ||
IERC20(AaveV2EthereumAssets.USDT_UNDERLYING).balanceOf(address(SWAPPER)), | ||
100 | ||
); | ||
} | ||
} |
133 changes: 133 additions & 0 deletions
133
...m_AaveLiquidityCommiteeFunding/AaveV3Ethereum_AaveLiquidityCommiteeFunding_20240306.t.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,133 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
import {IERC20} from 'solidity-utils/contracts/oz-common/interfaces/IERC20.sol'; | ||
import {AaveV2Ethereum, AaveV2EthereumAssets} from 'aave-address-book/AaveV2Ethereum.sol'; | ||
import {AaveV3Ethereum, AaveV3EthereumAssets} from 'aave-address-book/AaveV3Ethereum.sol'; | ||
import {MiscEthereum} from 'aave-address-book/MiscEthereum.sol'; | ||
import {ProtocolV3TestBase} from 'aave-helpers/ProtocolV3TestBase.sol'; | ||
|
||
import {AaveV3Ethereum_AaveLiquidityCommiteeFunding_20240306} from './AaveV3Ethereum_AaveLiquidityCommiteeFunding_20240306.sol'; | ||
|
||
/** | ||
* @dev Test for AaveV3Ethereum_AaveLiquidityCommiteeFunding_20240306 | ||
* command: make test-contract filter=AaveV3Ethereum_AaveLiquidityCommiteeFunding_20240306 | ||
*/ | ||
contract AaveV3Ethereum_AaveLiquidityCommiteeFunding_20240306_Test is ProtocolV3TestBase { | ||
event SwapRequested( | ||
address milkman, | ||
address indexed fromToken, | ||
address indexed toToken, | ||
address fromOracle, | ||
address toOracle, | ||
uint256 amount, | ||
address indexed recipient, | ||
uint256 slippage | ||
); | ||
|
||
event Transfer(address indexed from, address indexed to, uint256 value); | ||
|
||
AaveV3Ethereum_AaveLiquidityCommiteeFunding_20240306 internal proposal; | ||
|
||
address swapper; | ||
|
||
function setUp() public { | ||
vm.createSelectFork(vm.rpcUrl('mainnet'), 19432086); | ||
proposal = new AaveV3Ethereum_AaveLiquidityCommiteeFunding_20240306(); | ||
swapper = address(proposal.SWAPPER()); | ||
} | ||
|
||
function test_execution() public { | ||
uint256 initialBalanceGHO = IERC20(AaveV3EthereumAssets.GHO_UNDERLYING).balanceOf( | ||
address(AaveV3Ethereum.COLLECTOR) | ||
); | ||
assertGe(initialBalanceGHO, 0, 'Collector has 0 GHO'); | ||
|
||
uint256 initialAllowanceGHO = IERC20(AaveV3EthereumAssets.GHO_UNDERLYING).allowance( | ||
address(AaveV3Ethereum.COLLECTOR), | ||
proposal.ALC_SAFE() | ||
); | ||
assertEq(initialAllowanceGHO, 0); | ||
|
||
uint256 initialBalanceAUSDC = IERC20(AaveV2EthereumAssets.USDC_A_TOKEN).balanceOf( | ||
address(AaveV3Ethereum.COLLECTOR) | ||
); | ||
uint256 initialBalanceAUSDT = IERC20(AaveV2EthereumAssets.USDT_A_TOKEN).balanceOf( | ||
address(AaveV3Ethereum.COLLECTOR) | ||
); | ||
|
||
assertGe(initialBalanceAUSDT, proposal.USDT_V2_TO_SWAP(), 'Not enough aUSDT to Withdraw'); | ||
assertGe(initialBalanceAUSDC, proposal.USDC_V2_TO_SWAP(), 'Not enough aUSDC to Withdraw'); | ||
|
||
_expectEmits(); | ||
|
||
executePayload(vm, address(proposal)); | ||
|
||
assertEq( | ||
IERC20(AaveV3EthereumAssets.GHO_UNDERLYING).allowance( | ||
address(AaveV3Ethereum.COLLECTOR), | ||
proposal.ALC_SAFE() | ||
), | ||
proposal.GHO_ALLOWANCE() | ||
); | ||
|
||
uint256 finalBalanceAUSDC = IERC20(AaveV2EthereumAssets.USDC_A_TOKEN).balanceOf( | ||
address(AaveV3Ethereum.COLLECTOR) | ||
); | ||
uint256 finalBalanceAUSDT = IERC20(AaveV2EthereumAssets.USDT_A_TOKEN).balanceOf( | ||
address(AaveV3Ethereum.COLLECTOR) | ||
); | ||
|
||
assertGe( | ||
finalBalanceAUSDC, | ||
initialBalanceAUSDC - proposal.USDC_V2_TO_SWAP(), | ||
'Did not transfer withdrawn balance' | ||
); | ||
|
||
assertGe( | ||
finalBalanceAUSDT, | ||
initialBalanceAUSDT - proposal.USDT_V2_TO_SWAP(), | ||
'Did not transfer withdrawn balance' | ||
); | ||
} | ||
|
||
function _expectEmits() internal { | ||
vm.expectEmit(true, true, true, true, AaveV3EthereumAssets.USDC_UNDERLYING); | ||
emit Transfer( | ||
address(AaveV2EthereumAssets.USDC_A_TOKEN), | ||
address(MiscEthereum.AAVE_SWAPPER), | ||
proposal.USDC_V2_TO_SWAP() | ||
); | ||
|
||
vm.expectEmit(true, true, true, true, MiscEthereum.AAVE_SWAPPER); | ||
emit SwapRequested( | ||
proposal.MILKMAN(), | ||
AaveV3EthereumAssets.USDC_UNDERLYING, | ||
AaveV3EthereumAssets.GHO_UNDERLYING, | ||
AaveV3EthereumAssets.USDC_ORACLE, | ||
proposal.GHO_USD_FEED(), | ||
proposal.USDC_V2_TO_SWAP(), | ||
address(AaveV3Ethereum.COLLECTOR), | ||
100 | ||
); | ||
|
||
vm.expectEmit(true, true, true, true, AaveV3EthereumAssets.USDT_UNDERLYING); | ||
emit Transfer( | ||
address(AaveV2EthereumAssets.USDT_A_TOKEN), | ||
address(MiscEthereum.AAVE_SWAPPER), | ||
proposal.USDC_V2_TO_SWAP() | ||
); | ||
|
||
vm.expectEmit(true, true, true, true, MiscEthereum.AAVE_SWAPPER); | ||
emit SwapRequested( | ||
proposal.MILKMAN(), | ||
AaveV3EthereumAssets.USDT_UNDERLYING, | ||
AaveV3EthereumAssets.GHO_UNDERLYING, | ||
AaveV3EthereumAssets.USDT_ORACLE, | ||
proposal.GHO_USD_FEED(), | ||
proposal.USDT_V2_TO_SWAP(), | ||
address(AaveV3Ethereum.COLLECTOR), | ||
100 | ||
); | ||
} | ||
} |
Oops, something went wrong.
e7ca796
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Foundry report
Build log
Test success 🌈