0xef37…5fc4

All memos sent from and to 0xef37…5fc4.

SlippageAndActions(address recip` ient,address buyToken,uint256 mi`@nAmountOut,bytes[] actions)Slippage(address recipient,addre` ss buyToken,uint256 minAmountOut`@V[cNH{q_R`2` R`$`
tions)SlippageAndActions(address`@ recipient,address buyToken,uint``256 minAmountOut,bytes[] actions`)TokenPermissions(address token,`Rnuint256 amount)`Slippage slippage)Slippage(address recipient,address buyToken,ui`@nt256 minAmountOut)TokenPermissi``ons(address token,uint256 amount`qSlippage slippage)`pRfqOrder(Consideration makerConsideration,Consideration takerCon`@bool partialFillAllowed)Consideration(address token,uint` 256 amount,address counterparty,`@Slippage(address recipient,addre` ss buyToken,uint256 minAmountOut`@Rmint256 amount)`TokenPermissions(address token,u` nAmountOut,bytes[] actions)SlippageAndActions(address recip` ient,address buyToken,uint256 mi`@swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aSlippage slippage)Slippage(addre` ss recipient,address buyToken,ui`@nt256 minAmountOut)TokenPermissi``ons(address token,uint256 amount`V[cNH{q_R`2` R`$`Consideration(address token,uint256 amount,address counterparty,bool partialFillAllowed)TokenPermissions(address token,uConsideration consideration)_R` Ra?i_aFCV[` swwwwwwwwwwwwwwwwwwww`aSlippageAndActions slippageAndAc
Slippage(address recipient,addre` ss buyToken,uint256 minAmountOut`@tions)SlippageAndActions(address`@ recipient,address buyToken,uint``256 minAmountOut,bytes[] actions`)TokenPermissions(address token,`Rnuint256 amount)`TokenPermissions(address token,uRmint256 amount)`RfqOrder(Consideration makerConsideration,Consideration takerCon`@bool partialFillAllowed)Consideration(address token,uint` 256 amount,address counterparty,`@nAmountOut,bytes[] actions)SlippageAndActions(address recip` ient,address buyToken,uint256 mi`@swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aSlippageAndActions slippageAndAc` tions)SlippageAndActions(address`@ recipient,address buyToken,uint``256 minAmountOut,bytes[] actions`)TokenPermissions(address token,`a=1V[cNH{q_R`2` R`$`Consideration(address token,uint256 amount,address counterparty,bool partialFillAllowed)TokenPermissions(address token,uConsideration consideration)swwwwwwwwwwwwwwwwwwww`aSlippageAndActions slippageAndAc
SlippageAndActions(address recip` ient,address buyToken,uint256 mi`@nAmountOut,bytes[] actions)Slippage(address recipient,addre` ss buyToken,uint256 minAmountOut`@RfqOrder(Consideration makerConsideration,Consideration takerCon`@bool partialFillAllowed)Consideration(address token,uint` 256 amount,address counterparty,`@swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aV[cJ D1_R` R4`@R`D`aDdV[cNH{q_R`2` R`$`Consideration(address token,uint256 amount,address counterparty,bool partialFillAllowed)TokenPermissions(address token,uConsideration consideration)swwwwwwwwwwwwwwwwwwww`a
SlippageAndActions(address recip` ient,address buyToken,uint256 mi`@nAmountOut,bytes[] actions)Slippage(address recipient,addre` ss buyToken,uint256 minAmountOut`@V[cNH{q_R`2` R`$`
tions)SlippageAndActions(address`@ recipient,address buyToken,uint``256 minAmountOut,bytes[] actions`)TokenPermissions(address token,`Rnuint256 amount)`Slippage slippage)Slippage(address recipient,address buyToken,ui`@nt256 minAmountOut)TokenPermissi``ons(address token,uint256 amount`qSlippage slippage)`pRfqOrder(Consideration makerConsideration,Consideration takerCon`@bool partialFillAllowed)Consideration(address token,uint` 256 amount,address counterparty,`@Slippage(address recipient,addre` ss buyToken,uint256 minAmountOut`@Rmint256 amount)`TokenPermissions(address token,u` nAmountOut,bytes[] actions)SlippageAndActions(address recip` ient,address buyToken,uint256 mi`@swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aSlippage slippage)Slippage(addre` ss recipient,address buyToken,ui`@nt256 minAmountOut)TokenPermissi``ons(address token,uint256 amount`Consideration(address token,uint256 amount,address counterparty,bool partialFillAllowed)TokenPermissions(address token,uConsideration consideration)V[cNH{q_R`2` R`$`swwwwwwwwwwwwwwwwwwww`aSlippageAndActions slippageAndAc4
Slippage(address recipient,addre` ss buyToken,uint256 minAmountOut`@tions)SlippageAndActions(address`@ recipient,address buyToken,uint``256 minAmountOut,bytes[] actions`)TokenPermissions(address token,`Rnuint256 amount)`TokenPermissions(address token,uRmint256 amount)`RfqOrder(Consideration makerConsideration,Consideration takerCon`@bool partialFillAllowed)Consideration(address token,uint` 256 amount,address counterparty,`@nAmountOut,bytes[] actions)SlippageAndActions(address recip` ient,address buyToken,uint256 mi`@swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aSlippageAndActions slippageAndAc` tions)SlippageAndActions(address`@ recipient,address buyToken,uint``256 minAmountOut,bytes[] actions`)TokenPermissions(address token,`Consideration(address token,uint256 amount,address counterparty,bool partialFillAllowed)TokenPermissions(address token,uConsideration consideration)V[cNH{q_R`2` R`$`swwwwwwwwwwwwwwwwwwww`aSlippageAndActions slippageAndAc4
SlippageAndActions(address recip` ient,address buyToken,uint256 mi`@nAmountOut,bytes[] actions)Slippage(address recipient,addre` ss buyToken,uint256 minAmountOut`@RfqOrder(Consideration makerConsideration,Consideration takerCon`@bool partialFillAllowed)Consideration(address token,uint` 256 amount,address counterparty,`@swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aV[cJ D1_R` R4`@R`D`Consideration(address token,uint256 amount,address counterparty,bool partialFillAllowed)TokenPermissions(address token,uConsideration consideration)V[cNH{q_R`2` R`$`swwwwwwwwwwwwwwwwwwww`a
SlippageAndActions(address recip` ient,address buyToken,uint256 mi`@nAmountOut,bytes[] actions)Slippage(address recipient,addre` ss buyToken,uint256 minAmountOut`@V[cNH{q_R`2` R`$`
# 0x Cross-chain Intent Settler\n\n[0x](https://0x.org/)'s settlement contracts for cross-chain intents utilising\n[Permit2](https://github.com/Uniswap/permit2) to perform swaps without any\npassive allowance. Full source code and audits are found at\n[0xProject/0x-settler](https://github.com/0xProject/0x-settler).\n\n## Bug Bounty\n\nIf you've found a bug, you may be eligible for a bounty under the 0x [bug bounty\nprogram](https://0x.org/docs/developer-resources/bounties). Please see that link\nfor eligibility requirements as well as the advertised payout tiers. If you have\nany findings, send an email to [mailto:security@0x.org](security@0x.org) with\nthe subject line \"BUG BOUNTY\". Please describe the bug that you've found **in\ndetail** and ideally provide a proof-of-concept exploit.\n\n## Architecture\n\n### Allowances\n\n`CrossChainIntentSettler` does not hold allowances, nor does it hold token\nbalances between swaps. This provides an enhanced security posture.\n`CrossChainIntentSettler` relies on the aforementioned `Permit2` contract to\nhold allowances.\n\n`CrossChainIntentSettler` allows arbitrary calls to other contracts. Therefore\nit is of the utmost importance that _**settler does not hold token balances or\nallowances**_.\n\n### `ISignatureTransfer` vs `IAllowanceTransfer`\n\nIn order to remove the risk that passive allowances could be exploited, 0x\nSettler **does not** support the typical `Permit2` pattern of time-bound,\nvalue-bound allowances set via an ECDSA or\n[ERC1271](https://eips.ethereum.org/EIPS/eip-1271) signature. This is the\n`IAllowanceTransfer` half of `Permit2`. Instead, 0x Settler only supports the\n`ISignatureTransfer` interface, which requires a single-use signature (called a\ncoupon) be submitted with every transaction.\n\nThis provides enhanced security at the cost of some gas and inconvenience.\n\n### Actions\n\n0x Cross Chain Intent Settler settles swaps by performing a sequence of actions\nencoded in calldata. Actions are ABIEncoded with a selector. See\n`ICrossChainIntentSettlerActions` for the available options. Typically, actions\nare parametrized by the `recipient` where tokens are sent after the trade and\nthe `bps` specifying a proportion of the `Settler` contract's token balance to\nbe liquidated in the action.\n\n## Action encoding\n\nThe action encoding is not stable. Do not rely on the action encoding being\npreserved between 0x Settler instances. See [0x's developer\ndocumentation](https://0x.org/docs/developer-resources/settler) for a detailed\nexplanation.\n\nTypically, actions are only added to `ICrossChainIntentSettlerActions` for 2\nreasons: 1) to gas-optimize a high-volume settlement path; 2) to provide\ncompatibility with a liquidity source that does not support typical\n`ERC20.approve`...`ERC20.transferFrom` flows.\n\n## Cross-chain Intents\n\nThis instance of `Settler` supports swaps where the received token may be\nlocated on a different network than the sent token. Furthermore, the execution\npath is not dictated in the encoded calldata, and is instead decided by the\nsolver. A solver may decide to use other instances of `Settler`, or any other\nway. It also supports swaps where the tokens are located on the same network.\n\nThis instance of `Settler` supports swaps where the submitting address is not\nthe taker. This means that we must provide an alternative mechanism for\nauthorizing a swap that ensures the signed-over swap is not\nmalleable. Settlement of intents is facilitated by the `executeMetaTxn` entry\npoint and uses the \"witness\" functionality of `Permit2` to ensure that the\ntaker's signature is over the tokens being sent and the tokens being\nreceived. In contrast to the \"metatransaction\" flow, the taker *ONLY* signs the\ntokens to be sent and the tokens to be received. In a way, settling an intent is\nanalogous to a short-lived limit order.\n\nSettlement of cross-chain intents is permissioned, as it requires the action of\na new actor, i.e. permissioned `relayers`. These relayers have the task of\nverifying the intent is executable, and monitoring onchain (i.e. by monitoring\nof `CrossChainIntentSettler` events) or offchain (i.e. signed intents via API)\nuser-generated intents, and prompting an auction to notify the solvers. These\nrelayers are also compensated by a relayer-pre-set `amount` or `bpsAmount`. The\n`Settler` instance will initially retain 0% of this fee, but may activate an up\nto 30% fee share. Integrating frontends may act as a `relayer`. Furthermore,\nthey also have the task of moving the source token to the destination chain, and\nare encouraged to use the `BridgeSettler` instance.\n\nThe list of active `relayers` is updated by the 0x DAO, and is adjusted based\non, in order of importance:\n\n1. delegated ZRX/WZRX stake\n2. speed in relaying orders\n\nIntents go through an auction for the winning solver to be able to fill the\norder. An intent may specify a selected `solver`, thus giving priority to a\nparticular solver to execute the swap (i.e. a prearranged agreement between the\nuser and the solver). Once an intent is filled on the destination chain, source\ntokens are sent to the `relayers` by submitting a ZK proof. Proofs are submitted\nin batches, but a relayer may decide to self-generate and submit it to unlock\nthe tokens faster.\n\nThe restriction of participants to relayers and the winning solver avoids\nleakage of surplus value to MEV. Obviously, the settlement of the order for *at\nleast* the specified amount to be received is guaranteed by the\ncontracts. Cross-chain intent settlement is permissioned so that in the case\nthat it is possible, the taker receives more than the minimum specified in the\nsignature, up to the value that the market supports. `Permit2` allows the\ncombination of the authorization of the token transfer as well as confirming the\nuser's intention to receive the specified amount of the other token. This\nresults in the taker signing a single\n[EIP712](https://eips.ethereum.org/EIPS/eip-712) struct.\n
tions)SlippageAndActions(address`@ recipient,address buyToken,uint``256 minAmountOut,bytes[] actions`)TokenPermissions(address token,`Rnuint256 amount)`Slippage slippage)Slippage(address recipient,address buyToken,ui`@nt256 minAmountOut)TokenPermissi``ons(address token,uint256 amount`qSlippage slippage)`pRfqOrder(Consideration makerConsideration,Consideration takerCon`@bool partialFillAllowed)Consideration(address token,uint` 256 amount,address counterparty,`@Slippage(address recipient,addre` ss buyToken,uint256 minAmountOut`@Rmint256 amount)`TokenPermissions(address token,u` nAmountOut,bytes[] actions)SlippageAndActions(address recip` ient,address buyToken,uint256 mi`@swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aSlippage slippage)Slippage(addre` ss recipient,address buyToken,ui`@nt256 minAmountOut)TokenPermissi``ons(address token,uint256 amount`Consideration(address token,uint256 amount,address counterparty,bool partialFillAllowed)TokenPermissions(address token,uConsideration consideration)_aCiV[cNH{q_R`2` R`$`aD-W[PPPaCIV[aD6swwwwwwwwwwwwwwwwwwww`aSlippageAndActions slippageAndAc
Slippage(address recipient,addre` ss buyToken,uint256 minAmountOut`@tions)SlippageAndActions(address`@ recipient,address buyToken,uint``256 minAmountOut,bytes[] actions`)TokenPermissions(address token,`Rnuint256 amount)`TokenPermissions(address token,uRmint256 amount)`RfqOrder(Consideration makerConsideration,Consideration takerCon`@bool partialFillAllowed)Consideration(address token,uint` 256 amount,address counterparty,`@nAmountOut,bytes[] actions)SlippageAndActions(address recip` ient,address buyToken,uint256 mi`@swwwwwwwwwwwwwwwwwwww`aaQuV[_a uV[a 萂aVswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aSlippageAndActions slippageAndAc` tions)SlippageAndActions(address`@ recipient,address buyToken,uint``256 minAmountOut,bytes[] actions`)TokenPermissions(address token,`Consideration(address token,uint256 amount,address counterparty,bool partialFillAllowed)TokenPermissions(address token,uConsideration consideration)_aA8V[cNH{q_R`2` R`$`swwwwwwwwwwwwwwwwwwww`aSlippageAndActions slippageAndAc
SlippageAndActions(address recip` ient,address buyToken,uint256 mi`@nAmountOut,bytes[] actions)Slippage(address recipient,addre` ss buyToken,uint256 minAmountOut`@RfqOrder(Consideration makerConsideration,Consideration takerCon`@bool partialFillAllowed)Consideration(address token,uint` 256 amount,address counterparty,`@swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aV[cJ D1_R` R4`@R`D`Consideration(address token,uint256 amount,address counterparty,bool partialFillAllowed)TokenPermissions(address token,uConsideration consideration)_aEZV[cNH{q_R`2` R`$`swwwwwwwwwwwwwwwwwwww`a
SlippageAndActions(address recip` ient,address buyToken,uint256 mi`@nAmountOut,bytes[] actions)Slippage(address recipient,addre` ss buyToken,uint256 minAmountOut`@RfqOrder(Consideration makerConsideration,Consideration takerCon`@bool partialFillAllowed)Consideration(address token,uint` 256 amount,address counterparty,`@swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aV[cJ D1_R` R4`@R`D`Consideration(address token,uint256 amount,address counterparty,bool partialFillAllowed)TokenPermissions(address token,uConsideration consideration)_aC?V[cNH{q_R`2` R`$`swwwwwwwwwwwwwwwwwwww`a
tions)SlippageAndActions(address`@ recipient,address buyToken,uint``256 minAmountOut,bytes[] actions`)TokenPermissions(address token,`Rnuint256 amount)`Slippage slippage)Slippage(address recipient,address buyToken,ui`@nt256 minAmountOut)TokenPermissi``ons(address token,uint256 amount`qSlippage slippage)`pRfqOrder(Consideration makerConsideration,Consideration takerCon`@bool partialFillAllowed)Consideration(address token,uint` 256 amount,address counterparty,`@Slippage(address recipient,addre` ss buyToken,uint256 minAmountOut`@Rmint256 amount)`TokenPermissions(address token,u` nAmountOut,bytes[] actions)SlippageAndActions(address recip` ient,address buyToken,uint256 mi`@swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aSlippage slippage)Slippage(addre` ss recipient,address buyToken,ui`@nt256 minAmountOut)TokenPermissi``ons(address token,uint256 amount`Consideration(address token,uint256 amount,address counterparty,bool partialFillAllowed)TokenPermissions(address token,uConsideration consideration)V[cNH{q_R`2` R`$`swwwwwwwwwwwwwwwwwwww`aSlippageAndActions slippageAndAc
Slippage(address recipient,addre` ss buyToken,uint256 minAmountOut`@tions)SlippageAndActions(address`@ recipient,address buyToken,uint``256 minAmountOut,bytes[] actions`)TokenPermissions(address token,`Rnuint256 amount)`TokenPermissions(address token,uRmint256 amount)`RfqOrder(Consideration makerConsideration,Consideration takerCon`@bool partialFillAllowed)Consideration(address token,uint` 256 amount,address counterparty,`@nAmountOut,bytes[] actions)SlippageAndActions(address recip` ient,address buyToken,uint256 mi`@swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aSlippageAndActions slippageAndAc` tions)SlippageAndActions(address`@ recipient,address buyToken,uint``256 minAmountOut,bytes[] actions`)TokenPermissions(address token,`Consideration(address token,uint256 amount,address counterparty,bool partialFillAllowed)TokenPermissions(address token,uConsideration consideration)V[cNH{q_R`2` R`$`swwwwwwwwwwwwwwwwwwww`aSlippageAndActions slippageAndAc
SlippageAndActions(address recip` ient,address buyToken,uint256 mi`@nAmountOut,bytes[] actions)Slippage(address recipient,addre` ss buyToken,uint256 minAmountOut`@RfqOrder(Consideration makerConsideration,Consideration takerCon`@bool partialFillAllowed)Consideration(address token,uint` 256 amount,address counterparty,`@swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aV[cJ D1_R` R4`@R`D`Consideration(address token,uint256 amount,address counterparty,bool partialFillAllowed)TokenPermissions(address token,uConsideration consideration)V[cNH{q_R`2` R`$`swwwwwwwwwwwwwwwwwwww`a
nuint256 amount)`SlippageAndActions slippageAndActions)SlippageAndActions(address recipient,address buyToken,uint``256 minAmountOut,bytes[] actions`)TokenPermissions(address token,`Slippage slippage)Slippage(address recipient,address buyToken,uint256 minAmountOut)TokenPermissi``ons(address token,uint256 amount`qSlippage slippage)`pRfqOrder(Consideration makerConsideration,Consideration takerConbool partialFillAllowed)Consideration(address token,uint` 256 amount,address counterparty,`@Slippage(address recipient,addre` ss buyToken,uint256 minAmountOut`@Rmint256 amount)`TokenPermissions(address token,u` nAmountOut,bytes[] actions)SlippageAndActions(address recip` ient,address buyToken,uint256 mi`@swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aV[cNH{q_R`2` R`$`swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aSlippage slippage)Slippage(address recipient,address buyToken,uint256 minAmountOut)TokenPermissi``ons(address token,uint256 amount`Consideration(address token,uint256 amount,address counterparty,bool partialFillAllowed)TokenPermissions(address token,uConsideration consideration)Slippage slippage)Slippage(addre` ss recipient,address buyToken,uint256 minAmountOut)TokenPermissi``ons(address token,uint256 amount`swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`a
Slippage(address recipient,address buyToken,uint256 minAmountOutnuint256 amount)`SlippageAndActions slippageAndActions)SlippageAndActions(address recipient,address buyToken,uint``256 minAmountOut,bytes[] actions`)TokenPermissions(address token,`TokenPermissions(address token,uRmint256 amount)`RfqOrder(Consideration makerConsideration,Consideration takerConbool partialFillAllowed)Consideration(address token,uint` 256 amount,address counterparty,`@nAmountOut,bytes[] actions)SlippageAndActions(address recip` ient,address buyToken,uint256 mi`@swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aV[cNH{q_R`2` R`$`swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aSlippageAndActions slippageAndActions)SlippageAndActions(address recipient,address buyToken,uint``256 minAmountOut,bytes[] actions`)TokenPermissions(address token,`Consideration(address token,uint256 amount,address counterparty,bool partialFillAllowed)TokenPermissions(address token,uConsideration consideration)SlippageAndActions slippageAndAc` tions)SlippageAndActions(address recipient,address buyToken,uint``256 minAmountOut,bytes[] actions`)TokenPermissions(address token,`swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`a
nAmountOut,bytes[] actions)SlippageAndActions(address recipient,address buyToken,uint256 miSlippage(address recipient,address buyToken,uint256 minAmountOutRfqOrder(Consideration makerConsideration,Consideration takerConbool partialFillAllowed)Consideration(address token,uint` 256 amount,address counterparty,`@swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`azV[cNH{q_R`2` R`$`swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aV[cJ D1_R` R4`@R`D`Consideration(address token,uint256 amount,address counterparty,bool partialFillAllowed)TokenPermissions(address token,uConsideration consideration)a@4W[PPPa?zV[a@=swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`a
nuint256 amount)`SlippageAndActions slippageAndActions)SlippageAndActions(address recipient,address buyToken,uint``256 minAmountOut,bytes[] actions`)TokenPermissions(address token,`Slippage slippage)Slippage(address recipient,address buyToken,uint256 minAmountOut)TokenPermissi``ons(address token,uint256 amount`qSlippage slippage)`pRfqOrder(Consideration makerConsideration,Consideration takerConbool partialFillAllowed)Consideration(address token,uint` 256 amount,address counterparty,`@Slippage(address recipient,addre` ss buyToken,uint256 minAmountOut`@Rmint256 amount)`TokenPermissions(address token,u` nAmountOut,bytes[] actions)SlippageAndActions(address recip` ient,address buyToken,uint256 mi`@swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`a[cNH{q_R`2` R`$`swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aSlippage slippage)Slippage(address recipient,address buyToken,uint256 minAmountOut)TokenPermissi``ons(address token,uint256 amount`Consideration(address token,uint256 amount,address counterparty,bool partialFillAllowed)TokenPermissions(address token,uConsideration consideration)Slippage slippage)Slippage(addre` ss recipient,address buyToken,uint256 minAmountOut)TokenPermissi``ons(address token,uint256 amount`swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aHV[aWDV[aWƐg ඳ
Slippage(address recipient,address buyToken,uint256 minAmountOutnuint256 amount)`SlippageAndActions slippageAndActions)SlippageAndActions(address recipient,address buyToken,uint``256 minAmountOut,bytes[] actions`)TokenPermissions(address token,`TokenPermissions(address token,uRmint256 amount)`RfqOrder(Consideration makerConsideration,Consideration takerConbool partialFillAllowed)Consideration(address token,uint` 256 amount,address counterparty,`@nAmountOut,bytes[] actions)SlippageAndActions(address recip` ient,address buyToken,uint256 mi`@swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`a[cNH{q_R`2` R`$`swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aSlippageAndActions slippageAndActions)SlippageAndActions(address recipient,address buyToken,uint``256 minAmountOut,bytes[] actions`)TokenPermissions(address token,`Consideration(address token,uint256 amount,address counterparty,bool partialFillAllowed)TokenPermissions(address token,uConsideration consideration)SlippageAndActions slippageAndAc` tions)SlippageAndActions(address recipient,address buyToken,uint``256 minAmountOut,bytes[] actions`)TokenPermissions(address token,`swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`a
nAmountOut,bytes[] actions)SlippageAndActions(address recipient,address buyToken,uint256 miSlippage(address recipient,address buyToken,uint256 minAmountOutRfqOrder(Consideration makerConsideration,Consideration takerConbool partialFillAllowed)Consideration(address token,uint` 256 amount,address counterparty,`@swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`a[cNH{q_R`2` R`$`swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aV[cJ D1_R` R4`@R`D`Consideration(address token,uint256 amount,address counterparty,bool partialFillAllowed)TokenPermissions(address token,uConsideration consideration)swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`a
nuint256 amount)`SlippageAndActions slippageAndActions)SlippageAndActions(address recipient,address buyToken,uint``256 minAmountOut,bytes[] actions`)TokenPermissions(address token,`Slippage slippage)Slippage(address recipient,address buyToken,uint256 minAmountOut)TokenPermissi``ons(address token,uint256 amount`qSlippage slippage)`pRfqOrder(Consideration makerConsideration,Consideration takerConbool partialFillAllowed)Consideration(address token,uint` 256 amount,address counterparty,`@Slippage(address recipient,addre` ss buyToken,uint256 minAmountOut`@Rmint256 amount)`TokenPermissions(address token,u` nAmountOut,bytes[] actions)SlippageAndActions(address recip` ient,address buyToken,uint256 mi`@swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`a[cNH{q_R`2` R`$`swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aWa"ŐaKEV[a$HV[a"ŐaKSlippage slippage)Slippage(address recipient,address buyToken,uint256 minAmountOut)TokenPermissi``ons(address token,uint256 amount`Consideration(address token,uint256 amount,address counterparty,bool partialFillAllowed)TokenPermissions(address token,uConsideration consideration)aGTWaFmWPPPPPaEԑPSlippage slippage)Slippage(addre` ss recipient,address buyToken,uint256 minAmountOut)TokenPermissi``ons(address token,uint256 amount`aP W[PPPPV[aPdW[`swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`a
Slippage(address recipient,address buyToken,uint256 minAmountOutnuint256 amount)`SlippageAndActions slippageAndActions)SlippageAndActions(address recipient,address buyToken,uint``256 minAmountOut,bytes[] actions`)TokenPermissions(address token,`TokenPermissions(address token,uRmint256 amount)`RfqOrder(Consideration makerConsideration,Consideration takerConbool partialFillAllowed)Consideration(address token,uint` 256 amount,address counterparty,`@nAmountOut,bytes[] actions)SlippageAndActions(address recip` ient,address buyToken,uint256 mi`@swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`a[cNH{q_R`2` R`$`swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aSlippageAndActions slippageAndActions)SlippageAndActions(address recipient,address buyToken,uint``256 minAmountOut,bytes[] actions`)TokenPermissions(address token,`Consideration(address token,uint256 amount,address counterparty,bool partialFillAllowed)TokenPermissions(address token,uConsideration consideration)SlippageAndActions slippageAndAc` tions)SlippageAndActions(address recipient,address buyToken,uint``256 minAmountOut,bytes[] actions`)TokenPermissions(address token,`swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`a
nAmountOut,bytes[] actions)SlippageAndActions(address recipient,address buyToken,uint256 miSlippage(address recipient,address buyToken,uint256 minAmountOutRfqOrder(Consideration makerConsideration,Consideration takerConbool partialFillAllowed)Consideration(address token,uint` 256 amount,address counterparty,`@swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`a[cNH{q_R`2` R`$`swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`a^V[cNH{q_R`2` R`Consideration(address token,uint256 amount,address counterparty,bool partialFillAllowed)TokenPermissions(address token,uConsideration consideration)swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`a+V[aQ\V[aQސg ඳ
# 0x Bridge Settler\n\n[0x](https://0x.org/)'s settlement contracts for cross-chain operations\nutilising [Permit2](https://github.com/Uniswap/permit2) patterns to perform\nswaps without any passive allowance. Full source code and audits are found at\n[0xProject/0x-settler](https://github.com/0xProject/0x-settler).\n\n## Bug Bounty\n\nIf you've found a bug, you may be eligible for a bounty under the 0x [bug bounty\nprogram](https://0x.org/docs/developer-resources/bounties). Please see that link\nfor eligibility requirements as well as the advertised payout tiers. If you have\nany findings, send an email to [mailto:security@0x.org](security@0x.org) with\nthe subject line \"BUG BOUNTY\". Please describe the bug that you've found **in\ndetail** and ideally provide a proof-of-concept exploit.\n\n## Architecture\n\n### Allowances\n\n`BridgeSettler` does not hold allowances, nor does it hold token balances\nbetween swaps. This provides an enhanced security posture. `BridgeSettler`\nrelies on the aforementioned `Permit2` contract to hold allowances. Some\ntaker-submitted actions are made using a gas-optimized allowance contract,\n`AllowanceHolder`, which can be found at\n0x0000000000001fF3684f28c67538d4D072C22734.\n\n`BridgeSettler` allows arbitrary calls to other contracts. Therefore it is of\nthe utmost importance that _**bridge settler does not hold token balances or\nallowances**_.\n\n### `ISignatureTransfer` vs `IAllowanceTransfer`\n\nIn order to remove the risk that passive allowances could be exploited, 0x\nBridge Settler **does not** support the typical `Permit2` pattern of time-bound,\nvalue-bound allowances set via an ECDSA or\n[ERC1271](https://eips.ethereum.org/EIPS/eip-1271) signature. This is the\n`IAllowanceTransfer` half of `Permit2`. Instead, 0x Settler only supports the\n`ISignatureTransfer` interface, which requires a single-use signature (which we\nrefer to as a coupon) be submitted with every transaction.\n\nThis provides enhanced security at the cost of some gas and inconvenience. For\nthose users/integrators for whom this is too much of a cost, an alternative\nallowance target, `AllowanceHolder` is provided (see above).\n\n### Actions\n\n0x Bridge Settler settles bridging operations by performing a sequence of\nactions encoded in calldata. Actions are ABIEncoded with a selector. See\n`IBridgeSettlerActions` for the available options. Typically, actions are\nparametrized to match the parameters required by the underlying bridge going to\nbe used.\n\n## Action encoding\n\nThe action encoding is not stable. Do not rely on the action encoding being\npreserved between 0x Settler instances. See [0x's developer\ndocumentation](https://0x.org/docs/developer-resources/settler) for a detailed\nexplanation.\n\nTypically, actions are only added to `IBridgeSettlerActions` for 2 reasons: 1)\nto gas-optimize a cross-chain path; 2) to provide compatibility with a bridge\nthat does not support typical `ERC20.approve`...`ERC20.transferFrom` flows.\n
nAmountOut,bytes[] actions)SlippageAndActions(address recipient,address buyToken,uint256 miSlippage(address recipient,address buyToken,uint256 minAmountOutRfqOrder(Consideration makerConsideration,Consideration takerConbool partialFillAllowed)Consideration(address token,uint` 256 amount,address counterparty,`@swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`a[cNH{q_R`2` R`$`swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`a?V[cNH{q_R`2` R`Consideration(address token,uint256 amount,address counterparty,bool partialFillAllowed)TokenPermissions(address token,uConsideration consideration)swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`anAmountOut,bytes[] actions)SlippageAndActions(address recipient,address buyToken,uint256 miSlippage(address recipient,address buyToken,uint256 minAmountOutRfqOrder(Consideration makerConsideration,Consideration takerConbool partialFillAllowed)Consideration(address token,uint` 256 amount,address counterparty,`@swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`a[cNH{q_R`2` R`$`swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aSlippageAndActions(address recipient,address buyToken,uint256 minAmountOut,bytes[] actions)SlippageAndActions slippageAndAcConsideration(address token,uint256 amount,address counterparty,bool partialFillAllowed)Consideration consideration)TokenPermissions(address token,u` SlippageAndActions(address recipient,address buyToken,uint256 minAmountOut,bytes[] actions)SlippageAndActions slippageAndAcswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`anAmountOut,bytes[] actions)SlippageAndActions(address recipient,address buyToken,uint256 miSlippage(address recipient,address buyToken,uint256 minAmountOutRfqOrder(Consideration makerConsideration,Consideration takerConbool partialFillAllowed)Consideration(address token,uint` 256 amount,address counterparty,`@swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`a[cNH{q_R`2` R`$`swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aSlippage(address recipient,address buyToken,uint256 minAmountOutSlippage slippage)a(!V[cNH{q_R`2` R`Consideration(address token,uint256 amount,address counterparty,bool partialFillAllowed)Consideration consideration)aN0W[PPPaMqV[aN9TokenPermissions(address token,u` Slippage(address recipient,address buyToken,uint256 minAmountOutSlippage slippage)swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`a
nAmountOut,bytes[] actions)SlippageAndActions(address recipient,address buyToken,uint256 miSlippage(address recipient,address buyToken,uint256 minAmountOutRfqOrder(Consideration makerConsideration,Consideration takerConbool partialFillAllowed)Consideration(address token,uint` 256 amount,address counterparty,`@swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`a[cNH{q_R`2` R`$`swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aConsideration(address token,uint256 amount,address counterparty,bool partialFillAllowed)TokenPermissions(address token,uConsideration consideration)swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`anAmountOut,bytes[] actions)SlippageAndActions(address recipient,address buyToken,uint256 miSlippage(address recipient,address buyToken,uint256 minAmountOutRfqOrder(Consideration makerConsideration,Consideration takerConbool partialFillAllowed)Consideration(address token,uint` 256 amount,address counterparty,`@swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`a[cNH{q_R`2` R`$`swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aSlippageAndActions(address recipient,address buyToken,uint256 minAmountOut,bytes[] actions)SlippageAndActions slippageAndAcConsideration(address token,uint256 amount,address counterparty,bool partialFillAllowed)Consideration consideration)aH)W[PPPaGjV[aH2TokenPermissions(address token,u` SlippageAndActions(address recipient,address buyToken,uint256 minAmountOut,bytes[] actions)SlippageAndActions slippageAndAcswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`anAmountOut,bytes[] actions)SlippageAndActions(address recipient,address buyToken,uint256 miSlippage(address recipient,address buyToken,uint256 minAmountOutRfqOrder(Consideration makerConsideration,Consideration takerConbool partialFillAllowed)Consideration(address token,uint` 256 amount,address counterparty,`@swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`a[cNH{q_R`2` R`$`swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aSlippage(address recipient,address buyToken,uint256 minAmountOutSlippage slippage)Consideration(address token,uint256 amount,address counterparty,bool partialFillAllowed)Consideration consideration)aDFWaC_WPPPPPaBƑPaJ8W[PPPaIyV[aJATokenPermissions(address token,u` Slippage(address recipient,address buyToken,uint256 minAmountOutSlippage slippage)swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`a
nAmountOut,bytes[] actions)SlippageAndActions(address recipient,address buyToken,uint256 miSlippage(address recipient,address buyToken,uint256 minAmountOutRfqOrder(Consideration makerConsideration,Consideration takerConbool partialFillAllowed)Consideration(address token,uint` 256 amount,address counterparty,`@swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aV[cNH{q_R`2` R`$`swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aConsideration(address token,uint256 amount,address counterparty,bool partialFillAllowed)TokenPermissions(address token,uConsideration consideration)swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`anAmountOut,bytes[] actions)SlippageAndActions(address recipient,address buyToken,uint256 miSlippage(address recipient,address buyToken,uint256 minAmountOutRfqOrder(Consideration makerConsideration,Consideration takerConbool partialFillAllowed)Consideration(address token,uint` 256 amount,address counterparty,`@swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aV[cNH{q_R`2` R`$`swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aTokenPermissions(address token,u` Consideration(address token,uint256 amount,address counterparty,`@bool partialFillAllowed)Consideration consideration)SlippageAndActions(address recipient,address buyToken,uint256 mi`@nAmountOut,bytes[] actions)SlippageAndActions slippageAndAcSlippageAndActions(address recipient,address buyToken,uint256 minAmountOut,bytes[] actions)SlippageAndActions slippageAndAcswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`anAmountOut,bytes[] actions)SlippageAndActions(address recipient,address buyToken,uint256 miSlippage(address recipient,address buyToken,uint256 minAmountOutRfqOrder(Consideration makerConsideration,Consideration takerConbool partialFillAllowed)Consideration(address token,uint` 256 amount,address counterparty,`@swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aV[cNH{q_R`2` R`$`swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aTokenPermissions(address token,u` Consideration(address token,uint256 amount,address counterparty,`@bool partialFillAllowed)Consideration consideration)Slippage(address recipient,address buyToken,uint256 minAmountOut`@Slippage slippage)Slippage(address recipient,address buyToken,uint256 minAmountOutSlippage slippage)swwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`aswwwwwwwwwwwwwwwwwwww`a
nAmountOut,bytes[] actions)SlippageAndActions(address recipient,address buyToken,uint256 miSlippage(address recipient,address buyToken,uint256 minAmountOutRfqOrder(Consideration makerConsideration,Consideration takerConbool partialFillAllowed)Consideration(address token,uint` 256 amount,address counterparty,`@V[cNH{q_R`2` R`$`TokenPermissions(address token,u` Consideration(address token,uint256 amount,address counterparty,`@bool partialFillAllowed)Consideration consideration)Slippage(address recipient,address buyToken,uint256 minAmountOut`@Slippage slippage)Slippage(address recipient,address buyToken,uint256 minAmountOutSlippage slippage)V[aW퐉a\ V[_aW}V[
nAmountOut,bytes[] actions)SlippageAndActions(address recipient,address buyToken,uint256 miSlippage(address recipient,address buyToken,uint256 minAmountOutRfqOrder(Consideration makerConsideration,Consideration takerConbool partialFillAllowed)Consideration(address token,uint` 256 amount,address counterparty,`@V[cNH{q_R`2` R`$`TokenPermissions(address token,u` Consideration(address token,uint256 amount,address counterparty,`@bool partialFillAllowed)Consideration consideration)Slippage(address recipient,address buyToken,uint256 minAmountOut`@Slippage slippage)Slippage(address recipient,address buyToken,uint256 minAmountOutSlippage slippage)
# 0x Settler\n\n[0x](https://0x.org/)'s settlement contracts utilising\n[Permit2](https://github.com/Uniswap/permit2) to perform swaps without any\npassive allowance. Full source code and audits are found at\n[0xProject/0x-settler](https://github.com/0xProject/0x-settler).\n\n## Bug Bounty\n\nIf you've found a bug, you may be eligible for a bounty under the 0x [bug bounty\nprogram](https://0x.org/docs/developer-resources/bounties). Please see that link\nfor eligibility requirements as well as the advertised payout tiers. If you have\nany findings, send an email to [mailto:security@0x.org](security@0x.org) with\nthe subject line \"BUG BOUNTY\". Please describe the bug that you've found **in\ndetail** and ideally provide a proof-of-concept exploit.\n\n## Architecture\n\n### Allowances\n\n`Settler` does not hold allowances, nor does it hold token balances between\nswaps. This provides an enhanced security posture. `Settler` relies on the\naforementioned `Permit2` contract to hold allowances.\n\n`Settler` allows arbitrary calls to other contracts. Therefore it is of the\nutmost importance that _**settler does not hold token balances or allowances**_.\n\n### `ISignatureTransfer` vs `IAllowanceTransfer`\n\nIn order to remove the risk that passive allowances could be exploited, 0x\nSettler **does not** support the typical `Permit2` pattern of time-bound,\nvalue-bound allowances set via an ECDSA or\n[ERC1271](https://eips.ethereum.org/EIPS/eip-1271) signature. This is the\n`IAllowanceTransfer` half of `Permit2`. Instead, 0x Settler only supports the\n`ISignatureTransfer` interface, which requires a single-use signature (called a\ncoupon) be submitted with every transaction.\n\nThis provides enhanced security at the cost of some gas and inconvenience.\n\n### Actions\n\n0x Settler settles swaps by performing a sequence of actions encoded in\ncalldata. Actions are ABIEncoded with a selector. See `ISettlerActions` for the\navailable options. Typically, actions are parametrized by the `recipient` where\ntokens are sent after the trade and the `bps` specifying a proportion of the\n`Settler` contract's token balance to be liquidated in the action.\n\n## Action encoding\n\nThe action encoding is not stable. Do not rely on the action encoding being\npreserved between 0x Settler instances. See [0x's developer\ndocumentation](https://0x.org/docs/developer-resources/settler) for a detailed\nexplanation.\n\nTypically, actions are only added to `ISettlerActions` for 2 reasons: 1) to\ngas-optimize a high-volume settlement path; 2) to provide compatibility with a\nliquidity source that does not support typical\n`ERC20.approve`...`ERC20.transferFrom` flows.\n\n## Intents\n\nThis instance of `Settler` supports swaps where the submitting address is not\nthe taker. This means that we must provide an alternative mechanism for\nauthorizing a swap that ensures the signed-over swap is not\nmalleable. Settlement of intents is faciliated by the `executeMetaTxn` entry\npoint and uses the \"witness\" functionality of `Permit2` to ensure that the\ntaker's signature is over the tokens being sent and the tokens being\nreceived. In contrast to the \"metatransaction\" flow, the taker *ONLY* signs the\ntokens to be sent and the tokens to be received. In a way, settling an intent is\nanalogous to a short-lived limit order. Settlement of intents is permissioned\nand limited to a whitelist set of \"solvers\" to avoid leakage of surplus value to\nMEV. Obviously, the settlement of the order for *at least* the specified amount\nto be received is guaranteed by the contracts. Intent settlement is permissioned\nso that in the case that it is possible, the taker receives more than the\nminimum specified in the signature, up to the value that the market\nsupports. `Permit2` allows the combination of the authorization of the token\ntransfer as well as confirming the user's intention to receive the specified\namount of the other token. This results in the taker signing a single\n[EIP712](https://eips.ethereum.org/EIPS/eip-712) struct.\n\n## RFQ\n\nRFQ is 0x Settler's \"native\" settlement mechanism. It relies on a\n\"witness\"-signed `Permit2` coupon from a market maker where that entity agrees\nto trade a fixed amount of tokens at a fixed price with a taker. `Permit2` is\nresponsible for verifying the nonce, signature, amount of tokens to be traded,\nand deadline for settlement (but not the price). 0x Settler atomically moves\nthose tokens from taker to maker and maker to taker. This is the only time that\n0x Settler emits an event. In this settlement scheme, responsibility for setting\nprices is delegated off-chain to sophisticated market participants who do so in\na risk-adjusted manner. This is typically referred to as \"over the counter\"\ntrading.\n
nAmountOut,bytes[] actions)SlippageAndActions(address recipient,address buyToken,uint256 miRfqOrder(Consideration makerConsideration,Consideration takerConbool partialFillAllowed)Consideration(address token,uint` 256 amount,address counterparty,`@V[cNH{q_R`2` R`$`Consideration(address token,uint256 amount,address counterparty,`@bool partialFillAllowed)TokenPermissions(address token,uConsideration consideration)nAmountOut,bytes[] actions)SlippageAndActions(address recipient,address buyToken,uint256 miRfqOrder(Consideration makerConsideration,Consideration takerConbool partialFillAllowed)Consideration(address token,uint` 256 amount,address counterparty,`@V[cNH{q_R`2` R`$`a:>Wa9ZWPPPPPa7QTokenPermissions(address token,u` Consideration(address token,uint256 amount,address counterparty,`@bool partialFillAllowed)Consideration consideration)SlippageAndActions(address recipient,address buyToken,uint256 mi`@nAmountOut,bytes[] actions)SlippageAndActions slippageAndAcSlippageAndActions(address recipient,address buyToken,uint256 minAmountOut,bytes[] actions)SlippageAndActions slippageAndAcaU+W[PPPaTlV[aU4
nAmountOut,bytes[] actions)SlippageAndActions(address recipient,address buyToken,uint256 miRfqOrder(Consideration makerConsideration,Consideration takerConbool partialFillAllowed)Consideration(address token,uint` 256 amount,address counterparty,`@OV[cNH{q_R`2` R`$`Consideration(address token,uint256 amount,address counterparty,`@bool partialFillAllowed)TokenPermissions(address token,uConsideration consideration)aK0W[PPPaJHV[aK9aFSV[PV[P=aNaV[`$nAmountOut,bytes[] actions)SlippageAndActions(address recipient,address buyToken,uint256 miRfqOrder(Consideration makerConsideration,Consideration takerConbool partialFillAllowed)Consideration(address token,uint` 256 amount,address counterparty,`@V[cNH{q_R`2` R`$`TokenPermissions(address token,u` Consideration(address token,uint256 amount,address counterparty,`@bool partialFillAllowed)Consideration consideration)SlippageAndActions(address recipient,address buyToken,uint256 mi`@nAmountOut,bytes[] actions)SlippageAndActions slippageAndAcSlippageAndActions(address recipient,address buyToken,uint256 minAmountOut,bytes[] actions)SlippageAndActions slippageAndAcW[PPPPV[aS3W[`D_
0xef37ad2b…5fc4·#20,541,021·0xd3807251…59d071
[cNH{q_R`!` R`$`{"description": "", "name": "0x Settler feature i0123456789` R`@Q`ny123456789ABCDEFGHJKLMNPQRS`TUVWXYZabcdefghijkmnopqrstuvwxyz`9R`:
nAmountOut,bytes[] actions)SlippageAndActions(address recipient,address buyToken,uint256 miRfqOrder(Consideration makerConsideration,Consideration takerConbool partialFillAllowed)Consideration(address token,uint` 256 amount,address counterparty,`@gV[cNH{q_R`2` R`$`Consideration(address token,uint256 amount,address counterparty,`@bool partialFillAllowed)TokenPermissions(address token,uConsideration consideration)nAmountOut,bytes[] actions)SlippageAndActions(address recipient,address buyToken,uint256 miRfqOrder(Consideration makerConsideration,Consideration takerConbool partialFillAllowed)Consideration(address token,uint` 256 amount,address counterparty,`@V[cNH{q_R`2` R`$`a0jWa/yWPPPPPPa-TokenPermissions(address token,u` Consideration(address token,uint256 amount,address counterparty,`@bool partialFillAllowed)Consideration consideration)SlippageAndActions(address recipient,address buyToken,uint256 mi`@nAmountOut,bytes[] actions)SlippageAndActions slippageAndAcSlippageAndActions(address recipient,address buyToken,uint256 minAmountOut,bytes[] actions)SlippageAndActions slippageAndAc
nAmountOut,bytes[] actions)SlippageAndActions(address recipient,address buyToken,uint256 miRfqOrder(Consideration makerConsideration,Consideration takerConbool partialFillAllowed)Consideration(address token,uint` 256 amount,address counterparty,`@V[cNH{q_R`2` R`$`Consideration(address token,uint256 amount,address counterparty,`@bool partialFillAllowed)TokenPermissions(address token,uConsideration consideration)a<VW[PPPa;UV[a<_nAmountOut,bytes[] actions)SlippageAndActions(address recipient,address buyToken,uint256 miRfqOrder(Consideration makerConsideration,Consideration takerConbool partialFillAllowed)Consideration(address token,uint` 256 amount,address counterparty,`@9V[cNH{q_R`2` R`$`TokenPermissions(address token,u` Consideration(address token,uint256 amount,address counterparty,`@bool partialFillAllowed)Consideration consideration)Q_a.@V[P=a4BV[`ASlippageAndActions(address recipient,address buyToken,uint256 mi`@nAmountOut,bytes[] actions)SlippageAndActions slippageAndAcSlippageAndActions(address recipient,address buyToken,uint256 minAmountOut,bytes[] actions)SlippageAndActions slippageAndAcaC|W[PPPPV[aD W[`D_
nAmountOut,bytes[] actions)SlippageAndActions(address recipient,address buyToken,uint256 miRfqOrder(Consideration makerConsideration,Consideration takerConbool partialFillAllowed)Consideration(address token,uint` 256 amount,address counterparty,`@V[cNH{q_R`2` R`$`Consideration(address token,uint256 amount,address counterparty,`@bool partialFillAllowed)TokenPermissions(address token,uConsideration consideration)nAmountOut,bytes[] actions)SlippageAndActions(address recipient,address buyToken,uint256 miRfqOrder(Consideration makerConsideration,Consideration takerConbool partialFillAllowed)Consideration(address token,uint` 256 amount,address counterparty,`@9V[cNH{q_R`2` R`$`TokenPermissions(address token,u` Consideration(address token,uint256 amount,address counterparty,`@bool partialFillAllowed)Consideration consideration)SlippageAndActions(address recipient,address buyToken,uint256 mi`@nAmountOut,bytes[] actions)SlippageAndActions slippageAndAcSlippageAndActions(address recipient,address buyToken,uint256 minAmountOut,bytes[] actions)SlippageAndActions slippageAndAcW[PPPPV[aArW[`D_
nAmountOut,bytes[] actions)SlippageAndActions(address recipient,address buyToken,uint256 miRfqOrder(Consideration makerConsideration,Consideration takerConbool partialFillAllowed)Consideration(address token,uint` 256 amount,address counterparty,`@V[cNH{q_R`2` R`$`Consideration(address token,uint256 amount,address counterparty,`@bool partialFillAllowed)TokenPermissions(address token,uConsideration consideration)a9hW[PPPa8gV[a9qW[PPPPV[a;MW[`D_nAmountOut,bytes[] actions)SlippageAndActions(address recipient,address buyToken,uint256 miRfqOrder(Consideration makerConsideration,Consideration takerConbool partialFillAllowed)Consideration(address token,uint` 256 amount,address counterparty,`@:V[cNH{q_R`2` R`$`TokenPermissions(address token,u` Consideration(address token,uint256 amount,address counterparty,`@bool partialFillAllowed)Consideration consideration)SlippageAndActions(address recipient,address buyToken,uint256 mi`@nAmountOut,bytes[] actions)SlippageAndActions slippageAndAcSlippageAndActions(address recipient,address buyToken,uint256 minAmountOut,bytes[] actions)SlippageAndActions slippageAndAca?kW[PPPa>jV[a?tW[PPPPV[aA8W[`D_
0xef37ad2b…5fc4·#19,928,432·0xe9d8e8f6…6ce586
[cNH{q_R`!` R`$`{"description": "", "name": "0x Settler feature i0123456789` R`@Q`ny123456789ABCDEFGHJKLMNPQRS`TUVWXYZabcdefghijkmnopqrstuvwxyz`9R`:
nAmountOut,bytes[] actions)SlippageAndActions(address recipient,address buyToken,uint256 miRfqOrder(Consideration makerConsideration,Consideration takerConbool partialFillAllowed)Consideration(address token,uint` 256 amount,address counterparty,`@V[cNH{q_R`2` R`$`Consideration(address token,uint256 amount,address counterparty,`@bool partialFillAllowed)TokenPermissions(address token,uConsideration consideration)a92W[PPPa81V[a9;nAmountOut,bytes[] actions)SlippageAndActions(address recipient,address buyToken,uint256 miRfqOrder(Consideration makerConsideration,Consideration takerConbool partialFillAllowed)Consideration(address token,uint` 256 amount,address counterparty,`@V[cNH{q_R`2` R`$`TokenPermissions(address token,u` Consideration(address token,uint256 amount,address counterparty,`@bool partialFillAllowed)Consideration consideration)SlippageAndActions(address recipient,address buyToken,uint256 mi`@nAmountOut,bytes[] actions)SlippageAndActions slippageAndAcSlippageAndActions(address recipient,address buyToken,uint256 minAmountOut,bytes[] actions)SlippageAndActions slippageAndAca?@W[PPPa>?V[a?IW[PPPPV[aA W[`D_
# 0x Settler\n\n[0x](https://0x.org/)'s settlement contracts utilising\n[Permit2](https://github.com/Uniswap/permit2) to perform swaps without any\npassive allowance. Full source code and audits are found at\n[0xProject/0x-settler](https://github.com/0xProject/0x-settler).\n\n## Bug Bounty\n\nIf you've found a bug, you may be eligible for a bounty under the 0x [bug bounty\nprogram](https://0x.org/docs/developer-resources/bounties). Please see that link\nfor eligibility requirements as well as the advertised payout tiers. If you have\nany findings, send an email to [mailto:security@0x.org](security@0x.org) with\nthe subject line \"BUG BOUNTY\". Please describe the bug that you've found **in\ndetail** and ideally provide a proof-of-concept exploit.\n\n## Architecture\n\n### Allowances\n\n`Settler` does not hold allowances, nor does it hold token balances between\nswaps. This provides an enhanced security posture. `Settler` relies on the\naforementioned `Permit2` contract to hold allowances.\n\n`Settler` allows arbitrary calls to other contracts. Therefore it is of the\nutmost importance that _**settler does not hold token balances or allowances**_.\n\n### `ISignatureTransfer` vs `IAllowanceTransfer`\n\nIn order to remove the risk that passive allowances could be exploited, 0x\nSettler **does not** support the typical `Permit2` pattern of time-bound,\nvalue-bound allowances set via an ECDSA or\n[ERC1271](https://eips.ethereum.org/EIPS/eip-1271) signature. This is the\n`IAllowanceTransfer` half of `Permit2`. Instead, 0x Settler only supports the\n`ISignatureTransfer` interface, which requires a single-use signature (called a\ncoupon) be submitted with every transaction.\n\nThis provides enhanced security at the cost of some gas and inconvenience.\n\n### Actions\n\n0x Settler settles swaps by performing a sequence of actions encoded in\ncalldata. Actions are ABIEncoded with a selector. See `ISettlerActions` for the\navailable options. Typically, actions are parametrized by the `recipient` where\ntokens are sent after the trade and the `bps` specifying a proportion of the\n`Settler` contract's token balance to be liquidated in the action.\n\n## Action encoding\n\nThe action encoding is not stable. Do not rely on the action encoding being\npreserved between 0x Settler instances. See [0x's developer\ndocumentation](https://0x.org/docs/developer-resources/settler) for a detailed\nexplanation.\n\nTypically, actions are only added to `ISettlerActions` for 2 reasons: 1) to\ngas-optimize a high-volume settlement path; 2) to provide compatibility with a\nliquidity source that does not support typical\n`ERC20.approve`...`ERC20.transferFrom` flows.\n\n## Metatransactions\n\nThis instance of `Settler` supports swaps where the submitting address is not\nthe taker. This means that we must provide an alternative mechanism for\nauthorizing a swap that ensures the signed-over metadata is not\nmalleable. Metatransactions are faciliated by the `executeMetaTxn` entry point\nand use the \"witness\" functionality of `Permit2` to ensure that the taker's\nsignature is over the tokens being sent _and_ the `bytes[]` actions that\n`Settler` will execute. `Permit2` combines all this together into a single\n[EIP712](https://eips.ethereum.org/EIPS/eip-712) struct that the taker signs.\n\n## RFQ\n\nRFQ is 0x Settler's \"native\" settlement mechanism. It relies on a\n\"witness\"-signed `Permit2` coupon from a market maker where that entity agrees\nto trade a fixed amount of tokens at a fixed price with a taker. `Permit2` is\nresponsible for verifying the nonce, signature, amount of tokens to be traded,\nand deadline for settlement (but not the price). 0x Settler atomically moves\nthose tokens from taker to maker and maker to taker. This is the only time that\n0x Settler emits an event. In this settlement scheme, responsibility for setting\nprices is delegated off-chain to sophisticated market participants who do so in\na risk-adjusted manner. This is typically referred to as \"over the counter\"\ntrading.\n
1-50 of 57