Request form
Contango V2
  • DeFi
  • Perps
  • Audited
Docs
Source
ChefGPT

Bringing expirables to DeFi

IERC7399.sol
AccessControlUpgradeable.sol
IAccessControlUpgradeable.sol
draft-IERC1822Upgradeable.sol
IERC1967Upgradeable.sol
IBeaconUpgradeable.sol
ERC1967UpgradeUpgradeable.sol
Initializable.sol
UUPSUpgradeable.sol
PausableUpgradeable.sol
ReentrancyGuardUpgradeable.sol
AddressUpgradeable.sol
ContextUpgradeable.sol
ERC165Upgradeable.sol
IERC165Upgradeable.sol
MathUpgradeable.sol
SignedMathUpgradeable.sol
StorageSlotUpgradeable.sol
StringsUpgradeable.sol
AccessControl.sol
IAccessControl.sol
Ownable.sol
IERC4626.sol
IBeacon.sol
UpgradeableBeacon.sol
Clones.sol
Proxy.sol
IERC20Metadata.sol
IERC20Permit.sol
IERC20.sol
SafeERC20.sol
ERC721.sol
IERC721Metadata.sol
IERC721.sol
IERC721Receiver.sol
Address.sol
Context.sol
ERC165.sol
IERC165.sol
Math.sol
SafeCast.sol
SignedMath.sol
Multicall.sol
Strings.sol
Contango.sol
FeeManager.sol
Maestro.sol
OrderManager.sol
OrderManagerArbitrum.sol
OrderManagerOptimism.sol
PositionNFT.sol
ReferralManager.sol
Vault.sol
ArbGasInfo.sol
GasPriceOracle.sol
IWETH9.sol
Uniswap.sol
IContango.sol
IFeeManager.sol
IFeeModel.sol
IMaestro.sol
IOracle.sol
IOrderManager.sol
IReferralManager.sol
IVault.sol
Arrays.sol
BitFlags.sol
DataTypes.sol
ERC20Lib.sol
Errors.sol
PositionIdExt.sol
MathLib.sol
Roles.sol
Validations.sol
FixedFeeModel.sol
AaveMoneyMarket.sol
AaveMoneyMarketView.sol
AaveDataTypes.sol
FlashLoanReceiverBase.sol
IAaveOracle.sol
IAaveRewardsController.sol
IFlashLoanReceiver.sol
IPool.sol
IPoolAddressesProvider.sol
IPoolDataProvider.sol
IPriceOracleGetter.sol
Spark.sol
SparkMoneyMarket.sol
SparkMoneyMarketView.sol
BaseMoneyMarket.sol
CompoundMoneyMarket.sol
CompoundMoneyMarketView.sol
CompoundReverseLookup.sol
ComptrollerErrorReporter.sol
IChainlinkPriceOracle.sol
IComptroller.sol
ICToken.sol
IUniswapAnchoredView.sol
SonneMoneyMarketView.sol
IAuditor.sol
IExactlyRewardsController.sol
IInterestRateModel.sol
IMarket.sol
ExactlyMoneyMarket.sol
ExactlyMoneyMarketView.sol
ExactlyReverseLookup.sol
ImmutableBeaconProxy.sol
IFlashBorrowProvider.sol
IMoneyMarket.sol
IMoneyMarketView.sol
IUnderlyingPositionFactory.sol
IIrm.sol
IMorpho.sol
IMorphoOracle.sol
MarketParamsLib.sol
MathLib.sol
SharesMathLib.sol
MorphoBlueMoneyMarket.sol
MorphoBlueMoneyMarketView.sol
MorphoBlueReverseLookup.sol
UnderlyingPositionFactory.sol
UpgradeableBeaconWithOwner.sol
AaveOracle.sol
SimpleSpotExecutor.sol
SpotExecutor.sol

TVL

$1.96M

Chains

Authors

Contango V2
  • DeFi
  • Perps
  • Audited
Info
Source
ChefGPT
Expand
Share

Get Cookin'

Authors

Contango Protocol V2

Contango V2 is a new way of building perpetual contracts on top of existing money markets. When a trader opens a position, the protocol borrows on a money market, swaps on the spot market, then lends back on the same money market. Join us at contango.xyz.

Warning

This code is provided as-is, with no guarantees of any kind.

Pre Requisites

Before running any command, make sure to install dependencies:

$ forge install

Lint

$ forge fmt

Test

