-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from IndexCoop/ek/fix-auction-params
[Fix] Change Config values to use BigNumber; Re-align component ordering in arrays
- Loading branch information
Showing
6 changed files
with
45 additions
and
47 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,31 @@ | ||
import { BigNumber, ethers } from "ethers"; | ||
|
||
export type AuctionConfig = { | ||
priceAdapterName: string; | ||
priceAdapterAddress: string; | ||
quoteAsset: string; | ||
bucketSize: number; | ||
slopeForSellComponents: number; | ||
slopeForBuyComponents: number; | ||
slopeForSellComponents: BigNumber; | ||
slopeForBuyComponents: BigNumber; | ||
shouldLockSetToken: boolean; | ||
rebalanceDuration: number; | ||
initialPricePctSellComponents: number; | ||
initialPricePctBuyComponents: number; | ||
maxPriceAsPercentOfMarketPrice: number; | ||
minPriceAsPercentOfMarketPrice: number; | ||
initialPriceAdjustSellComponents: BigNumber; | ||
initialPriceAdjustBuyComponents: BigNumber; | ||
maxPriceAboveMarketPrice: BigNumber; | ||
minPriceBelowMarketPrice: BigNumber; | ||
}; | ||
|
||
export const DEFAULT_AUCTION_CONFIG: AuctionConfig = { | ||
priceAdapterName: "BoundedStepwiseLinearPriceAdapter", | ||
priceAdapterAddress: "0x237F7BBe0b358415bE84AB6d279D4338C0d026bB", | ||
quoteAsset: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", // WETH | ||
bucketSize: 600, // 10 minutes | ||
slopeForSellComponents: 0.00025, // decrease by 0.00025 WETH each bucket | ||
slopeForBuyComponents: 0.000015, // increase by 0.00001 WETH each bucket | ||
slopeForSellComponents: ethers.utils.parseEther("0.00025"), // decrease by 0.00025 WETH each bucket | ||
slopeForBuyComponents: ethers.utils.parseEther("0.0001"), // increase by 0.00001 WETH each bucket | ||
shouldLockSetToken: false, | ||
rebalanceDuration: 86400, // 1 days | ||
initialPricePctSellComponents: 1.01, // 2% above market price | ||
initialPricePctBuyComponents: 0.99, // 2% below market price | ||
maxPriceAsPercentOfMarketPrice: 1.01, | ||
minPriceAsPercentOfMarketPrice: 0.99, | ||
initialPriceAdjustSellComponents: ethers.utils.parseEther("0.01"), // 1% above market price | ||
initialPriceAdjustBuyComponents: ethers.utils.parseEther("0.01"), // 1% below market price | ||
maxPriceAboveMarketPrice: ethers.utils.parseEther("0.01"), | ||
minPriceBelowMarketPrice: ethers.utils.parseEther("0.01"), | ||
}; |
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