Skip to content

Commit 892fc12

Browse files
committed
swing trader
1 parent a28966f commit 892fc12

File tree

8 files changed

+1759
-67
lines changed

8 files changed

+1759
-67
lines changed

spot-vaults/contracts/SwingTrader.sol

+662
Large diffs are not rendered by default.

spot-vaults/contracts/_interfaces/errors/CommonErrors.sol

+3
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,6 @@ error UnacceptableSwap();
1818

1919
/// @notice Expected usable external price.
2020
error UnreliablePrice();
21+
22+
/// @notice Expected range to be strictly increasing.
23+
error InvalidRange();
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// SPDX-License-Identifier: BUSL-1.1
2+
pragma solidity ^0.8.24;
3+
4+
/// @notice Exceeded max active redemption requests per account.
5+
error TooManyRedemptionRequests();
6+
7+
/// @notice Exceeded enforced swap limit.
8+
error SwapLimitExceeded();
9+
10+
/// @notice Wait time exceeded enforced limit.
11+
error WaittimeTooHigh();
+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// SPDX-License-Identifier: BUSL-1.1
2+
pragma solidity ^0.8.24;
3+
4+
import { MockERC20 } from "./MockERC20.sol";
5+
6+
contract MockPerp is MockERC20 {
7+
uint256 private _tvl;
8+
function getTVL() public view returns (uint256) {
9+
return _tvl;
10+
}
11+
12+
function setTVL(uint256 tvl) public {
13+
_tvl = tvl;
14+
}
15+
}

0 commit comments

Comments
 (0)