KVORUM
aaveSource: Aave governor v2 · #135

Rewards controller update across V3 pools

executedDec 24, 2022, 10:04 AM UTCbyF70xf71f…1e02

01Summary

AISummary by Kvorumclaude-haiku-4-5

This proposal upgrades the RewardsController contract on Aave v3 Polygon to version 2 with improvements including better Solidity version compatibility, new getter functions, bug fixes for reward calculations with zero balances, and code cleanup. The upgrade also signals intent to apply similar updates across other v3 pools.

Type
contract upgrade

Key changes

  • Soften Solidity version requirement to ^0.8.0 for better compatibility(low)
  • Add new getter to fetch current index, improving developer experience(medium)
  • Replace totalSupply with totalScaledSupply in setEmissionPerSecond for correct calculations(high)
  • Bump contract revision from 1 to 2(low)
  • Fix getUserReward to correctly return rewards for users with 0 balance(high)
  • Remove unnecessary constructor from proxy-based contract(low)
  • Standardize license pragma from agpl to AGPL(low)
  • Improve documentation on various structs(low)

Notable concerns

  • This upgrade is binding only for Polygon v3 pool; other networks (Avalanche, Optimism, Arbitrum, Fantom, Harmony) will require separate guardian-controlled transactions
  • Contract verification issues on Fantom and Harmony networks due to explorer bugs, though bytecode is confirmed identical across networks
ContractsRewardsControllerPoolAddressesProvider
Generated by Kvorum
model: claude-haiku-4-5
provider: anthropic
profile: anthropic-fast-v1
prompt: v1.0
generated: 2mo ago
Read the description ↗

02Description

415 words

Simple Summary

This proposal updates the rewardsController to it's newest version improving the DX by adding new getters and resolving some minor issues:

  1. soften solidity versions to ^0.8.0 here
  2. adding a getter to fetch the current index here
  3. replacing totalSupply with totalScaledSupply on setEmissionPerSecond here
  4. pumping revision from 1 to 2 here
  5. fixing getUserReward to return correct rewards for users with 0 balance here
  6. remove unnecessary constructor that sets state on a contract always used behind a proxy here
  7. consistently uppercase license pragma agpl->AGPL here
  8. improving documentation on various structs here
  9. removing constructor of RewardsDistributor and RewardsController here

Motivation

The Aave v3 codebase is divided into 2 different parts, Aave v3 core, and Aave v3 periphery. While usually the concept of “protocol” is more related to the Aave v3 core, there are some complementary components of Aave v3 living on the periphery codebase, for example, the system managing external teams configuring rewards for Aave v3 activity (e.g. supply/borrow assets).

Similar to the majority of other Aave smart contracts, the ones on the periphery are upgradeable and controlled by the Aave governance, which means they are designed to be improved over time.

Given that the community has approved a new Aave v3 Ethereum, we have used the occasion to introduce light improvement/fixes on the periphery smart contracts and now will submit the upgrade to be approved via governance and it only makes sense to apply them to already existing v3 pools.

Specification

This proposal executes PoolAddressesProvider.setAddressAsProxy(keccak256("INCENTIVES_CONTROLLER"), rewardsControllerImpl) on Polygon V3 pool.

If this proposal succeeds, this will be seen as positive signaling to upgrade implementations for v3 pools on networks controlled by guardians as well.

The RewardsController contracts are deployed and initialized already:

Verification on harmony & fantom does not work due to bugs in the respective explorers. You can verify though that bytecode & initialize calls are 100% the same between the different networks.

For guardian controlled pools the transactions are executed via gnosis, so instead of deploying a payload the guardians will just sign the setAddressAsProxy(keccak256("INCENTIVES_CONTROLLER"), rewardsControllerImpl) transactions.

The pre-encoded calldata to be executed by guardians on the respective PoolAddressesProvider:

  • 0x5dcc528c0000000000000000000000005f4d15d761528c57a5c30c43c1dab26fc5452731

References

Copyright

Copyright and related rights waived via CC0.

03Mismatch analysis

AIMismatch analysis by Kvorumclaude-sonnet-5
Consistent

placeholder

Generated by Kvorum
model: claude-sonnet-5
provider: anthropic
profile: anthropic-strong-v1
prompt: v1.0
generated: 2mo ago
Review the decoded actions ↗

04Actions

1 total
#0execute(address)chain 0x1
Target
0x158a…d45b
Value
0 wei
Function
execute(address)
Arguments
{
  "0": "0xf50a080aC535e531EC33cC05b227E910De2fb1fA"
}
Calldata

05Tally

Summed from votes

Voters0
VP participating0
Outcome (current)—
Current support—

06Voters

0 total

No votes recorded yet.

07Forum

No forum thread is confidently linked to this proposal.