ajna-finance / ajna-core

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.
https://www.ajna.finance/
Other
31 stars 11 forks source link

PROTOTECH 49: Revert nicely if no `decimals()` method exists QT or CT #864

Closed ith-harvey closed 1 year ago

ith-harvey commented 1 year ago

Description of change

High level

Description of bug or vulnerability and solution

Contract size

Pre Change

============ Deployment Bytecode Sizes ============
  ERC721Pool               -  24,386B  (99.22%)
  ERC20Pool                -  23,614B  (96.08%)
  PositionManager          -  19,302B  (78.54%)
  PositionNFTSVG           -  15,257B  (62.08%)
  TakerActions             -  15,104B  (61.46%)
  PoolInfoUtils            -  13,622B  (55.43%)
  BorrowerActions          -  12,357B  (50.28%)
  LenderActions            -  10,581B  (43.05%)
  KickerActions            -  10,435B  (42.46%)
  SettlerActions           -   9,270B  (37.72%)
  PoolCommons              -   9,082B  (36.95%)
  RewardsManager           -   8,522B  (34.67%)
  ERC721                   -   4,276B  (17.40%)
  ERC721PoolFactory        -   3,361B  (13.68%)
  LPActions                -   2,952B  (12.01%)
  ERC20PoolFactory         -   2,602B  (10.59%)
  ERC20                    -   2,114B  (8.60%)
  Address                  -      86B  (0.35%)
  Base64                   -      86B  (0.35%)
  Buckets                  -      86B  (0.35%)
  ClonesWithImmutableArgs  -      86B  (0.35%)
  Deposits                 -      86B  (0.35%)
  ECDSA                    -      86B  (0.35%)
  EnumerableSet            -      86B  (0.35%)
  Loans                    -      86B  (0.35%)
  Math                     -      86B  (0.35%)
  Maths                    -      86B  (0.35%)
  PRBMath                  -      86B  (0.35%)
  PRBMathSD59x18           -      86B  (0.35%)
  PRBMathUD60x18           -      86B  (0.35%)
  SafeCast                 -      86B  (0.35%)
  SafeERC20                -      86B  (0.35%)
  SignatureChecker         -      86B  (0.35%)
  Strings                  -      86B  (0.35%)
  Clone                    -      63B  (0.26%)

Post Change

============ Deployment Bytecode Sizes ============
  ERC721Pool               -  24,386B  (99.22%)
  ERC20Pool                -  23,614B  (96.08%)
  PositionManager          -  19,171B  (78.00%)
  PositionNFTSVG           -  15,257B  (62.08%)
  TakerActions             -  15,104B  (61.46%)
  PoolInfoUtils            -  13,622B  (55.43%)
  BorrowerActions          -  12,357B  (50.28%)
  LenderActions            -  10,581B  (43.05%)
  KickerActions            -  10,435B  (42.46%)
  SettlerActions           -   9,270B  (37.72%)
  PoolCommons              -   9,082B  (36.95%)
  RewardsManager           -   8,522B  (34.67%)
  ERC721                   -   4,276B  (17.40%)
  ERC721PoolFactory        -   3,615B  (14.71%)
  LPActions                -   2,952B  (12.01%)
  ERC20PoolFactory         -   2,904B  (11.82%)
  ERC20                    -   2,114B  (8.60%)
  Address                  -      86B  (0.35%)
  Base64                   -      86B  (0.35%)
  Buckets                  -      86B  (0.35%)
  ClonesWithImmutableArgs  -      86B  (0.35%)
  Deposits                 -      86B  (0.35%)
  EnumerableSet            -      86B  (0.35%)
  Loans                    -      86B  (0.35%)
  Math                     -      86B  (0.35%)
  Maths                    -      86B  (0.35%)
  PRBMath                  -      86B  (0.35%)
  PRBMathSD59x18           -      86B  (0.35%)
  PRBMathUD60x18           -      86B  (0.35%)
  SafeCast                 -      86B  (0.35%)
  SafeERC20                -      86B  (0.35%)
  Strings                  -      86B  (0.35%)
  Clone                    -      63B  (0.26%)

Gas usage

Pre Change

## Post Change