Skip to content
Request an audit

‹ All findings

Contracts should inherit their interfaces

Low/InfoNftperp Exchange·Three Sigma · NFT perpetuals · 2nd January, 20243S-NFTPerp-N05

Description

To avoid differences between the function declarations in the contracts and their interfaces, it is a good practice for contracts to inherit their interfaces.

At the moment the AMM contract doesn't inherit the IAMM interface and this leads to problems of functions existing in the interface but not the contract.

For instance, functions getInitializationPrice(), getLiquidationParams() and getReservesAndTotalLiquidity(). In the future a user might try to interact with the protocol using the interface, but the call would certainly revert due to this issue.

Status

Acknowledged