Upgrade the safety module to v1.5 PART 1
01Summary
Upgrade Aave Safety Module to v1.5, introducing a new exchange-rate-based slashing mechanism, revised 20-day cooldown system, GHO transfer hook for discount mechanics, and UX improvements like permit support and batch claim-stake transactions.
- Type
- contract upgrade
Key changes
- New slashing mechanism using exchange rate tracking between AAVE and stkAAVE to eliminate need for ad-hoc governance proposals for slashing events(high)
- Cooldown mechanism redesigned to prevent gaming; stakers can redeem minimum balance held between cooldown activation and redeem window; cooldown period increased from 10 days to 20 days(high)
- GHO transfer hook added to stkAAVE to enable discount mechanism for GHO holders through stkAAVE balance notifications(high)
- Ownership of stkAAVE transferred to ProxyAdmin controlled by LONG_EXECUTOR for consistency(medium)
- MAX_SLASHING parameter set to 30%(medium)
- New stakeWithPermit() function added for improved UX(low)
- Batch convenience methods claimRewardsAndRedeem() and claimRewardsAndStake() added(low)
- preview*() methods added to follow ERC4626 standard more closely(low)
Notable concerns
- Cooldown period doubled from 10 to 20 days may impact liquidity access for stakers
- GHO facilitator transfer hook introduces external dependency requiring trust in GHO governance entity
- Implementation complexity increased with new slashing mechanism and exchange rate tracking
Generated by Kvorum
02Description
Summary
This AIP presents the community with the opportunity to upgrade the safety module to v1.5 which introduces:
- a new slashing mechanism
- new cooldown mechanism
- a transfer hook to be used by GHO
The new version also adds some convenience features like permit support or the ability to claim and stake in a single transaction.
Motivation
On September 2020, the Aave Safety Module was introduced into the ecosystem, to improve the protection of the liquidity protocol, adding an extra utility for the AAVE token: AAVE or AAVE/WETH BPT holders stake their assets to act as a defensive layer in front of any shortfall event.
Since then, apart from really minor upgrades, the contracts have remained the same and in parallel, the system has been adopted by other communities.
As part of our engagement with Aave, we identified that the Safety Module is a clear area of improvement in the ecosystem, from 2 different standpoints:
- Technical. Improving the basic existing mechanisms of the contracts, but without disrupting radically the current design of the SM.
- Conceptual. Making more efficient the SM dynamics (e.g. slashing, rewards distribution rules, etc), by modifying the whole design.
New slashing mechanism
On the running SM v1, in order to slash, an ad-hoc governance proposal is required, involving important development overhead, which is not ideal.
The new SM v1.5 adds an enhanced mechanism to facilitate slashing of the underlying by tracking an exchange rate between the staked AAVE and the stkAAVE received by stakers. The mechanism is simple: when somebody stakes AAVE, they receive a certain amount of stkAAVE, which no longer is 1:1 equivalent, as it keeps track of slashing (meaning with the same stkAAVE, stakers are able to claim less AAVE).
New cooldown mechanism
The current cooldown on SM v1 consists of a time delay of 10 days to be respected whenever anybody wants to redeem the staked AAVE. At the moment, this cooldown is affected by in/outflows of stkAAVE, both via transfer() and stake()/redeem(), in order to protect the system from being gamed. Even with this protection mechanism the mechanism is currently gamable, by staking aave within the active cooldown window to extend the window.
This mechanism is not really optimal and adds important complexity, so on v1.5 has been changed to the following: after activation of cooldown, a staker will be able to redeem the minimum balance he will hold between cooldown activation and redeem window. Apart from the user-level cooldown new mechanics, we also propose to increase the cooldown period from 10 days to 20 days.
GHO Transfer hook
The Aave community has already approved the deployment and activation of the GHO stablecoin and the first facilitator will be the Aave v3 Ethereum pool.
In order to enable the discount mechanism by holding stkAAVE described on the GHO proposal, the design of Aave Companies requires to introduce of a piece of logic on the stkAAVE transfer(), in order to “notify” the GHO facilitator system of stakers’ balances.
We have evaluated this and we think it is acceptable, so it will be included in this upgrade. From a technical perspective, stkAAVE includes logic protections to remain unaffected if anything would go wrong with the GHO facilitator, which at the same time should be considered a trustable entity, as it will be controlled by the Aave governance.
Misc
The upgrade also allowed us to add some smaller ux improvements:
-
a new
stakeWithPermit()is introduced onstkAAVE -
convenience methods to batch claiming and staking/redeeming into a single transaction have been added as
claimRewardsAndRedeemandclaimRewardsAndStakehave been added tostkAAVE -
preview*()methods have been added to follow the4626standard more closely, even if there's no objective to be compliant
Specification PART 1
The proposal is split in two parts, as currently the stkAAVE is controlled by the LONG_EXECUTOR where stkABPT is controlled by the SHORT_EXECUTOR. As there's a single executor per proposal Part 1 upgrades the stkAAVE implementation and targets the LONG_EXECUTOR. Part 2 upgrades the stkABPT implementation and targets the SHORT_EXECUTOR.
The proposal will:
- transfer ownership of
stkAAVEto aProxyAdmincontrolled by theLONG_EXECUTOR. This is done for consistency reasons withstkABPTas theSHORT_EXECUTORcannot be theSLASHING_ADMINandPROXY_ADMINat the same time.
IInitializableAdminUpgradeabilityProxy(STK_AAVE).changeAdmin(
address(AaveMisc.PROXY_ADMIN_ETHEREUM_LONG)
);
- deploy the new implementation while maintaining the current values:
StakedAaveV3 newImpl = new StakedAaveV3(
IERC20(AaveV2EthereumAssets.AAVE_UNDERLYING),
IERC20(AaveV2EthereumAssets.AAVE_UNDERLYING),
GenericProposal.UNSTAKE_WINDOW,
GenericProposal.REWARDS_VAULT,
GenericProposal.EMISSION_MANAGER,
GenericProposal.DISTRIBUTION_DURATION
);
- upgrade
stkAAVEimplementation. TheSLASHING_ADMIN,COOLDOWN_ADMINandCLAIM_HELPERare all initialized as theSHORT_EXECUTOR.MAX_SLASHINGis set to30%,COOLDOWN_SECONDSis increased to20 days:
ProxyAdmin(AaveMisc.PROXY_ADMIN_ETHEREUM_LONG).upgradeAndCall(
TransparentUpgradeableProxy(payable(STK_AAVE)),
address(newImpl),
abi.encodeWithSignature(
'initialize(address,address,address,uint256,uint256)',
GenericProposal.SLASHING_ADMIN,
GenericProposal.COOLDOWN_ADMIN,
GenericProposal.CLAIM_HELPER,
GenericProposal.MAX_SLASHING,
GenericProposal.COOLDOWN_SECONDS
)
);
References
A list of relevant links like for this proposal:
- ProposalPayloads
- StakedTokenV3
- StakedAaveV3
- sigma prime audit
- Certora audit
- Certora specs
- Test Cases
- Technical review by aave companies
Copyright
Copyright and related rights waived via CC0.
03Mismatch analysis
A calldata-vs-description analysis is not generated yet. Review the decoded actions →
04Actions
- Target
- 0xe427…87a0
- Value
- 0 wei
- Function
- fallback()
- Arguments
{}- Calldata
05Tally
Summed from votes
06Voters
No votes recorded yet.
07Forum
No forum thread is confidently linked to this proposal.
08Similar proposals
- aaveexecutedUpgrade the safety module to v1.5 PART 298%
- aaveexecutedUpgrade Aave instances to v3.482%
- aaveexecutedUpgrade Aave instances to v3.7 Part 280%
- aaveexecutedUpgrade Aave instances to v3.579%
- aaveexecutedAave v3.1 upgrade79%
- aaveexecutedUpgrade all Aave instances to 3.278%
- aaveexecutedUpgrade Aave instances to v3.6 Part 176%
- aaveexecutedAave V1 Deprecation Phase 276%
- aaveexecutedUpgrade Aave instances to v3.6 Part 276%
- aaveexecutedAave V2 deprecation76%