-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7654517
commit 9d53869
Showing
24 changed files
with
285 additions
and
718 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// SPDX-License-Identifier: BUSL-1.1 | ||
// Gearbox Protocol. Generalized leverage for DeFi protocols | ||
// (c) Gearbox Foundation, 2024. | ||
pragma solidity ^0.8.23; | ||
|
||
import {IInterestRateModel} from "@gearbox-protocol/core-v3/contracts/interfaces/base/IInterestRateModel.sol"; | ||
|
||
contract DefaultIRM is IInterestRateModel { | ||
uint256 public constant override version = 3_10; | ||
bytes32 public constant override contractType = "IRM_DEFAULT"; | ||
|
||
function calcBorrowRate(uint256, uint256, bool) external pure override returns (uint256) { | ||
return 0; | ||
} | ||
|
||
function availableToBorrow(uint256, uint256) external pure override returns (uint256) { | ||
return 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// SPDX-License-Identifier: BUSL-1.1 | ||
// Gearbox Protocol. Generalized leverage for DeFi protocols | ||
// (c) Gearbox Foundation, 2024. | ||
pragma solidity ^0.8.23; | ||
|
||
import {ACLTrait} from "@gearbox-protocol/core-v3/contracts/traits/ACLTrait.sol"; | ||
|
||
contract DefaultLossPolicy is ACLTrait { | ||
uint256 public constant version = 3_10; | ||
bytes32 public constant contractType = "LOSS_POLICY_DEFAULT"; | ||
|
||
bool public enabled; | ||
|
||
constructor(address acl_) ACLTrait(acl_) {} | ||
|
||
function isLiquidatable(address, address, bytes calldata) external view returns (bool) { | ||
return enabled; | ||
} | ||
|
||
function enable() external configuratorOnly { | ||
enabled = true; | ||
} | ||
|
||
function disable() external configuratorOnly { | ||
enabled = false; | ||
} | ||
} |
Oops, something went wrong.