Be sure to have an .env file located at root (or to have the following ENV variables)
MAINNET_URL=<your rpc url>
ARBITRUM_URL=<your rpc url>
OPTIMISM_URL=<your rpc url>
POLYGON_URL=<your rpc url>

Compile and test the smart contracts with Foundry:

$ forge test

Supported scenarios

All supported scenarios when creating/modifying/closing a position are linked in this sheet along with its corresponding tests

Bug Bounty

Contango is not offering bounties for bugs disclosed whilst our audits are in place, but if you wish to report a bug, please do so at security@contango.xyz. Please include full details of the vulnerability and steps/code to reproduce. We ask that you permit us time to review and remediate any findings before public disclosure.

License

Unless the opposite is explicitly stated on the file header, all files in this repository are released under the BSL 1.1 license.

Bringing expirables to DeFi
IERC7399.sol
AccessControlUpgradeable.sol
IAccessControlUpgradeable.sol
draft-IERC1822Upgradeable.sol
IERC1967Upgradeable.sol
IBeaconUpgradeable.sol
ERC1967UpgradeUpgradeable.sol
Initializable.sol
UUPSUpgradeable.sol
PausableUpgradeable.sol
ReentrancyGuardUpgradeable.sol
AddressUpgradeable.sol
ContextUpgradeable.sol
ERC165Upgradeable.sol
IERC165Upgradeable.sol
MathUpgradeable.sol
SignedMathUpgradeable.sol
StorageSlotUpgradeable.sol
StringsUpgradeable.sol
AccessControl.sol
IAccessControl.sol
Ownable.sol
IERC4626.sol
IBeacon.sol
UpgradeableBeacon.sol
Clones.sol
Proxy.sol
IERC20Metadata.sol
IERC20Permit.sol
IERC20.sol
SafeERC20.sol
ERC721.sol
IERC721Metadata.sol
IERC721.sol
IERC721Receiver.sol
Address.sol
Context.sol
ERC165.sol
IERC165.sol
Math.sol
SafeCast.sol
SignedMath.sol
Multicall.sol
Strings.sol
Contango.sol
FeeManager.sol
Maestro.sol
OrderManager.sol
OrderManagerArbitrum.sol
OrderManagerOptimism.sol
PositionNFT.sol
ReferralManager.sol
Vault.sol
ArbGasInfo.sol
GasPriceOracle.sol
IWETH9.sol
Uniswap.sol
IContango.sol
IFeeManager.sol
IFeeModel.sol
IMaestro.sol
IOracle.sol
IOrderManager.sol
IReferralManager.sol
IVault.sol
Arrays.sol
BitFlags.sol
DataTypes.sol
ERC20Lib.sol
Errors.sol
PositionIdExt.sol
MathLib.sol
Roles.sol
Validations.sol
FixedFeeModel.sol
AaveMoneyMarket.sol
AaveMoneyMarketView.sol
AaveDataTypes.sol
FlashLoanReceiverBase.sol
IAaveOracle.sol
IAaveRewardsController.sol
IFlashLoanReceiver.sol
IPool.sol
IPoolAddressesProvider.sol
IPoolDataProvider.sol
IPriceOracleGetter.sol
Spark.sol
SparkMoneyMarket.sol
SparkMoneyMarketView.sol
BaseMoneyMarket.sol
CompoundMoneyMarket.sol
CompoundMoneyMarketView.sol
CompoundReverseLookup.sol
ComptrollerErrorReporter.sol
IChainlinkPriceOracle.sol
IComptroller.sol
ICToken.sol
IUniswapAnchoredView.sol
SonneMoneyMarketView.sol
IAuditor.sol
IExactlyRewardsController.sol
IInterestRateModel.sol
IMarket.sol
ExactlyMoneyMarket.sol
ExactlyMoneyMarketView.sol
ExactlyReverseLookup.sol
ImmutableBeaconProxy.sol
IFlashBorrowProvider.sol
IMoneyMarket.sol
IMoneyMarketView.sol
IUnderlyingPositionFactory.sol
IIrm.sol
IMorpho.sol
IMorphoOracle.sol
MarketParamsLib.sol
MathLib.sol
SharesMathLib.sol
MorphoBlueMoneyMarket.sol
MorphoBlueMoneyMarketView.sol
MorphoBlueReverseLookup.sol
UnderlyingPositionFactory.sol
UpgradeableBeaconWithOwner.sol
AaveOracle.sol
SimpleSpotExecutor.sol
SpotExecutor.sol