Skip to content

Commit 5b29e35

Browse files
authored
updated fee policy to allow non-zero fees when dr is inside expected range (#258)
1 parent ece590b commit 5b29e35

File tree

2 files changed

+0
-17
lines changed

2 files changed

+0
-17
lines changed

spot-contracts/contracts/FeePolicy.sol

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,6 @@ contract FeePolicy is IFeePolicy, OwnableUpgradeable {
175175
// Expect DR to be non-decreasing, x1 <= x2
176176
bool validFees = ((feeFnDRDown_.x1 <= feeFnDRDown_.x2) && (feeFnDRUp_.x1 <= feeFnDRUp_.x2));
177177

178-
// Expect equilibrium zone to be valid
179-
validFees = ((feeFnDRDown_.x2 <= ONE) && (feeFnDRUp_.x1 >= ONE)) && validFees;
180-
181178
// Expect fees to be non-decreasing when dr moves away from 1.0
182179
validFees = ((feeFnDRDown_.y1 >= feeFnDRDown_.y2) && (feeFnDRUp_.y1 <= feeFnDRUp_.y2)) && validFees;
183180

spot-contracts/test/FeePolicy.ts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -148,20 +148,6 @@ describe("FeePolicy", function () {
148148
);
149149
});
150150

151-
it("equilibrium zone crosses 1.0", async function () {
152-
const badDown = toLine("0.0", "1.0", "1.1", "0.0");
153-
await expect(feePolicy.connect(deployer).updateFees(badDown, VALID_UP)).to.be.revertedWithCustomError(
154-
feePolicy,
155-
"InvalidFees",
156-
);
157-
158-
const badUp = toLine("0.9", "0.0", "2.0", "1.0");
159-
await expect(feePolicy.connect(deployer).updateFees(VALID_DOWN, badUp)).to.be.revertedWithCustomError(
160-
feePolicy,
161-
"InvalidFees",
162-
);
163-
});
164-
165151
it("fees not monotonic wrt distance from 1.0", async function () {
166152
const badDown = toLine("0.0", "0.0", "1.0", "1.0");
167153
await expect(feePolicy.connect(deployer).updateFees(badDown, VALID_UP)).to.be.revertedWithCustomError(

0 commit comments

Comments
 (0)