Skip to content

feat: aave agents - #1

Merged
kyzia551 merged 16 commits into
mainfrom
feat/aave-agents
Dec 11, 2025
Merged

kyzia551 merged 16 commits into
mainfrom
feat/aave-agents

Conversation

@brotherlymite

Copy link
Copy Markdown
Collaborator

Adds the following aave agent contracts to be used by the chaos-agents middleware:

  • AaveCapsAgent
  • AaveDiscountRateAgent
  • AaveEModeAgent
  • AaveRatesAgent
  • AaveCapoAgent

@kyzia551 kyzia551 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bettet to add strict updateType check on all agents

Comment thread src/contracts/agent/AaveCapsAgent.sol Outdated
Comment on lines +42 to +44
uint256 currentCap = update.updateType.equal('SupplyCapUpdate')
? POOL.getConfiguration(update.market).getSupplyCap()
: POOL.getConfiguration(update.market).getBorrowCap();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would change it to

Suggested change
uint256 currentCap = update.updateType.equal('SupplyCapUpdate')
? POOL.getConfiguration(update.market).getSupplyCap()
: POOL.getConfiguration(update.market).getBorrowCap();
uint256 currentCap = 0;
if(update.updateType.equal('SupplyCapUpdate')) {
currentCap = POOL.getConfiguration(update.market).getSupplyCap();
} else if(update.updateType.equal('BorrowCapUpdate')) {
currentCap = POOL.getConfiguration(update.market).getBorrowCap();
} else {
revert WrongUpdateType(update.updateType.);
}

@kyzia551
kyzia551 merged commit 056b38a into main Dec 11, 2025
1 check passed
@kyzia551
kyzia551 deleted the feat/aave-agents branch December 11, 2025 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants