├── .env.example ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md └── workflows │ └── ci.yml ├── .gitignore ├── .gitmodules ├── CHANGELOG.md ├── LICENSE ├── README.md ├── abis ├── Currency.json ├── Feed.json ├── SimpleInterestRate.json └── Vault.json ├── deployConfigs ├── goerli.base.json ├── localnet.json └── sepolia.base.json ├── foundry.toml ├── release.md ├── remappings.txt ├── script ├── base.s.sol └── deploy.s.sol ├── shell └── prepare-artifacts.sh ├── slither.config.json ├── src ├── currency.sol ├── helpers │ └── pausable.sol ├── interfaces │ ├── ICurrency.sol │ ├── IFeed.sol │ ├── IOSM.sol │ ├── IRate.sol │ └── IVault.sol ├── mocks │ └── ERC20Token.sol ├── modules │ ├── feed.sol │ └── rate.sol └── vault.sol └── test ├── base.t.sol ├── fuzz ├── currency │ └── currency.t.sol └── vault │ ├── burnCurrency │ ├── burnCurrency.t.sol │ └── burnCurrency.tree │ ├── depositCollateral │ ├── depositCollateral.t.sol │ └── depositCollateral.tree │ ├── liquidate │ ├── liquidate.t.sol │ └── liquidate.tree │ ├── mintCurrency │ ├── mintCurrency.t.sol │ └── mintCurrency.tree │ ├── otherActions │ ├── otherActions.t.sol │ └── roleBasedActions.t.sol │ └── withdrawCollateral │ ├── withdrawCollateral.t.sol │ └── withdrawCollateral.tree ├── helpers └── ErrorsAndEvents.sol └── invariant ├── baseInvariant.t.sol ├── collateralInvariant.t.sol ├── globalInvariant.t.sol ├── handlers ├── erc20Handler.sol ├── feedHandler.sol ├── medianHandler.sol ├── osmHandler.sol └── vaultHandler.sol ├── helpers ├── timeManager.sol └── vaultGetters.sol └── userVaultInvariant.t.sol /.env.example: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/.env.example -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/.github/ISSUE_TEMPLATE/bug_report.md -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/.github/ISSUE_TEMPLATE/feature_request.md -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/.github/workflows/ci.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/.gitignore -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/.gitmodules -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/CHANGELOG.md -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/README.md -------------------------------------------------------------------------------- /abis/Currency.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/abis/Currency.json -------------------------------------------------------------------------------- /abis/Feed.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/abis/Feed.json -------------------------------------------------------------------------------- /abis/SimpleInterestRate.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/abis/SimpleInterestRate.json -------------------------------------------------------------------------------- /abis/Vault.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/abis/Vault.json -------------------------------------------------------------------------------- /deployConfigs/goerli.base.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/deployConfigs/goerli.base.json -------------------------------------------------------------------------------- /deployConfigs/localnet.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/deployConfigs/localnet.json -------------------------------------------------------------------------------- /deployConfigs/sepolia.base.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/deployConfigs/sepolia.base.json -------------------------------------------------------------------------------- /foundry.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/foundry.toml -------------------------------------------------------------------------------- /release.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/release.md -------------------------------------------------------------------------------- /remappings.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/remappings.txt -------------------------------------------------------------------------------- /script/base.s.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/script/base.s.sol -------------------------------------------------------------------------------- /script/deploy.s.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/script/deploy.s.sol -------------------------------------------------------------------------------- /shell/prepare-artifacts.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/shell/prepare-artifacts.sh -------------------------------------------------------------------------------- /slither.config.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/slither.config.json -------------------------------------------------------------------------------- /src/currency.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/src/currency.sol -------------------------------------------------------------------------------- /src/helpers/pausable.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/src/helpers/pausable.sol -------------------------------------------------------------------------------- /src/interfaces/ICurrency.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/src/interfaces/ICurrency.sol -------------------------------------------------------------------------------- /src/interfaces/IFeed.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/src/interfaces/IFeed.sol -------------------------------------------------------------------------------- /src/interfaces/IOSM.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/src/interfaces/IOSM.sol -------------------------------------------------------------------------------- /src/interfaces/IRate.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/src/interfaces/IRate.sol -------------------------------------------------------------------------------- /src/interfaces/IVault.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/src/interfaces/IVault.sol -------------------------------------------------------------------------------- /src/mocks/ERC20Token.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/src/mocks/ERC20Token.sol -------------------------------------------------------------------------------- /src/modules/feed.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/src/modules/feed.sol -------------------------------------------------------------------------------- /src/modules/rate.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/src/modules/rate.sol -------------------------------------------------------------------------------- /src/vault.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/src/vault.sol -------------------------------------------------------------------------------- /test/base.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/test/base.t.sol -------------------------------------------------------------------------------- /test/fuzz/currency/currency.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/test/fuzz/currency/currency.t.sol -------------------------------------------------------------------------------- /test/fuzz/vault/burnCurrency/burnCurrency.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/test/fuzz/vault/burnCurrency/burnCurrency.t.sol -------------------------------------------------------------------------------- /test/fuzz/vault/burnCurrency/burnCurrency.tree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/test/fuzz/vault/burnCurrency/burnCurrency.tree -------------------------------------------------------------------------------- /test/fuzz/vault/depositCollateral/depositCollateral.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/test/fuzz/vault/depositCollateral/depositCollateral.t.sol -------------------------------------------------------------------------------- /test/fuzz/vault/depositCollateral/depositCollateral.tree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/test/fuzz/vault/depositCollateral/depositCollateral.tree -------------------------------------------------------------------------------- /test/fuzz/vault/liquidate/liquidate.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/test/fuzz/vault/liquidate/liquidate.t.sol -------------------------------------------------------------------------------- /test/fuzz/vault/liquidate/liquidate.tree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/test/fuzz/vault/liquidate/liquidate.tree -------------------------------------------------------------------------------- /test/fuzz/vault/mintCurrency/mintCurrency.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/test/fuzz/vault/mintCurrency/mintCurrency.t.sol -------------------------------------------------------------------------------- /test/fuzz/vault/mintCurrency/mintCurrency.tree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/test/fuzz/vault/mintCurrency/mintCurrency.tree -------------------------------------------------------------------------------- /test/fuzz/vault/otherActions/otherActions.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/test/fuzz/vault/otherActions/otherActions.t.sol -------------------------------------------------------------------------------- /test/fuzz/vault/otherActions/roleBasedActions.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/test/fuzz/vault/otherActions/roleBasedActions.t.sol -------------------------------------------------------------------------------- /test/fuzz/vault/withdrawCollateral/withdrawCollateral.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/test/fuzz/vault/withdrawCollateral/withdrawCollateral.t.sol -------------------------------------------------------------------------------- /test/fuzz/vault/withdrawCollateral/withdrawCollateral.tree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/test/fuzz/vault/withdrawCollateral/withdrawCollateral.tree -------------------------------------------------------------------------------- /test/helpers/ErrorsAndEvents.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/test/helpers/ErrorsAndEvents.sol -------------------------------------------------------------------------------- /test/invariant/baseInvariant.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/test/invariant/baseInvariant.t.sol -------------------------------------------------------------------------------- /test/invariant/collateralInvariant.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/test/invariant/collateralInvariant.t.sol -------------------------------------------------------------------------------- /test/invariant/globalInvariant.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/test/invariant/globalInvariant.t.sol -------------------------------------------------------------------------------- /test/invariant/handlers/erc20Handler.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/test/invariant/handlers/erc20Handler.sol -------------------------------------------------------------------------------- /test/invariant/handlers/feedHandler.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/test/invariant/handlers/feedHandler.sol -------------------------------------------------------------------------------- /test/invariant/handlers/medianHandler.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/test/invariant/handlers/medianHandler.sol -------------------------------------------------------------------------------- /test/invariant/handlers/osmHandler.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/test/invariant/handlers/osmHandler.sol -------------------------------------------------------------------------------- /test/invariant/handlers/vaultHandler.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/test/invariant/handlers/vaultHandler.sol -------------------------------------------------------------------------------- /test/invariant/helpers/timeManager.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/test/invariant/helpers/timeManager.sol -------------------------------------------------------------------------------- /test/invariant/helpers/vaultGetters.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/test/invariant/helpers/vaultGetters.sol -------------------------------------------------------------------------------- /test/invariant/userVaultInvariant.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Descent-Collective/protocol-core/HEAD/test/invariant/userVaultInvariant.t.sol --------------------------------------------------------------------------------