The Ajna protocol is a non-custodial, peer-to-peer, permissionless lending, borrowing and trading system that requires no governance or external price feeds to function.
Clean up logic for kicking off claimable reserve auctions (CRAs), bringing implementation in-line with whitepaper, and reducing gas cost. Expanded an existing unit test to cover some more timing use cases.
Purpose
Whitepaper states:
If two weeks have passed since the completion of the last Claimable Reserve Auction, CRA, any user can kick off a new auction.
The code had been checking whether two weeks passed since the start of the last CRA. It also had some expensive redundant operations.
Expected reduction in gas cost of kickReserveAuction.
Analysis revealed small median gas advantage kicking CRAs in ERC20 pools, where tests were unchanged.
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.
Description
Clean up logic for kicking off claimable reserve auctions (CRAs), bringing implementation in-line with whitepaper, and reducing gas cost. Expanded an existing unit test to cover some more timing use cases.
Purpose
Whitepaper states:
The code had been checking whether two weeks passed since the start of the last CRA. It also had some expensive redundant operations.
L-08
(https://github.com/k1rill-fedoseev/audits/blob/master/solo/Ajna.md)Impact
Expected reduction in gas cost of
kickReserveAuction
. Analysis revealed small median gas advantage kicking CRAs in ERC20 pools, where tests were unchanged.Tasks