ajna-core
ajna-core copied to clipboard
Update `_assertAuction` to check borrower `t0ReserveSettleAmount` and add invariant A10
Description
- Update
auctionInfo
to return borrowert0ReserveSettleAmount
from the pool. - Update
_assertAuction
to check borrowert0ReserveSettleAmount
. - Add invariant A10: Upon kick
t0ReserveSettleAmount
should be set toBorrowerT0Debt * borrowFeeRate / 2
for the kicked borrower - Update
LOANS_COUNT
inERC20PoolPositionsInvariants
from500
to320
to resolve theEvmError: MemoryLimitOOG
error while running tests. This started to fail becauseauctionInfo
updated to returnt0ReserveSettleAmount
now.
Purpose
Impact
- This PR includes src changes to return
t0ReserveSettleAmount
. This PR can be used for testing only to avoid contracts redeployment as there is no real need for user to know how much bad debt can be settled through reserves at the time of settlement.
Tasks
- [x] Changes to protocol contracts are covered by unit tests executed by CI.
- [x] Protocol contract size limits have not been exceeded.
- [x] Gas consumption for impacted transactions have been compared with the target branch, and nontrivial changes cited in the Impact section above.
- [x] Scope labels have been assigned as appropriate.
- [x] Invariant tests have been manually executed as appropriate for the nature of the change.