[Poll] A Pool that Automatically Re-Stakes AAVE

Hello Aave community!

Recently, there’s been a slight demand for a way to automatically re-stake earned AAVE without having to go through individual transactions. On that front, I’ve constructed a stkAAVE staking pool!

I’d like to get the community’s feedback and opinion about it in the poll below, but first, here’s a short summary of how it works:

The Staking Pool's Architecture

Say a user deposits AAVE into the pool...
  1. The pool stakes the user’s AAVE and mints them ERC-20 compliant pool shares, representing the user’s ownership of the pool’s stkAAVE.
  2. There is a re-staking function which in turn withdraws the entire pool’s pending AAVE rewards and deposits them back into the safety module, increasing each pool share’s underlying stkAAVE. A fee is levied here (more on this later).
  3. Upon redemption, the pool returns the caller’s stkAAVE and burns their shares.

There is a special address called “manager” (better name pending…), this is the address the aforementioned fee is sent to, and it can…

  1. Alter the fee amount
  2. Call the restaking function
  3. Transfer the “manager” address

Here’s what the “manager” CANNOT do:

  1. Freeze/transfer/withdraw locked funds that it did not individually deposit (i.e. deposit like any other user)
  2. “Add” fee types (i.e. the contract is designed with only restaking fees and cannot currently have withdrawal or any other sort of fee levied.)

Why Charge a Fee?

Eventually, I’ve got hopes that it’ll give me a little bit of income! But, first thing’s first, calling the re-staking function requires gas. The fee’s main purpose is to, well, help me cover that expense.

Although I haven’t built the script yet, I’m designing a bot that checks the fee amount it would earn against the gas it would have to spend to call the re-staking function every set interval. The bot would then only execute it if the earned fees would be greater than the gas spent.

Some Relevant Calculations

I’ve done a calculation, assuming a conservative 5.00% APR on staking AAVE without compounding (0.01369863013% daily without compounding).

With a 1.0% fee levied, your daily rate would become 0.01356164382%, and your annual rate would rise to 5.07% (assuming daily compounding, even if only compounded twice a year, the APY is 5.01%, which is higher than 5%!! A 2% fee remains profitable unless compounding is done less than once a month, too.)

Keep in mind, however, that these calculations are not necessarily exact. They assume perfect conditions and constant yield. Your return will vary according to the total stkAAVE in the safety module.

Now it’s finally time for that poll!

Should The Staking Pool Be Completed & Deployed to Mainnet?

  • Yes
  • No

0 voters

Let me know your reasoning in the discussion below.

Furthermore, if you’ve got time to write your thoughts about the fee structure, nothing is set in stone as of yet, I’d love as much input as possible.

Thanks folks!

P.S. I also built a way to migrate aLEND to aAAVE with active debt, but just like the staking pool, I’m not comfortable deploying it to mainnet without the appropriate security checks. Let me know if there’s demand for that too. Cheers!


I’d love to see this soon in Aave, but I’m a bit concerned about security issues(potentially), no rush no harm


Absolutely. Security is the top priority here. There’s no way I’ll release this without getting more eyes on it.


Would be nice, if the user could choose a re-stake/claim interval -> daily (24h), weekly (each 7 days) or monthly (each 30 days). Anyway, claim/re-stake function is a “must have”.


Is this Safe? Just want to know more …

Just FYI, as soon as gas permits, I or someone else will re-upload your code and remove the fees. I would rather this be implemented in the core AAVE platform or without needless rent seeking.


And you are absolutely welcome to do so! The code will be MIT licensed. Anyone and everyone is welcome to fork, edit and deploy their own version as they see fit. This is the ethos behind DeFi, after all.

On your note of this being implemented on the core platform, I would absolutely love to see this!

*Edit: Typo

1 Like

Great poll @Zer0dot and pretty neat feature. Indeed restaking is important feature. Was not added in the initial SM staking contract for the sake of keeping the functionality simple. Amazing to see a community member to actually build this feature.

Code contributions into the Aave Protocol should be incentivised. One idea is to rewards from the Aave Reserve made my the decision of the DAO or alternative the fee that @Zer0dot proposed. The Aave Reserve currently consists of AAVE, however during v2 Reserve Factor collects part of the interest earned into the Aave Reserve. This would mean that the reserve would also include stablecoins that could be used to incentivise development.

Additionally the community should think of compiling a contribution guide which could include the process on how code developed by the community members could be contributed into the core protocol. The contribution guide should have step by step process and cover the security aspect, for example code review by the Aave team and audits. The Aave team could even kickstart the contribution guide and propose for the community for review.


I’m not sure if anyone got into other types of coins like this before. I was/am involved in P3D, which allows you to earn dividends when people sell the coin.

There was an ability to reinvest without costing the user any money. This kept the user in the smart contract and kept the value growing, since staked coins would then grow without a fee.

Not sure if that’s possible for AAVE, but I’d be interested. So far, it’s so expensive to touch my earnings. It’s like they are there, but not really…

1 Like