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

Stake slashing implementation #2

Open
wants to merge 40 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
5f85047
Added exchange rate, initial tests
Jan 26, 2021
6cc4689
Added cooldown admin, modifiers
Jan 26, 2021
436c7fe
Updated StakedTokenV3 implementation, added StakedAaveV3
Jan 27, 2021
2e961ea
Updated tests
Jan 28, 2021
951d09a
Added more tests
Jan 28, 2021
3f22cd2
Added more slashing tests
Jan 29, 2021
47e6eb4
Refactored StakeTokenV3, added more tests
Jan 29, 2021
5917b9d
Added claim admins pattern
The-3D Feb 1, 2021
138ec5c
Merge branch 'master' into feat/slashing-implementation
The-3D Feb 9, 2021
fdc8cf2
Added missing events
The-3D Feb 9, 2021
8c1403f
Added stakeWithPermit function, tests
The-3D Feb 11, 2021
b8d366a
Added features and tests (1/2)
dhadrien Feb 15, 2021
baf9f32
added redeemOnBehalf claimRewardsOnBehalf claimRewardsAndStake claimR…
dhadrien Feb 16, 2021
5bd671a
Change on StakedTokenV2
eboadom Feb 19, 2021
586d02f
removed useless transfers in claimAndStake
dhadrien Feb 16, 2021
57bd352
updated behavior on claimAndStake
The-3D Feb 16, 2021
1bb2173
Updated tests, added gas reporter
The-3D Feb 16, 2021
769e1d3
Merge pull request #5 from aave/feat/other-features
eboadom Feb 19, 2021
eee3207
adding return type to claimOnBehalf
dhadrien Mar 15, 2021
6522d51
Swap arguments at handleAction to match aToken implementation: user, …
kartojal Mar 22, 2021
869902d
Merge pull request #8 from aave/feat/swap-handleAction-params
The-3D Mar 22, 2021
ce0be83
Moved AaveEcosystemReserve.sol to the repository. Create hardhat scri…
kartojal Mar 22, 2021
782798e
Remove unused helper.
kartojal Mar 22, 2021
2672c64
Add distribution and reward vault setters. Add new rewards role to Aa…
kartojal Mar 24, 2021
5f0d34f
Keep old interface compatibility at AaveDistributionManager
kartojal Mar 25, 2021
a42ea49
Merge pull request #11 from aave/feat/rewards-role
kartojal Mar 26, 2021
740440c
Solve conflicts. Update scripts to latest AaveIncentivesController.
kartojal Mar 26, 2021
d315278
Upload fixed package-lock
kartojal Mar 26, 2021
206a886
Import typings and polygon verifier from protocol-v2
kartojal Mar 26, 2021
c909437
Fixed getters of AaveEcosystemReserve, AaveIncentivesController and p…
kartojal Mar 31, 2021
cb8e5e8
Added config script
dhadrien Apr 12, 2021
231a589
new addresses mumbai
dhadrien Apr 12, 2021
d39a684
updated to new mumbai addresses
dhadrien Apr 12, 2021
b81c1a3
Added fork test matic
dhadrien Apr 13, 2021
1dbb853
Updated the AaveIncentivesController interface
The-3D Apr 14, 2021
0fb481c
Merge branch 'feat/incentives/mumbai-config' of github.com:aave/aave-…
The-3D Apr 14, 2021
ad1afde
refactor: Updated IAaveIncentivesController interface
The-3D Apr 17, 2021
d3c4208
Merge pull request #13 from aave/feat/incentives/mumbai-config
kartojal Apr 28, 2021
da4bad6
Merge pull request #9 from aave/feat/deployment-scripts
kartojal Apr 28, 2021
759258e
feat: merge master and fix conflicts
kartojal Aug 9, 2021
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
Prev Previous commit
Next Next commit
Swap arguments at handleAction to match aToken implementation: user, …
…totalSupply, userBalance
kartojal committed Mar 22, 2021
commit 6522d51f1ed72cd9b409f2e6e6f8a67b1abb11ad
2 changes: 1 addition & 1 deletion contracts/mocks/ATokenMock.sol
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ contract ATokenMock is IAToken {
uint256 userBalance,
uint256 totalSupply
) external {
_aic.handleAction(user, userBalance, totalSupply);
_aic.handleAction(user, totalSupply, userBalance);
}

function setUserBalanceAndSupply(uint256 userBalance, uint256 totalSupply) public {
6 changes: 3 additions & 3 deletions contracts/stake/AaveIncentivesController.sol
Original file line number Diff line number Diff line change
@@ -61,13 +61,13 @@ contract AaveIncentivesController is
/**
* @dev Called by the corresponding asset on any update that affects the rewards distribution
* @param user The address of the user
* @param userBalance The balance of the user of the asset in the lending pool
* @param totalSupply The total supply of the asset in the lending pool
* @param userBalance The balance of the user of the asset in the lending pool
**/
function handleAction(
address user,
uint256 userBalance,
uint256 totalSupply
uint256 totalSupply,
uint256 userBalance
) external override {
uint256 accruedRewards = _updateUserAssetInternal(user, msg.sender, userBalance, totalSupply);
if (accruedRewards != 0) {