chore: Curve added ETH/CRV pool (#378)

This commit is contained in:
Jacob Evans
2021-12-01 14:51:47 +10:00
committed by Noah Khamliche
parent e844bb8e38
commit 789f16bf5b
3 changed files with 24 additions and 1 deletions

View File

@@ -1,4 +1,13 @@
[
{
"version": "16.39.0",
"changes": [
{
"note": "Curve ETH/CRV pool",
"pr": 378
}
]
},
{
"version": "16.38.0",
"changes": [

View File

@@ -579,6 +579,7 @@ export const CURVE_POOLS = {
cvxcrv: '0x9d0464996170c6b9e75eed71c68b99ddedf279e8',
mim: '0x5a6a4d54456819380173272a5e8e9b9904bdf41b',
eurt: '0xfd5db7463a3ab53fd211b4af195c5bccc1a03890',
ethcrv: '0x8301ae4fc9c624d1d396cbdaa1ed877821d7c511',
};
export const CURVE_V2_POOLS = {
@@ -1062,6 +1063,17 @@ export const CURVE_MAINNET_INFOS: { [name: string]: CurveInfo } = {
pool: CURVE_POOLS.cvxcrv,
gasSchedule: 105e3,
}),
[CURVE_POOLS.ethcrv]: {
...createCurveExchangePool({
// This pool uses ETH
tokens: [MAINNET_TOKENS.WETH, MAINNET_TOKENS.CRV],
pool: CURVE_POOLS.ethcrv,
gasSchedule: 350e3,
}),
// This pool has a custom get_dy and exchange selector with uint256
sellQuoteFunctionSelector: CurveFunctionSelectors.get_dy_uint256,
exchangeFunctionSelector: CurveFunctionSelectors.exchange_underlying_uint256,
},
};
export const CURVE_V2_MAINNET_INFOS: { [name: string]: CurveInfo } = {

View File

@@ -116,8 +116,10 @@ export enum CurveFunctionSelectors {
exchange_underlying = '0xa6417ed6',
get_dy_underlying = '0x07211ef7',
get_dx_underlying = '0x0e71d1b9',
get_dy = '0x5e0d443f',
get_dy = '0x5e0d443f', // get_dy(int128,int128,uint256)
get_dx = '0x67df02ca',
get_dy_uint256 = '0x556d6e9f', // get_dy(uint256,uint256,uint256)
exchange_underlying_uint256 = '0x65b2489b', // exchange_underlying(uint256,uint256,uint256,uint256)
// Curve V2
exchange_v2 = '0x5b41b908',
exchange_underlying_v2 = '0x65b2489b',