code-423n4 / 2021-12-amun-findings

0 stars 0 forks source link

Cache `bs.token.length` in `BacketFacet.sol` #246

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago

Handle

0x0x0x

Vulnerability details

In calcTokensForAmountExit and calcTokensForAmount, bs.token.length is used thrice. It would be more gas efficient to simply cache it.

0xleastwood commented 2 years ago

Duplicate of #249 from same warden.