Compare commits

...

10 Commits

Author SHA1 Message Date
Github Actions
ec6522cfbf Publish
- @0x/asset-swapper@16.26.2
2021-08-31 07:06:30 +00:00
Github Actions
1bf96e91bb Updated CHANGELOGS & MD docs 2021-08-31 07:06:27 +00:00
Romain Butteaud
eb733cc58f add: Curve new pools (CVX-CRX, MIM, atricrypto3) (#315)
* add: Curve new pools (CVX-CRX, MIM, atricrypto3)

* prettier

* fix: AS CHANGELOG

* fix: update monorepo-scripts
2021-08-30 23:45:47 -07:00
Jacob Evans
d9fdcf813b fix: UST spam by temporarily disabling (#316) 2021-08-31 16:17:17 +10:00
Romain Butteaud
88bd1c9cea add: Curve new pools (CVX-CRX, MIM, atricrypto3) - CHANGELOG (#314)
* add: Curve new pools (CVX-CRX, MIM, atricrypto3)

* prettier

* fix: AS CHANGELOG
2021-08-30 16:19:32 -07:00
Romain Butteaud
9e759e82b4 add: Curve new pools (CVX-CRX, MIM, atricrypto3) (#313)
* add: Curve new pools (CVX-CRX, MIM, atricrypto3)

* prettier
2021-08-30 15:22:10 -07:00
Daniel Pyrathon
da433854ac fix: added prometheus changes on expiration (#308)
* added prometheus changes on expiration

* added unit tests

* prettier

* addressed comments

* remove unused tests

* fix lint:

* Update quote_requestor_test.ts
2021-08-23 13:59:49 -07:00
Github Actions
ed3524e0d7 Publish
- @0x/contracts-zero-ex@0.28.2
 - @0x/asset-swapper@16.26.1
 - @0x/migrations@8.1.3
2021-08-19 23:12:22 +00:00
Github Actions
20e23bf3f6 Updated CHANGELOGS & MD docs 2021-08-19 23:12:19 +00:00
David Walsh
be4f85690e Add ethers as a dependency of @0x/contracts-zero-ex (#310) 2021-08-19 16:25:47 -06:00
13 changed files with 158 additions and 25 deletions

View File

@@ -1,4 +1,14 @@
[
{
"version": "0.28.2",
"changes": [
{
"note": "Add ethers as an explicit dependency",
"pr": 310
}
],
"timestamp": 1629414734
},
{
"timestamp": 1629353596,
"version": "0.28.1",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v0.28.2 - _August 19, 2021_
* Add ethers as an explicit dependency (#310)
## v0.28.1 - _August 19, 2021_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-zero-ex",
"version": "0.28.1",
"version": "0.28.2",
"engines": {
"node": ">=6.12"
},
@@ -90,7 +90,8 @@
"@0x/utils": "^6.4.3",
"@0x/web3-wrapper": "^7.5.3",
"ethereum-types": "^3.5.0",
"ethereumjs-util": "^7.0.10"
"ethereumjs-util": "^7.0.10",
"ethers": "~4.0.4"
},
"publishConfig": {
"access": "public"

View File

@@ -60,7 +60,7 @@
"ignoreDependencyVersionsForPackage": "contract-wrappers"
},
"devDependencies": {
"@0x/monorepo-scripts": "^3.1.7",
"@0x/monorepo-scripts": "^3.2.0",
"@0x-lerna-fork/lerna": "3.16.10",
"@0xproject/npm-cli-login": "^0.0.11",
"async-child-process": "^1.1.1",

View File

@@ -1,4 +1,22 @@
[
{
"version": "16.26.2",
"changes": [
{
"note": "chore: Curve new pools (CVX-CRX, MIM, atricrypto3)"
}
],
"timestamp": 1630393585
},
{
"timestamp": 1629414734,
"version": "16.26.1",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "16.26.0",
"changes": [

View File

@@ -5,6 +5,14 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v16.26.2 - _August 31, 2021_
* chore: Curve new pools (CVX-CRX, MIM, atricrypto3)
## v16.26.1 - _August 19, 2021_
* Dependencies updated
## v16.26.0 - _August 19, 2021_
* feat: Enable partial Native fills to be consumed, previously for v3 they were dropped (#309)

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/asset-swapper",
"version": "16.26.0",
"version": "16.26.2",
"engines": {
"node": ">=6.12"
},
@@ -100,7 +100,7 @@
"@0x/contracts-test-utils": "^5.4.9",
"@0x/contracts-utils": "^4.7.17",
"@0x/mesh-rpc-client": "^9.4.2",
"@0x/migrations": "^8.1.2",
"@0x/migrations": "^8.1.3",
"@0x/sol-compiler": "^4.7.3",
"@0x/subproviders": "^6.5.3",
"@0x/ts-doc-gen": "^0.0.28",

View File

@@ -379,6 +379,8 @@ export const MAINNET_TOKENS = {
ESS: '0x24ae124c4cc33d6791f8e8b63520ed7107ac8b3e',
cvxCRV: '0x62b9c7356a2dc64a1969e19c23e4f579f9810aa7',
CRV: '0xd533a949740bb3306d119cc777fa900ba034cd52',
MIM: '0x99d8a9c45b2eca8864373a26d1459e3dff1e17f3',
EURT: '0xc581b735a1688071a1746c968e0798d642ede491',
};
export const BSC_TOKENS = {
@@ -455,6 +457,9 @@ export const CURVE_POOLS = {
LUSD: '0xed279fdd11ca84beef15af5d39bb4d4bee23f0ca',
BUSD: '0x4807862aa8b2bf68830e4c8dc86d0e9a998e085a',
DSU3CRV: '0x6ec80df362d7042c50d4469bcfbc174c9dd9109a',
cvxcrv: '0x9d0464996170c6b9e75eed71c68b99ddedf279e8',
mim: '0x5a6a4d54456819380173272a5e8e9b9904bdf41b',
eurt: '0xfd5db7463a3ab53fd211b4af195c5bccc1a03890',
};
export const CURVE_V2_POOLS = {
@@ -469,6 +474,7 @@ export const CURVE_POLYGON_POOLS = {
export const CURVE_V2_POLYGON_POOLS = {
atricrypto: '0x3fcd5de6a9fc8a99995c406c77dda3ed7e406f81',
atricrypto3: '0x1d8b86e3d88cdb2d34688e87e72f388cb541b7c8',
};
export const SWERVE_POOLS = {
@@ -576,10 +582,7 @@ export const DEFAULT_TOKEN_ADJACENCY_GRAPH_BY_CHAIN_ID = valueByChainId<TokenAdj
})
.tap(builder => {
// Mirror Protocol
builder
.add(MAINNET_TOKENS.MIR, MAINNET_TOKENS.UST)
.add(MAINNET_TOKENS.UST, [MAINNET_TOKENS.MIR, ...Object.values(MIRROR_WRAPPED_TOKENS)]);
Object.values(MIRROR_WRAPPED_TOKENS).forEach(t => builder.add(t, MAINNET_TOKENS.UST));
builder.add(MAINNET_TOKENS.MIR, MAINNET_TOKENS.UST);
// Convex and Curve
builder.add(MAINNET_TOKENS.cvxCRV, MAINNET_TOKENS.CRV).add(MAINNET_TOKENS.CRV, MAINNET_TOKENS.cvxCRV);
})
@@ -775,6 +778,11 @@ export const CURVE_MAINNET_INFOS: { [name: string]: CurveInfo } = {
pool: CURVE_POOLS.eurs,
gasSchedule: 320e3,
}),
[CURVE_POOLS.eurt]: createCurveExchangePool({
tokens: [MAINNET_TOKENS.EURT, MAINNET_TOKENS.sEUR],
pool: CURVE_POOLS.eurt,
gasSchedule: 320e3,
}),
[CURVE_POOLS.aave]: createCurveExchangeUnderlyingPool({
tokens: [MAINNET_TOKENS.DAI, MAINNET_TOKENS.USDC, MAINNET_TOKENS.USDT],
pool: CURVE_POOLS.aave,
@@ -863,6 +871,16 @@ export const CURVE_MAINNET_INFOS: { [name: string]: CurveInfo } = {
pool: CURVE_POOLS.DSU3CRV,
gasSchedule: 387e3,
}),
[CURVE_POOLS.mim]: createCurveMetaTriPool({
tokens: [MAINNET_TOKENS.MIM],
pool: CURVE_POOLS.mim,
gasSchedule: 300e3,
}),
[CURVE_POOLS.cvxcrv]: createCurveExchangePool({
tokens: [MAINNET_TOKENS.CRV, MAINNET_TOKENS.cvxCRV],
pool: CURVE_POOLS.cvxcrv,
gasSchedule: 105e3,
}),
};
export const CURVE_V2_MAINNET_INFOS: { [name: string]: CurveInfo } = {
@@ -902,6 +920,11 @@ export const CURVE_V2_POLYGON_INFOS: { [name: string]: CurveInfo } = {
pool: CURVE_V2_POLYGON_POOLS.atricrypto,
gasSchedule: 300e3,
}),
[CURVE_V2_POLYGON_POOLS.atricrypto3]: createCurveV2MetaTriPool({
tokens: [POLYGON_TOKENS.WBTC, POLYGON_TOKENS.WETH],
pool: CURVE_V2_POLYGON_POOLS.atricrypto3,
gasSchedule: 300e3,
}),
};
export const SWERVE_MAINNET_INFOS: { [name: string]: CurveInfo } = {

View File

@@ -25,6 +25,7 @@ import {
} from '../types';
import { returnQuoteFromAltMMAsync } from './alt_mm_implementation_utils';
import { ONE_SECOND_MS } from './market_operation_utils/constants';
import { RfqMakerBlacklist } from './rfq_maker_blacklist';
const MAKER_TIMEOUT_STREAK_LENGTH = 10;
@@ -177,6 +178,12 @@ export class QuoteRequestor {
}
}
public static getDurationUntilExpirationMs(expirationTimeSeconds: BigNumber): BigNumber {
const expirationTimeMs = expirationTimeSeconds.times(constants.ONE_SECOND_MS);
const currentTimeMs = new BigNumber(Date.now());
return BigNumber.max(expirationTimeMs.minus(currentTimeMs), 0);
}
private static _makerSupportsPair(
typedMakerUrl: TypedMakerUrl,
makerToken: string,
@@ -361,12 +368,6 @@ export class QuoteRequestor {
return true;
}
private _isExpirationTooSoon(expirationTimeSeconds: BigNumber): boolean {
const expirationTimeMs = expirationTimeSeconds.times(constants.ONE_SECOND_MS);
const currentTimeMs = new BigNumber(Date.now());
return expirationTimeMs.isLessThan(currentTimeMs.plus(this._expiryBufferMs));
}
private async _getQuotesAsync<ResponseT>(
makerToken: string,
takerToken: string,
@@ -587,12 +588,15 @@ export class QuoteRequestor {
return false;
}
const isLastLook = Boolean(options.isLastLook);
if (this._isExpirationTooSoon(new BigNumber(order.expiry))) {
const msRemainingUntilExpiration = QuoteRequestor.getDurationUntilExpirationMs(new BigNumber(order.expiry));
const isExpirationTooSoon = msRemainingUntilExpiration.lt(this._expiryBufferMs);
if (isExpirationTooSoon) {
this._warningLogger(order, 'Expiry too soon in RFQ-T firm quote, filtering out');
this._metrics?.incrementExpirationToSoonCounter(isLastLook, order.maker);
return false;
} else {
this._metrics?.measureExpirationForValidOrder(isLastLook, order.maker, order.expiry);
const secondsRemaining = msRemainingUntilExpiration.div(ONE_SECOND_MS);
this._metrics?.measureExpirationForValidOrder(isLastLook, order.maker, secondsRemaining);
const takerAmount = new BigNumber(order.takerAmount);
const fillRatio = takerAmount.div(assetFillAmount);
@@ -673,7 +677,9 @@ export class QuoteRequestor {
this._warningLogger(order, 'Unexpected token or taker address in RFQ order, filtering out');
return false;
}
if (this._isExpirationTooSoon(new BigNumber(order.expiry))) {
const msRemainingUntilExpiration = QuoteRequestor.getDurationUntilExpirationMs(new BigNumber(order.expiry));
const isExpirationTooSoon = msRemainingUntilExpiration.lt(this._expiryBufferMs);
if (isExpirationTooSoon) {
this._warningLogger(order, 'Expiry too soon in RFQ indicative quote, filtering out');
return false;
} else {

View File

@@ -1,4 +1,13 @@
[
{
"timestamp": 1629414734,
"version": "8.1.3",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1629353596,
"version": "8.1.2",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v8.1.3 - _August 19, 2021_
* Dependencies updated
## v8.1.2 - _August 19, 2021_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/migrations",
"version": "8.1.2",
"version": "8.1.3",
"engines": {
"node": ">=6.12"
},
@@ -81,7 +81,7 @@
"@0x/contracts-multisig": "^4.1.38",
"@0x/contracts-staking": "^2.0.45",
"@0x/contracts-utils": "^4.7.17",
"@0x/contracts-zero-ex": "^0.28.1",
"@0x/contracts-zero-ex": "^0.28.2",
"@0x/sol-compiler": "^4.7.3",
"@0x/subproviders": "^6.5.3",
"@0x/typescript-typings": "^5.2.0",

View File

@@ -902,12 +902,13 @@
web3-providers "^2.0.0-alpha.1"
websocket "^1.0.29"
"@0x/monorepo-scripts@^3.1.7":
version "3.1.7"
resolved "https://registry.yarnpkg.com/@0x/monorepo-scripts/-/monorepo-scripts-3.1.7.tgz#17e719b9e26875958562532ed705cd770d107a43"
"@0x/monorepo-scripts@^3.2.0":
version "3.2.0"
resolved "https://registry.yarnpkg.com/@0x/monorepo-scripts/-/monorepo-scripts-3.2.0.tgz#a4cacf2fd7f4d8f23cd042e4f6aa8fe360aa2c08"
integrity sha512-5z6LYHUIIyZOBGZALZL23LZ76NFfNF9B8IgZS4Oc+j6fFj2bFgTzyj8KqpYHOQXtYmFAom4lSfBelvP9li/oGQ==
dependencies:
"@0x/types" "^3.3.3"
"@0x/utils" "^6.4.3"
"@0x/types" "^3.3.4"
"@0x/utils" "^6.4.4"
"@lerna/batch-packages" "^3.0.0-beta.18"
"@types/depcheck" "^0.6.0"
"@types/node" "12.12.54"
@@ -1140,6 +1141,15 @@
bignumber.js "~9.0.0"
ethereum-types "^3.5.0"
"@0x/types@^3.3.4":
version "3.3.4"
resolved "https://registry.yarnpkg.com/@0x/types/-/types-3.3.4.tgz#184946b1674f7f5b4cfb73105952b499a67fc23e"
integrity sha512-lB6maU/D1TEBrJXQcbwzGilmugX9qrfhxbyPr8r89TinSHe2SS694tTKIyI+ijnTbhyVjWzEnA95iuWxhPmP5g==
dependencies:
"@types/node" "12.12.54"
bignumber.js "~9.0.0"
ethereum-types "^3.6.0"
"@0x/typescript-typings@^5.0.1", "@0x/typescript-typings@^5.1.5":
version "5.1.5"
resolved "https://registry.yarnpkg.com/@0x/typescript-typings/-/typescript-typings-5.1.5.tgz#dd0ad20ef42dad9d054886fd1da72839145b5863"
@@ -1173,6 +1183,18 @@
ethereum-types "^3.5.0"
popper.js "1.14.3"
"@0x/typescript-typings@^5.2.1":
version "5.2.1"
resolved "https://registry.yarnpkg.com/@0x/typescript-typings/-/typescript-typings-5.2.1.tgz#bc82d0f39688b174142ebb5b2fd6a01c1d2f0163"
integrity sha512-2yswstFMy/cpF+MrJclEZc8BNceBAVovwzRYdz1CyGPfzMT1Kh8jVGeexx0KvVw58KrhxMgcRD4mzCSHNqzjPA==
dependencies:
"@types/bn.js" "^4.11.0"
"@types/node" "12.12.54"
"@types/react" "*"
bignumber.js "~9.0.0"
ethereum-types "^3.6.0"
popper.js "1.14.3"
"@0x/utils@^5.1.1", "@0x/utils@^5.4.0", "@0x/utils@^5.4.1":
version "5.6.4"
resolved "https://registry.yarnpkg.com/@0x/utils/-/utils-5.6.4.tgz#0158ec3243bbee444d90afbd79981321d19ccdfd"
@@ -1228,6 +1250,26 @@
js-sha3 "^0.7.0"
lodash "^4.17.11"
"@0x/utils@^6.4.4":
version "6.4.4"
resolved "https://registry.yarnpkg.com/@0x/utils/-/utils-6.4.4.tgz#de9782a7ee2af77580a98a8c6db010dda7f56b94"
integrity sha512-gTfK14tdMNtsmHC6FCrWz221+MYJNdDBdhA1hhnT+Kvru22uvhdTpP2udy7296/4yHZaEkDt5ZkvgJMsJCEhbg==
dependencies:
"@0x/types" "^3.3.4"
"@0x/typescript-typings" "^5.2.1"
"@types/mocha" "^5.2.7"
"@types/node" "12.12.54"
abortcontroller-polyfill "^1.1.9"
bignumber.js "~9.0.0"
chalk "^2.3.0"
detect-node "2.0.3"
ethereum-types "^3.6.0"
ethereumjs-util "^7.1.0"
ethers "~4.0.4"
isomorphic-fetch "2.2.1"
js-sha3 "^0.7.0"
lodash "^4.17.11"
"@0x/web3-wrapper@^7.5.3":
version "7.5.3"
resolved "https://registry.yarnpkg.com/@0x/web3-wrapper/-/web3-wrapper-7.5.3.tgz#f36c3a2e5ffcbca2b3deef1a15e7485eb91dba7e"
@@ -5805,6 +5847,14 @@ ethereum-types@^3.5.0:
"@types/node" "12.12.54"
bignumber.js "~9.0.0"
ethereum-types@^3.6.0:
version "3.6.0"
resolved "https://registry.yarnpkg.com/ethereum-types/-/ethereum-types-3.6.0.tgz#7cf0a7258537b1f8d113dd51d050189a742a9a6e"
integrity sha512-iJX96C9W1elWhCZKUiSQfWn9fC+EO+xU2TvAE/p7QhMwcGibihKsxcG27B/4WZAudd8jNoeIhY4PH2qQPLuUfw==
dependencies:
"@types/node" "12.12.54"
bignumber.js "~9.0.0"
ethereumjs-abi@0.6.5:
version "0.6.5"
resolved "https://registry.yarnpkg.com/ethereumjs-abi/-/ethereumjs-abi-0.6.5.tgz#5a637ef16ab43473fa72a29ad90871405b3f5241"