aave / aave-stake-v2 Goto Github PK
View Code? Open in Web Editor NEWV2 implementation of the stkAAVE token
License: Other
V2 implementation of the stkAAVE token
License: Other
The staked token implementation writes DOMAIN_SEPARATOR
to storage in initialize
. It will therefore not be able to handle a hard fork post-deployment, as the chainID is not updated and a valid signature for one chain could be replayed on the other.
The issue can be handled by using a dynamic domain separator which is generated on demand instead of reading from storage.
Add noEmergency
modifier to user initiated functions that will perform a non-reverting noop
in case of emergency. The cooldown admin will control the switch.
setEmergencyShutdown()
only callable by cooldown admingetEmergencyShutdown()
for easy accessnoEmergency
modifier to:
stake
cooldown
stakeWithPermit
redeem
redeemOnBehalf
claimRewards
claimRewardsOnBehalf
claimRewardsAndStake
claimRewardsAndStakeOnBehalf
claimRewardsAndRedeem
claimRewardsAndRedeemOnbehalf
The Aave UI uses 2 contracts:
The current StakeTokenV2 implementation does not have slashing capabilities. Right now there is no way of executing a slash of the stake without governance intervention and a token upgrade. This issue tracks the introduction of slashing capabilities on the StakeTokenV2
.
The functionality will be implemented as follows:
exchangeRate()
function that tracks the ratio between the total supply of the StakeToken and the underlying. A ratio of 1:1 means no slashes happened. An eventual slashing of the stake will seize some of the underlying asset reducing the exchange rate of underlying:stake token of an amount proportional to the underlying seizedSlashingAdmin
role. The Slashing admin will be the the sole entity able to execute the slashing of the underlying asset. For the Aave stake, it will be configured as 0xEE56e2B3D491590B5b31738cC34d5232F378a8D5, that is the current governance V2 short executorCooldownAdmin
. The Cooldown admin will be able to pause all the cooldown periods in case of a shortfall event, to allow proper resolution of the event. The pauseCooldown()
function allows the admin to pause all the cooldowns.Cooldowns are expected to be resumed once the slashing event is resolved by the CooldownAdmin. If the pause is 4. longer than 10 days, the cooldowns are expected to expire.slash()
function. The slash()
function allows the SlashingAdmin to seize some of the underlying stored in the stake to be transferred to a different address, for subsequent auctioning and recollateralization of the protocol. The exchange rate will automatically update to reflect the change in the underlying/total stake shares ratio.Currently hardcoded as type(uint256).max
On top of StakedTokenV3 which implements the slashing functionalities, the following are needed:
Refine existing UI data provider contract for Safety Module contracts and adjust for 1.5 version.
Details: https://governance.aave.com/t/bgd-aave-safety-module-v1-5/12148
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.