{"componentChunkName":"component---src-pages-sips-sip-markdown-remark-frontmatter-sip-tsx","path":"/sips/sip-267/","result":{"data":{"markdownRemark":{"fileAbsolutePath":"/vercel/path0/content/sips/sip-267.md","frontmatter":{"sip":267,"sccp":null,"title":"Direct Integration","network":"Ethereum & Optimism","author":"kaleb (@kaleb-keny), Afif (@aband1)","type":"Governance","proposal":"https://snapshot.org/#/snxgov.eth/proposal/0xc333eb580a93c4289c4426ea497aa6bd52d33f432899f9961d23afa161fe0244","implementor":"meb (@barrasso)","release":null,"created":"2022-07-28T00:00:00.000Z","updated":null,"status":"Implemented"},"html":"<!--You can leave these HTML comments in your merged SIP and delete the visible duplicate text guides, they will not appear and may be helpful to refer to if you edit it again. This is the suggested template for new SIPs. Note that an SIP number will be assigned by an editor. When opening a pull request to submit your SIP, please use an abbreviated title in the filename, `sip-draft_title_abbrev.md`. The title should be 44 characters or less.-->\n<h2 id=\"simple-summary\" style=\"position:relative;\"><a href=\"#simple-summary\" aria-label=\"simple summary permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Simple Summary</h2>\n<!--\"If you can't explain it simply, you don't understand it well enough.\" Simply describe the outcome the proposed changes intends to achieve. This should be non-technical and accessible to a casual community member.-->\n<p>This SIP proposes to implement a direct integration contract that allows integrators to tap into Synthetix's exchange functionalities with a customized set parameters.</p>\n<h2 id=\"abstract\" style=\"position:relative;\"><a href=\"#abstract\" aria-label=\"abstract permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Abstract</h2>\n<!--A short (~200 word) description of the proposed change, the abstract should clearly describe the proposed change. This is what *will* be done if the SIP is implemented, not *why* it should be done or *how* it will be done. If the SIP proposes deploying a new contract, write, \"we propose to deploy a new contract that will do x\".-->\n<p>The direct integration contract allows the Synthetix protocol to create a unique environment for integrators, allowing access to Synthetix's exchange functionalities with custom parameters that fit individual use cases. Although this sip is built on top of v2x, it fits in the spirit of what we should expect with Synthetix v3, where different markets can be created and tailored for specific offerings and use cases.</p>\n<h2 id=\"motivation\" style=\"position:relative;\"><a href=\"#motivation\" aria-label=\"motivation permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Motivation</h2>\n<!--This is the problem statement. This is the *why* of the SIP. It should clearly explain *why* the current state of the protocol is inadequate.  It is critical that you explain *why* the change is needed, if the SIP proposes changing how something is calculated, you must address *why* the current calculation is innaccurate or wrong. This is not the place to describe how the SIP will address the issue!-->\n<p>There are a number of benefits to the Synthetix protocol from having a direct integration path with partners:</p>\n<ul>\n<li>Lyra's uses Synthetix's exchange functionalities in to offer it's users options trading venue with an integrated amm model which embeds slippage.</li>\n<li>Curve  also provides Synthetix with pools that allow for cross-asset swaps with built-in slippage.</li>\n</ul>\n<p>Both these protocols have a significantly reduced chance of latency attacks, due to their protocol's incorporation of slippage constraining toxic flow to a certain extent. Providing these special <code>DirectIntegrationManager</code> routes into Synthetix's exchange functionalities isolates the trade flow to a certain extent and allows us to offer more competitive offerings via lower fees.</p>\n<h2 id=\"direct-integration-workflow\" style=\"position:relative;\"><a href=\"#direct-integration-workflow\" aria-label=\"direct integration workflow permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Direct Integration Workflow</h2>\n<p>The workflow of adding a directing integration external contract (or EOA) to interact with Synthetix exchange functions is as follows:</p>\n<ul>\n<li>The entity submits a SIP specifying the motivation behind the integration, the benefits to and risks undertaken by SNX stakers. The SIP should include the following:\n<ul>\n<li>The address of the contract (or EOA). In case the address is yet to be available, the SIP needs to be amended at later date, and the amendment approved by the Spartan Council.</li>\n<li>The list of currency keys on which to incorporate overrides</li>\n<li>The parameter overrides involved. If the default parameters are to be used, then no override needs to be specified in the SIP.</li>\n</ul>\n</li>\n<li>The custodian of the integration (the person/entity responsible for seen the process through) needs to find the necessary resource to create a designated contract that would interact with synthetix at the over-ridden environment. The contract is submitted to Synthetix's auditors and Core-Contributors for review and if no objection from auditors/Core-Contributors and all the previous requirements are met (in terms of gathering the necessary vote), the contract is incorporated into the <code>DirectIntegrationManager</code> contract with the specified parameter overrides.</li>\n</ul>\n<p>Alternatively, the SC can designate an <code>EOA</code> which can directly interact with synthetix at the over-ridden parameters, this still requires the normal SIP governance submission and approval. Obviously, there are more risks to the protocol involved when undertaking this expedited approach.</p>\n<h2 id=\"specification\" style=\"position:relative;\"><a href=\"#specification\" aria-label=\"specification permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Specification</h2>\n<!--The specification should describe the syntax and semantics of any new feature, there are five sections\n1. Overview\n2. Rationale\n3. Technical Specification\n4. Test Cases\n5. Configurable Values\n-->\n<h3 id=\"technical-specification\" style=\"position:relative;\"><a href=\"#technical-specification\" aria-label=\"technical specification permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Technical Specification</h3>\n<p>The <code>DirectIntegrationManager</code> contract allows the Spartan Council to approve an address (contract or EOA), to interact with the Synthetix's core exchange functionalities at specified parameters. If parameters specified under <code>setExchangeParameters</code> are set to <code>0</code> or the <code>0x</code> address, then the default parameters configuration would be used. Below are the functionalities configurable within the <code>DirectIntegrationManager</code> contract:</p>\n<h4 id=\"set-exchange-parameters\" style=\"position:relative;\"><a href=\"#set-exchange-parameters\" aria-label=\"set exchange parameters permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Set Exchange Parameters</h4>\n<p><code>setExchangeParameters</code> allows the protocol to specify the parameters of the exchange functionalities that go through the <code>DirectIntegrationManager</code> contract. It takes in the following structure:</p>\n<ul>\n<li>The address of the <code>msg.sender</code> which is allowed to interact with synthetix contracts with specialized parameters</li>\n<li>The currencyKey on which parameter overrides are implemented</li>\n<li>The list of override values that governs the environment under which a specified  address is able to interact with synthetix contracts:\n<ul>\n<li><code>dexPriceAggregator</code></li>\n<li><code>atomicEquivalentForDexPricing</code></li>\n<li><code>atomicExchangeFeeRate</code></li>\n<li><code>atomicTwapWindow</code></li>\n<li><code>atomicMaxVolumePerBlock</code></li>\n<li><code>atomicVolatilityConsiderationWindow</code></li>\n<li><code>atomicVolatilityUpdateThreshold</code></li>\n<li><code>exchangeFeeRate</code></li>\n<li><code>exchangeMaxDynamicFee</code></li>\n<li><code>exchangeDynamicFeeRounds</code></li>\n<li><code>exchangeDynamicFeeThreshold</code></li>\n<li><code>exchangeDynamicFeeWeightDecay</code></li>\n</ul>\n</li>\n</ul>\n<p><strong>Few things worth noting:</strong></p>\n<ul>\n<li>The parameters are applicable on the <code>sourceCurrencyKey</code> of a trade, for example setting <code>atomicMaxVolumePerBlock</code> to 10m$ on sUSD and 20m$ on sETH and someone does a trade from sUSD to sETH, then the <code>maxVolumePerBlock</code> applicable on this trade would be that of sUSD.</li>\n<li>The parameters are applicable on both the source and destination currency keys, for cases involving dynamic fees and fees for exchange, since the fee levied is basically the sum of the fees assigned to the source and destination legs of the transaction.</li>\n<li>The view functions <code>effectiveAtomicValueAndRates</code>, <code>getAmountForAtomicExchange</code> and <code>getAmountsForExchange</code> behave based on the address calling them. Hence the returned values reflect the environment assigned to an integration address.</li>\n</ul>\n<h4 id=\"get-exchange-parameters\" style=\"position:relative;\"><a href=\"#get-exchange-parameters\" aria-label=\"get exchange parameters permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Get Exchange Parameters</h4>\n<p>This function return the set of settings configured for a given address and currencyKey combination. If an address / currencyKey combination is not configured with any overrides, this would just return the global parameters from system settings. Any overrides would be applied if applicable.\nBelow is what can be expected when <code>getExchangeParameters</code> is called with the <code>0x</code> address and <code>sUSD</code> as the integration <code>currencyKey</code>:</p>\n<pre><code>{'currencyKey': 'sUSD',\n 'dexPriceAggregator': '0xf120F029Ac143633d1942e48aE2Dfa2036C5786c',\n 'atomicEquivalentForDexPricing': '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',\n 'atomicExchangeFeeRate': 0,\n 'atomicTwapWindow': 1800,\n 'atomicMaxVolumePerBlock': 100000000000000000000000,\n 'atomicVolatilityConsiderationWindow': 0,\n 'atomicVolatilityUpdateThreshold': 0,\n 'exchangeFeeRate': 0,\n 'exchangeMaxDynamicFee': 50000000000000000,\n 'exchangeDynamicFeeRounds': 0,\n 'exchangeDynamicFeeThreshold': 4000000000000000,\n 'exchangeDynamicFeeWeightDecay': 900000000000000000}\n</code></pre>\n<h4 id=\"resume--pause-integration\" style=\"position:relative;\"><a href=\"#resume--pause-integration\" aria-label=\"resume  pause integration permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Resume / Pause Integration</h4>\n<p>The <code>SystemStatus</code> would include <code>resumeDirectIntegration</code> and <code>suspendDirectIntegration</code> functions, that take in the external contract address and allows pdao to suspend and resume interaction with external contracts.</p>\n<h3 id=\"other-important-considerations\" style=\"position:relative;\"><a href=\"#other-important-considerations\" aria-label=\"other important considerations permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Other Important Considerations:</h3>\n<p>In future SIP's, such as <a href=\"https://sips.synthetix.io/sips/sip-272/\">SIP-272</a>, the direct integration universe would need to be updated as to incorporate new parameters and functions configured into synthetix's systems.</p>\n<h3 id=\"test-cases\" style=\"position:relative;\"><a href=\"#test-cases\" aria-label=\"test cases permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Test Cases</h3>\n<!--Test cases for an implementation are mandatory for SIPs but can be included with the implementation..-->\n<ul>\n<li>Setting a Direct Integration (DI) account to have 40 bp sETH atomic exchange fees and 10 bp sUSD fees, while standard fees being 10 bp sETH and 5 bp on sUSD\n<ul>\n<li>When the DI account attempts to trade atomically 100 sUSD to sETH\n<ul>\n<li>✅ Then it succeeds and the following take place:\n<ul>\n<li>50 bp fees are levied on the trade</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>When the a non-DI account attempts the same trade atomically 100 sUSD to sETH\n<ul>\n<li>✅ Then it succeeds and the following take place:\n<ul>\n<li>15 bp fees are levied on the trade</li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>Setting a Direct Integration (DI) account to have 0 bp sEUR atomic exchange fees and 30 bp sUSD fees, while standard fees being 15 bp sEUR and 5 bp on sUSD\n<ul>\n<li>When the DI account attempts to trade atomically 100 sUSD to sETH\n<ul>\n<li>✅ Then it succeeds and the following take place:\n<ul>\n<li>45 bp fees are levied on the trade, being the DI fees on sUSD and  standard fees on EUR</li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>Setting a Direct Integration (DI) <code>maxAtomicVolumePerBlock</code> to 2000$ per block on sUSD and 1000$ on sETH while the standard parameters being 100$\n<ul>\n<li>When a non DI account attempts to trade 101 sUSD to sETH\n<ul>\n<li>❌ Then transaction reverts, due to exceeding max volume per block</li>\n</ul>\n</li>\n<li>When an DI account attempts to trade 50 sUSD to sETH and subsequently in the same block a non-DI account trades 50 sUSD to sETH\n<ul>\n<li>✅ Then both transactions succeed</li>\n</ul>\n</li>\n<li>When an DI account attempts to trade 2000 sUSD to sETH and subsequently in the same block a non-DI account trades 100 sUSD to sETH\n<ul>\n<li>✅ Then the DI account transaction succeeds</li>\n<li>❌ Then the non-DI account transaction reverts</li>\n</ul>\n</li>\n<li>When an DI account attempts to trade 2000 sUSD to sETH and subsequently in the same block a DI account trades 1 sETH to sUSD\n<ul>\n<li>✅ Then the DI sUSD to sETH trades succeeds</li>\n<li>❌ Then the DI sETH to sUSD trade reverts</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>Setting the DI account to route through 30 bp uni pools while the non-DI accounts routes through 5 bp pools\n<ul>\n<li>When the DI account trades atomically\n<ul>\n<li>✅ Then the tx succeeds and the trade is routed through 30 bp uni pool</li>\n</ul>\n</li>\n<li>When a non-DI account trades atomically\n<ul>\n<li>✅ Then the tx succeeds and the trade is routed through the 5 bp uni pool</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>Setting the base exchange fee on a DI account to 50 bp on sETH and 10 bp on sUSD, while the standard fees are 20 bp and 5 bp\n<ul>\n<li>Setting the DI and standard <code>setExchangeDynamicFeeRounds</code> to 0\n<ul>\n<li>When the DI account trades with the standard exchange functionality 100 sUSD to sETH\n<ul>\n<li>✅ Then the tx succeeds and 60 bp fees are levied</li>\n</ul>\n</li>\n<li>When a non-DI account trades with the standard exchange functionality 100 sUSD to sETH\n<ul>\n<li>✅ Then the tx succeeds and 25 bp fees are levied</li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>Setting the base exchange fee 0 bp on sETH and 0 bp on sUSD\n<ul>\n<li>\n<p>Setting the DI dynamic fee parameters as follows</p>\n<p>a) <code>setExchangeDynamicFeeWeightDecay</code> to 0.8</p>\n<p>b) <code>setExchangeDynamicFeeThreshold</code> to 0.1%</p>\n<p>c) <code>setExchangeDynamicFeeRounds</code> to 5</p>\n<p>d) <code>setExchangeMaxDynamicFee</code> to 10%</p>\n<p>e) update the ETH price print to 1200$ / 1220$ / 1250$ / 1240$ / 1230$</p>\n</li>\n<li>\n<p>While the standard non DI <code>setExchangeDynamicFeeRounds</code> is 0.</p>\n<ul>\n<li>When the DI account trades with the standard exchange functionality 100 sUSD to sETH\n<ul>\n<li>✅ Then the tx succeeds and 3.58% fees are levied</li>\n</ul>\n</li>\n<li>When the non-Di accounts trades with the standard exchange function 100 sUSD to sETH\n<ul>\n<li>✅ Then the tx succeeds and no fees are levied</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>\n<p>Setting the standard dynamic fee parameters as follows</p>\n<p>a) <code>setExchangeDynamicFeeWeightDecay</code> to 0.5</p>\n<p>b) <code>setExchangeDynamicFeeThreshold</code> to 0.2%</p>\n<p>c) <code>setExchangeDynamicFeeRounds</code> to 4</p>\n<p>d) <code>setExchangeMaxDynamicFee</code> to 10%</p>\n<p>e) update the ETH price print to 1200$ / 1220$ / 1250$ / 1240$ / 1230$</p>\n</li>\n<li>\n<p>While the  DI <code>setExchangeDynamicFeeRounds</code> is 1.</p>\n<ul>\n<li>When the non-DI account trades with the standard exchange functionality 100 sUSD to sETH\n<ul>\n<li>✅ Then the tx succeeds and 1.65% fees are levied</li>\n</ul>\n</li>\n<li>When the Di accounts trades with the standard exchange function 100 sUSD to sETH\n<ul>\n<li>✅ Then the tx succeeds and no fees are levied</li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>Setting a Direct Integration (DI) with a  <code>atomicVolatilityUpdateThreshold</code> of 10 updates on sETH and <code>atomicConsiderationWindow</code> being set to 60 seconds.  The standard parameters being  15 updates and 60 seconds.\n<ul>\n<li>When 10 oracle updates are pushed in the span of few seconds and DI and an nonDI account attempts to trade 1 sUSD to sETH\n<ul>\n<li>\n<p>✅ Then the non-DI account transaction succeeds</p>\n</li>\n<li>\n<p>❌ Then the DI account transaction reverts</p>\n</li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n<h3 id=\"configurable-values-via-sccp\" style=\"position:relative;\"><a href=\"#configurable-values-via-sccp\" aria-label=\"configurable values via sccp permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Configurable Values (Via SCCP)</h3>\n<!--Please list all values configurable via SCCP under this implementation.-->\n<p>Below is a list of values configurable:</p>\n<ul>\n<li><code>setExchangeParameters</code>: This will allow the protocol to configure integrations, requires a SIP presentation.</li>\n<li><code>suspendDirectIntegration</code> and <code>resumeDirectIntegration</code> can be called by pDAO to cease and resume interaction on the <code>DirectIntegrationManager</code> contract. Note that <code>suspendDirectIntegration</code> can be called by pdao in case of emergencies, but <code>resumeDirectIntegration</code> requires a SCCP.</li>\n</ul>\n<h2 id=\"copyright\" style=\"position:relative;\"><a href=\"#copyright\" aria-label=\"copyright permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Copyright</h2>\n<p>Copyright and related rights waived via <a href=\"https://creativecommons.org/publicdomain/zero/1.0/\">CC0</a>.</p>"}},"pageContext":{"id":"b214b417-d9f9-5ae1-979f-f8397e5620d0","frontmatter__sip":267,"__params":{"frontmatter__sip":"267"}}},"staticQueryHashes":[]}