Enzyme

Calculate a rebalancing for an Enzyme vault. The minimal params are:

  • signer: Address

  • vault: Address

  • baseEntries (If an empty array is passed all vault tokens are considered as base allocation)

  • targetEntries

Request a rebalancing for an enzyme vault with a target allocation.

post
Header parameters
x-api-keystringOptional

31Third API key (Request via [email protected])

chain-idstringOptional

Chain ID as hex string. (e.g.: 0x1 for Ethereum mainnet)

Body
signerstringRequired

The wallet that is used to sign the rebalancing and send it on-chain.

Example: 0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B
maxDeviationFromTargetnumber · min: 0.001 · max: 1Optional

Maximum deviation from the target allocation. (0.01 = 1%)

Default: 0.005
maxSlippagenumber · max: 1Optional

Maximum allowed slippage for the calculated trades. (0.01 = 1%)

Default: 0.005
maxPriceImpactnumber · max: 1Optional

Max price impact for the calculated basket trade. (0.01 = 1%)

Default: 0.01
priceImpactExceedsErrorbooleanOptional

If true an error is returned if the price impact is exceeded. Otherwise an issue (warning) is added to the response. Defaults to false.

Default: false
minExpirySecnumber · min: 10 · max: 120Optional

Min quote expiry. (in seconds) RFQ/OTC quotes from market makers have hard expiries between 40-90 seconds. If minExpiry is set higher then MM expiries these MMs are excluded. (Keep in mind that MM pricing might be better than DEX pricing, especially if quantity is high)

Default: 35
minTradeValuenumberOptional

Min trade value. (in USD) The smart order router ignores potential trades with a value smaller than minTradeValue. Super small value trades often lead to execution issues, therefore we skip trades smaller than $1 by default.

Default: 1
batchTradebooleanOptional

Describes if batch trading should be enabled (if not trades can be executed one-by-one)

Default: trueExample: true
revertOnErrorbooleanOptional

Describes if the batch execution should revert if one trade fails. Otherwise the already positive executed trades are settled.

Default: true
skipBalanceValidationbooleanOptional

Describes if balance check should be skipped. (Can be useful for testing).

Default: false
failOnMissingPricePairbooleanOptional

If true, an exception is thrown, indicating that no price pair can be found for at least one of the tokens. (Only assets with a balance greater than 0 are considered.) If false, the rebalancing is still calculated without considering the tokens with no pairs.

Default: falseExample: true
asyncbooleanOptional

If true the rebalancing will be calculated asynchronously. The progress can be checked with the responded id

Default: falseExample: true
simulationTxOriginstringRequired

[FOR TENDERLY SIMULATION] Address that should be used instead of signer. Can be useful for Tenderly simulation if simulating an Enzyme vault you're not the owner of.

Example: 0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B
vaultstringRequired

Vault for which the rebalancing is calculated.

Example: 0x1b83ba4527C837d462D5b78d65A097dABae5ea89
testnetbooleanOptional

Activate testnet. (Just for Polygon)

Default: false
Responses
200Success
application/json
post
/1.3/rebalancing/enzyme
200Success

Last updated