DXdao Trading Plug-In: Gnosis Protocol Relayer

It’s been a while since the first discussions around treasury rebalancing and the opportunity for the DXdao to trade tokens arose. The last few weeks we’ve been working on an integration between DAOstack & Gnosis Protocol that enables the DXdao and potentially any other DAO to facilitate token trades on Gnosis Protocol in a fully trustless way. We’ve just finalised the audit process and I want to shortly provide an overview of the implementation and lay out a roadmap for the first trade.

Why do we need a relayer?

While most of us are used to trade tokens on different AMMs with our personal wallets, a trade from a DAO brings its own challenges that require some specialized design in order to ensure expected trading results. To summarize, the challenges faced by trading tokens as DXdao:

Timing - To ratify a proposal typically takes 8 days & it’s impossible to predict market prices 1 week prior to execution. While we potentially could create (multiple) limit orders, they could quickly become out of sync with a fast moving market.

Transparency - orders are fully transparent, any arbitrageurs or front-running bots will have ample time to plan ahead.

With the relayer we’re using on-chain price oracles that observe prices from AMMs, such as Swapr, Uniswap or any other Uniswap-style AMM, over a given period right after the proposal has been ratified by the DAO and places an order on GP based on the calculated average price from the oracle observations.

Example Trading Walkthrough

Let’s say we decide to trade 500 ETH from the DXdao treasury to DAI, the process would look like this:

  1. A proposal to transfer 500 ETH to the GP Relayer using a regular Funding & Voting Power proposal is being created.

  2. A GP trading proposal is created using the Multicall Scheme on Alchemy. The potential parameters could look like this:

    • TokenIn: ETH
    • TokenOut: DAI
    • TokenInAmount: 500 ETH
    • MinAmountOut: 300,000 DAI
    • PriceTolerance: 0.5%
    • MinReserve: 10,000 ETH
    • Deadline: 14 days
    • PriceOracle: Uniswap

    Note: Separating the token transfer & order creation in two separate proposals is an additional security mechansism we decided to go for now – we’ve prioritised security over UX. We will continue to research about new solutions for Multicall that will allow us to move funds directly.

  3. Right after the proposal has been ratified and executed by the DAO, an on-chain oracle will be established that measures the price on the defined PriceOracle for two times in a span over 120 seconds. The price will only be recorded if the ETH reserve, in our case the ETH/DAI pool on Uniswap is higher than 10,000 ETH.

  4. As soon as the on-chain observation has been finalised a trade on Gnosis Protocol will be placed with 500 ETH in and an amountOut = (averagePrice * expectedToken) - priceTolerance. The price tolerance is a way to add additional slippage tolerance to make sure the trade is executed faster by expecting a certain price movement right after the observation.

  5. Once the trade has been placed & matched on GP, anybody can trigger a transaction to release the DAI from Gnosis Protocol and send them back to the DXdao treasury, there’s no need for an additional proposal.

Additional functionality that we might want to use in specific scenarios:

  • If the deadline is reached anybody can withdraw the GP order and send the inputTokens back to the DXdao treasury
  • Any ETH or ERC20 token sitting in the relayer can be sent back to the DXdao treasury by using a proposal.

Codebase

The most recent release can be found here:

The audit & post-audit report can be found here:

https://gateway.ipfs.io/ipfs/QmdCvSMRkKWxJmdLZVu7REJa67LGFoPchuMeUYVMNYosn6

What’s next?

There are some technical tasks to be delivered in the coming days, we’ll be working on. Additionally I propose to run a first test trade on Mainnet to confirm everything is working as expected – a trade size around $10k might be reasonable?

Task Timeline / Finalisation
xDAI deployment (Oracle whitelist: Honeyswap) Dec 20th
Mainnet deployment (Oracle whitelist: Uniswap, Swapr) Dec 20th
Multicall Scheme Deployment Dec 20th
Find consensus on test trade Dec 25th
Security Bot Integration Dec 25th
Multicall Installation Proposal Jan 7th
Execute test trade (2 proposals) Jan 14th
Twitter & blog post to cover first (DX)dao trade? Jan 14th

The status can be tracked in the project board: https://github.com/nicoelzer/gnosis-protocol-relayer/projects/2

7 Likes

Someone deployed the Gnosis Protocol Relayer contracts. After comparing the contract bytecodes, I confirm the contracts have been deployed as expected. As of DAOtalk character limit the post is splittet in two separate posts.

Oracle Creator:

Expected Bytecode:

608060405234801561001057600080fd5b50611100806100206000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c80634023282b1161005b5780634023282b146100d35780635b69a7d8146100e657806382ab890a14610110578063c6668d45146101255761007d565b806306649d67146100825780630eb5295f146100ab57806325fa7003146100b3575b600080fd5b610095610090366004610d6c565b610145565b6040516100a29190611028565b60405180910390f35b61009561055c565b6100c66100c1366004610d3c565b610562565b6040516100a29190610df7565b6100956100e1366004610d9b565b61057a565b6100f96100f4366004610d3c565b610654565b6040516100a29b9a99989796959493929190611031565b61012361011e366004610d3c565b6106e8565b005b610138610133366004610d3c565b61088a565b6040516100a29190610f70565b6000808290506000816001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561018657600080fd5b505afa15801561019a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101be9190610cc5565b90506000826001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b1580156101fb57600080fd5b505afa15801561020f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102339190610cc5565b90506000836001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b15801561027057600080fd5b505afa158015610284573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102a89190610ce8565b92505050604051806101600160405280888152602001846001600160a01b03168152602001836001600160a01b03168152602001856001600160a01b031681526020018263ffffffff168152602001856001600160a01b0316635909c0d56040518163ffffffff1660e01b815260040160206040518083038186803b15801561033057600080fd5b505afa158015610344573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103689190610d54565b8152602001856001600160a01b0316635a3d54936040518163ffffffff1660e01b815260040160206040518083038186803b1580156103a657600080fd5b505afa1580156103ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103de9190610d54565b81526040805160208181018352600080835281850192909252825180820184528281528385015260608085018390523360809586015260018054845283835292849020865181559186015182840180546001600160a01b039283166001600160a01b03199182161790915587860151600285018054918416918316919091179055918701516003840180549789015163ffffffff16600160a01b0263ffffffff60a01b1992841698851698909817919091169690961790955560a0860151600483015560c0860151600583015560e0860151516006830180546001600160e01b039283166001600160e01b0319918216179091556101008801515160078501805491909316911617905561012086015160088301556101409095015160099091018054918516919095161790935582548084019093555191965085169086907ffe5474489c150632f13da433a8fbebd5e91fe495940c6776c0b3934f5f636c509061054a908b90611028565b60405180910390a35050505092915050565b60015481565b60009081526020819052604090206008015460021490565b6000838152602081905260408120610590610c19565b60018201546001600160a01b03868116911614156105c95750604080516020810190915260068201546001600160e01b0316815261061e565b60028201546001600160a01b038681169116146106015760405162461bcd60e51b81526004016105f890610e39565b60405180910390fd5b50604080516020810190915260078201546001600160e01b031681525b610636610631828663ffffffff61095916565b6109b8565b71ffffffffffffffffffffffffffffffffffff169695505050505050565b600060208181529181526040908190208054600182015460028301546003840154600485015460058601548751808a01895260068801546001600160e01b03908116825289519a8b0190995260078801549098168952600887015460099097015495986001600160a01b03958616989486169786851697600160a01b90950463ffffffff169693959294929391929091168b565b600081815260208190526040902060098101546001600160a01b031633146107225760405162461bcd60e51b81526004016105f890610e02565b60028160080154106107465760405162461bcd60e51b81526004016105f890610f2b565b600381015460009081908190610764906001600160a01b03166109bf565b600387015460088801549396509194509250600160a01b900463ffffffff1682039015806107995750845463ffffffff821610155b6107b55760405162461bcd60e51b81526004016105f890610eb3565b60405180602001604052808263ffffffff1687600401548703816107d557fe5b046001600160e01b0390811690915290516006870180546001600160e01b0319169190921617905560408051602081019091526005860154819063ffffffff84169086038161082057fe5b046001600160e01b0390811690915290516007870180546001600160e01b03191691909216179055506004840192909255600583015560038201805463ffffffff60a01b1916600160a01b63ffffffff909316929092029190911790556008018054600101905550565b610892610c2b565b50600090815260208181526040918290208251610160810184528154815260018201546001600160a01b0390811682850152600283015481168286015260038301548082166060840152600160a01b900463ffffffff166080830152600483015460a0830152600583015460c08301528451808501865260068401546001600160e01b03908116825260e084019190915285519485019095526007830154909416835261010081019290925260088101546101208301526009015490911661014082015290565b610961610cb2565b600082158061098757505082516001600160e01b03168281029083828161098457fe5b04145b6109a35760405162461bcd60e51b81526004016105f890610e70565b60408051602081019091529081529392505050565b5160701c90565b60008060006109cc610b94565b9050836001600160a01b0316635909c0d56040518163ffffffff1660e01b815260040160206040518083038186803b158015610a0757600080fd5b505afa158015610a1b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a3f9190610d54565b9250836001600160a01b0316635a3d54936040518163ffffffff1660e01b815260040160206040518083038186803b158015610a7a57600080fd5b505afa158015610a8e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab29190610d54565b91506000806000866001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b158015610af257600080fd5b505afa158015610b06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b2a9190610ce8565b9250925092508363ffffffff168163ffffffff1614610b8a5780840363ffffffff8116610b578486610b9e565b516001600160e01b031602969096019563ffffffff8116610b788585610b9e565b516001600160e01b0316029590950194505b5050509193909250565b63ffffffff421690565b610ba6610c19565b6000826001600160701b031611610bcf5760405162461bcd60e51b81526004016105f890610ef4565b6040805160208101909152806001600160701b0384166dffffffffffffffffffffffffffff60701b607087901b1681610c0457fe5b046001600160e01b0316815250905092915050565b60408051602081019091526000815290565b6040518061016001604052806000815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160006001600160a01b03168152602001600063ffffffff1681526020016000815260200160008152602001610c91610c19565b8152602001610c9e610c19565b815260006020820181905260409091015290565b6040518060200160405280600081525090565b600060208284031215610cd6578081fd5b8151610ce18161109d565b9392505050565b600080600060608486031215610cfc578182fd5b8351610d07816110b5565b6020850151909350610d18816110b5565b604085015190925063ffffffff81168114610d31578182fd5b809150509250925092565b600060208284031215610d4d578081fd5b5035919050565b600060208284031215610d65578081fd5b5051919050565b60008060408385031215610d7e578182fd5b823591506020830135610d908161109d565b809150509250929050565b600080600060608486031215610daf578283fd5b833592506020840135610dc18161109d565b929592945050506040919091013590565b6001600160a01b03169052565b516001600160e01b03169052565b63ffffffff169052565b901515815260200190565b6020808252601f908201527f4f7261636c6543726561746f723a2043414c4c45525f4e4f545f4f574e455200604082015260600190565b6020808252601c908201527f4f7261636c6543726561746f723a20494e56414c49445f544f4b454e00000000604082015260600190565b60208082526023908201527f4669786564506f696e743a204d554c5449504c49434154494f4e5f4f564552466040820152624c4f5760e81b606082015260800190565b60208082526021908201527f4f7261636c6543726561746f723a20504552494f445f4e4f545f454c415053456040820152601160fa1b606082015260800190565b60208082526017908201527f4669786564506f696e743a204449565f42595f5a45524f000000000000000000604082015260600190565b60208082526025908201527f4f7261636c6543726561746f723a2046494e49534845445f4f4245525345525660408201526420aa24a7a760d91b606082015260800190565b81518152602080830151610160830191610f8c90840182610dd2565b506040830151610f9f6040840182610dd2565b506060830151610fb26060840182610dd2565b506080830151610fc56080840182610ded565b5060a083015160a083015260c083015160c083015260e0830151610fec60e0840182610ddf565b506101008084015161100082850182610ddf565b505061012083810151908301526101408084015161102082850182610dd2565b505092915050565b90815260200190565b9a8b526001600160a01b03998a1660208c015297891660408b015295881660608a015263ffffffff94909416608089015260a088019290925260c0870152516001600160e01b0390811660e0870152905116610100850152610120840152166101408201526101600190565b6001600160a01b03811681146110b257600080fd5b50565b6001600160701b03811681146110b257600080fdfea26469706673582212205dd0c4aaa6a8d17ad4dee13efbe572998a0bef43735811dec69cf2ce7c7e8af164736f6c63430006060033
1 Like

GnosisProtocolRelayer:

Expected Bytecode:

6101e0604052620291ac608052620f424060a052662386f26fc1000060c052607860e0526001600160e01b0319610120526001600160801b0319610140523480156200004a57600080fd5b506040516200331c3803806200331c8339810160408190526200006d91620001ec565b60008351116200009a5760405162461bcd60e51b815260040162000091906200032e565b60405180910390fd5b606085811b6001600160601b03199081166101605285821b811661018052600080546001600160a01b0319166001600160a01b038581169190911790915588831b82166101a0529184901b166101c0526040805163724600af60e11b815290519186169163e48c015e91600480820192602092909190829003018186803b1580156200012557600080fd5b505afa1580156200013a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000160919062000301565b60e01b6001600160e01b0319166101005260005b8351811015620001cc576001600360008684815181106200019157fe5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff191691151591909117905560010162000174565b50505050505050620003de565b8051620001e681620003c5565b92915050565b60008060008060008060c0878903121562000205578182fd5b86516200021281620003c5565b809650506020808801516200022781620003c5565b60408901519096506200023a81620003c5565b60608901519095506001600160401b0381111562000256578384fd5b8089018a601f82011262000268578485fd5b80519150620002816200027b83620003a5565b6200037e565b82815283810190828501858502840186018e10156200029e578788fd5b8793505b84841015620002cc57620002b78e82620001d9565b835260019390930192918501918501620002a2565b508097505050505050620002e48860808901620001d9565b9150620002f58860a08901620001d9565b90509295509295509295565b60006020828403121562000313578081fd5b815163ffffffff8116811462000327578182fd5b9392505050565b60208082526030908201527f476e6f73697350726f746f636f6c52656c617965723a204d495353494e475f4660408201526f1050d513d49657d5d2125511531254d560821b606082015260800190565b6040518181016001600160401b03811182821017156200039d57600080fd5b604052919050565b60006001600160401b03821115620003bb578081fd5b5060209081020190565b6001600160a01b0381168114620003db57600080fd5b50565b60805160a05160c05160e0516101005160e01c6101205160e01c6101405160801c6101605160601c6101805160601c6101a05160601c6101c05160601c612e03620005196000398061051e528061056c5280610a495280610a6c5280610afc5280610f985280610fea528061108b52806111bd528061148a52806119b45250806105e65280610630528061070052806108bd528061111d528061159452806115d65280611cc15280611d045250806104565280610f2d528061176952806117b55250806107c65280610834528061184552806118ef5280611bd15250806104325280611b305250806106a452806109ac525080611b7b5280611d2f5250806108585280610e2e5250806112d952806115fd52508061096c5280611a5e5280611ace5280611d535250806110f952806112fd5250612e036000f3fe60806040526004361061014f5760003560e01c80638c0a63bf116100b6578063d081f2b81161006f578063d081f2b814610384578063d41bee5614610399578063d530f4e7146103b9578063e48c015e146103d9578063ec6ea812146103ee578063ffc5ea0d1461040357610156565b80638c0a63bf146102cd5780638da5cb5b146102e2578063a85c38ef146102f7578063ad5c46481461032f578063c23c1c9f14610344578063c58125bc1461036457610156565b8063514fcac711610108578063514fcac71461023b578063607695511461025b57806378f75317146102705780637a3feb38146102855780638570c8a91461029857806389476069146102ad57610156565b8063096563651461015b5780630b34538e146101865780631373f170146101a85780632453ffa8146101d55780632cb2db61146101f75780633e93e2011461021957610156565b3661015657005b600080fd5b34801561016757600080fd5b50610170610430565b60405161017d9190612ce4565b60405180910390f35b34801561019257600080fd5b5061019b610454565b60405161017d919061246f565b3480156101b457600080fd5b506101c86101c3366004612259565b610478565b60405161017d919061258f565b3480156101e157600080fd5b506101ea61048d565b60405161017d9190612d35565b34801561020357600080fd5b506102176102123660046123e6565b610493565b005b34801561022557600080fd5b5061022e6106a2565b60405161017d9190612d7d565b34801561024757600080fd5b506102176102563660046123e6565b6106c6565b34801561026757600080fd5b5061019b610832565b34801561027c57600080fd5b506101ea610856565b6101ea610293366004612298565b61087a565b3480156102a457600080fd5b5061019b610f07565b3480156102b957600080fd5b506102176102c8366004612259565b610f16565b3480156102d957600080fd5b506101ea6110f7565b3480156102ee57600080fd5b5061019b61111b565b34801561030357600080fd5b506103176103123660046123e6565b61113f565b60405161017d9c9b9a9998979695949392919061249d565b34801561033b57600080fd5b5061019b6111bb565b34801561035057600080fd5b5061021761035f3660046123e6565b6111df565b34801561037057600080fd5b5061021761037f3660046123e6565b611589565b34801561039057600080fd5b506101ea6115fb565b3480156103a557600080fd5b506102176103b43660046123e6565b61161f565b3480156103c557600080fd5b506102176103d4366004612325565b611cb6565b3480156103e557600080fd5b5061022e611d2d565b3480156103fa57600080fd5b506101ea611d51565b34801561040f57600080fd5b5061042361041e3660046123e6565b611d75565b60405161017d9190612c20565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b60036020526000908152604090205460ff1681565b60015481565b600081815260026020526040902060015482106104cb5760405162461bcd60e51b81526004016104c290612b4f565b60405180910390fd5b806006015442116104ee5760405162461bcd60e51b81526004016104c2906127af565b6009810154600160a01b900460ff161561051a5760405162461bcd60e51b81526004016104c2906128d3565b80547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161415610619576002810154604051632e1a7d4d60e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691632e1a7d4d916105a9916001600160801b031690600401612ce4565b600060405180830381600087803b1580156105c357600080fd5b505af11580156105d7573d6000803e3d6000fd5b505050600282015461061491507f0000000000000000000000000000000000000000000000000000000000000000906001600160801b0316611e40565b61065e565b8054600282015461065e916001600160a01b0316907f0000000000000000000000000000000000000000000000000000000000000000906001600160801b0316611ed2565b60098101805460ff60a01b1916600160a01b17905560405182907f3f9d01b8340245ea975087559a7911155f1b300f5b19aa35fcc67d4adf962c8590600090a25050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600081815260026020526040902060015482106106f55760405162461bcd60e51b81526004016104c290612b4f565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461073d5760405162461bcd60e51b81526004016104c29061264a565b6009810154600160a01b900460ff166107685760405162461bcd60e51b81526004016104c290612766565b6040805160018082528183019092526060916020808301908036833701905050905081600801548160008151811061079c57fe5b61ffff909216602092830291909101909101526040516312f706d360e21b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690634bdc1b4c906107fb908490600401612547565b600060405180830381600087803b15801561081557600080fd5b505af1158015610829573d6000803e3d6000fd5b50505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b6001600160a01b03811660009081526003602052604081205460ff166108b25760405162461bcd60e51b81526004016104c2906129a7565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146108fa5760405162461bcd60e51b81526004016104c29061264a565b876001600160a01b0316896001600160a01b0316141561092c5760405162461bcd60e51b81526004016104c290612b0c565b6000876001600160801b031611801561094e57506000866001600160801b0316115b61096a5760405162461bcd60e51b81526004016104c290612a7c565b7f00000000000000000000000000000000000000000000000000000000000000008511156109aa5760405162461bcd60e51b81526004016104c2906127fa565b7f000000000000000000000000000000000000000000000000000000000000000063ffffffff168311156109f05760405162461bcd60e51b81526004016104c290612a35565b82421115610a105760405162461bcd60e51b81526004016104c29061288c565b6001600160a01b038916610aec57866001600160801b0316341015610a475760405162461bcd60e51b81526004016104c290612ac7565b7f000000000000000000000000000000000000000000000000000000000000000098507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0886001600160801b03166040518263ffffffff1660e01b81526004016000604051808303818588803b158015610ace57600080fd5b505af1158015610ae2573d6000803e3d6000fd5b5050505050610b1e565b6001600160a01b038816610b1e577f000000000000000000000000000000000000000000000000000000000000000097505b6040516370a0823160e01b81526001600160801b038816906001600160a01b038b16906370a0823190610b5590309060040161246f565b60206040518083038186803b158015610b6d57600080fd5b505afa158015610b81573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba591906123fe565b1015610bc35760405162461bcd60e51b81526004016104c290612bd6565b6000610bd08a8a85611fc0565b90506001600160a01b038116610bf85760405162461bcd60e51b81526004016104c290612724565b610c0061207e565b91506040518061018001604052808b6001600160a01b031681526020018a6001600160a01b03168152602001896001600160801b03168152602001886001600160801b03168152602001878152602001868152602001826001600160a01b031681526020018581526020016000815260200160008152602001846001600160a01b03168152602001600015158152506002600084815260200190815260200160002060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160020160006101000a8154816001600160801b0302191690836001600160801b0316021790555060608201518160020160106101000a8154816001600160801b0302191690836001600160801b031602179055506080820151816003015560a0820151816004015560c08201518160050160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060e08201518160060155610100820151816007015561012082015181600801556101408201518160090160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506101608201518160090160146101000a81548160ff0219169083151502179055509050506000809054906101000a90046001600160a01b03166001600160a01b03166306649d677f0000000000000000000000000000000000000000000000000000000000000000836040518363ffffffff1660e01b8152600401610e6b929190612d3e565b602060405180830381600087803b158015610e8557600080fd5b505af1158015610e99573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ebd91906123fe565b60008381526002602052604080822060070192909255905183917fd56de72b04be4cf70c2bab5e6905fb51e28beb22f7a5d40a6dc4103149d6110691a25098975050505050505050565b6000546001600160a01b031681565b60405163f940e38560e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063f940e38590610f649030908590600401612483565b600060405180830381600087803b158015610f7e57600080fd5b505af1158015610f92573d6000803e3d6000fd5b505050507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b031614156110f4576040516370a0823160e01b81526000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a082319061101f90309060040161246f565b602060405180830381600087803b15801561103957600080fd5b505af115801561104d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061107191906123fe565b604051632e1a7d4d60e01b81529091506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690632e1a7d4d906110c0908490600401612d35565b600060405180830381600087803b1580156110da57600080fd5b505af11580156110ee573d6000803e3d6000fd5b50505050505b50565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b600260208190526000918252604090912080546001820154928201546003830154600484015460058501546006860154600787015460088801546009909801546001600160a01b03978816998816986001600160801b0380891699600160801b909904169794851694909190811690600160a01b900460ff168c565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000818152600260205260409020600154821061120e5760405162461bcd60e51b81526004016104c290612b4f565b80600601544211156112325760405162461bcd60e51b81526004016104c29061288c565b60005460078201546040516325fa700360e01b81526001600160a01b03909216916325fa70039161126591600401612d35565b60206040518083038186803b15801561127d57600080fd5b505afa158015611291573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112b59190612350565b156112d25760405162461bcd60e51b81526004016104c2906129ed565b60006113347f00000000000000000000000000000000000000000000000000000000000000006113287f00000000000000000000000000000000000000000000000000000000000000003a63ffffffff61208b16565b9063ffffffff6120c816565b90506000808360050160009054906101000a90046001600160a01b03166001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b15801561138957600080fd5b505afa15801561139d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113c19190612370565b506001600160701b031691506001600160701b0316915060008460050160009054906101000a90046001600160a01b03166001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561142a57600080fd5b505afa15801561143e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611462919061227c565b85549091506000906001600160a01b0316156114885785546001600160a01b03166114aa565b7f00000000000000000000000000000000000000000000000000000000000000005b9050816001600160a01b0316816001600160a01b031614156114ef5785600401548410156114ea5760405162461bcd60e51b81526004016104c290612918565b611513565b85600401548310156115135760405162461bcd60e51b81526004016104c290612918565b6000546007870154604051634155c48560e11b81526001600160a01b03909216916382ab890a9161154691600401612d35565b600060405180830381600087803b15801561156057600080fd5b505af1158015611574573d6000803e3d6000fd5b50505050844710610829576108293386611e40565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146115d15760405162461bcd60e51b81526004016104c29061264a565b6110f47f000000000000000000000000000000000000000000000000000000000000000082611e40565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000818152600260205260409020600154821061164e5760405162461bcd60e51b81526004016104c290612b4f565b6009810154600160a01b900460ff161561167a5760405162461bcd60e51b81526004016104c2906128d3565b60005460078201546040516325fa700360e01b81526001600160a01b03909216916325fa7003916116ad91600401612d35565b60206040518083038186803b1580156116c557600080fd5b505afa1580156116d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116fd9190612350565b6117195760405162461bcd60e51b81526004016104c29061295d565b806006015442111561173d5760405162461bcd60e51b81526004016104c29061288c565b60098101805460ff60a01b1916600160a01b17905580546002820154611797916001600160a01b0316907f0000000000000000000000000000000000000000000000000000000000000000906001600160801b03166120eb565b805460028201546040516311f9fbc960e21b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116936347e7ef24936117f89391909216916001600160801b03169060040161250c565b600060405180830381600087803b15801561181257600080fd5b505af1158015611826573d6000803e3d6000fd5b5050825460405163ef574d2360e01b8152600093506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116935063ef574d239261187d9291169060040161246f565b60206040518083038186803b15801561189557600080fd5b505afa1580156118a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118cd91906123c4565b600183015460405163ef574d2360e01b81529192506000916001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081169263ef574d239261192892919091169060040161246f565b60206040518083038186803b15801561194057600080fd5b505afa158015611954573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061197891906123c4565b600080546007860154865493945091926001600160a01b0391821692634023282b92909116156119b25786546001600160a01b03166119d4565b7f00000000000000000000000000000000000000000000000000000000000000005b60028801546040516001600160e01b031960e086901b168152611a059392916001600160801b031690600401612d55565b60206040518083038186803b158015611a1d57600080fd5b505afa158015611a31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a5591906123fe565b90506000611aaa7f0000000000000000000000000000000000000000000000000000000000000000611a9487600301548561208b90919063ffffffff16565b81611a9b57fe5b8491900463ffffffff6121d216565b60028601546003870154919250600160801b90046001600160801b031690611b0f907f000000000000000000000000000000000000000000000000000000000000000090611af990849061208b565b81611b0057fe5b8391900463ffffffff6121d216565b821015611b2e5760405162461bcd60e51b81526004016104c290612600565b7f00000000000000000000000000000000000000000000000000000000000000006001600160801b0316821115611b775760405162461bcd60e51b81526004016104c290612842565b60007f000000000000000000000000000000000000000000000000000000000000000063ffffffff16876006015481611bac57fe5b60028901546040516309b0f4e560e21b81529290910492506000916001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916326c3d39491611c16918a918c9188918b916001600160801b031690600401612cf8565b602060405180830381600087803b158015611c3057600080fd5b505af1158015611c44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c6891906123fe565b9050808860080181905550887f38f1372ae30d4273e14ea8b395321dc1e4d5fcad60cd0785b0b34ef99b74f2a182604051611ca39190612d35565b60405180910390a2505050505050505050565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611cfe5760405162461bcd60e51b81526004016104c29061264a565b611d29827f000000000000000000000000000000000000000000000000000000000000000083611ed2565b5050565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b611d7d6121f5565b5060009081526002602081815260409283902083516101808101855281546001600160a01b0390811682526001830154811693820193909352928101546001600160801b0380821695850195909552600160801b9004909316606083015260038301546080830152600483015460a08301526005830154811660c0830152600683015460e083015260078301546101008301526008830154610120830152600990920154918216610140820152600160a01b90910460ff16151561016082015290565b604080516000808252602082019092526001600160a01b038416908390604051611e6a9190612436565b60006040518083038185875af1925050503d8060008114611ea7576040519150601f19603f3d011682016040523d82523d6000602084013e611eac565b606091505b5050905080611ecd5760405162461bcd60e51b81526004016104c290612b93565b505050565b60006060846001600160a01b031663a9059cbb8585604051602401611ef892919061252e565b6040516020818303038152906040529060e01b6020820180516001600160e01b038381831617835250505050604051611f319190612436565b6000604051808303816000865af19150503d8060008114611f6e576040519150601f19603f3d011682016040523d82523d6000602084013e611f73565b606091505b5091509150818015611f9d575080511580611f9d575080806020019051810190611f9d9190612350565b611fb95760405162461bcd60e51b81526004016104c2906125c9565b5050505050565b6001600160a01b03811660009081526003602052604081205460ff16611ff85760405162461bcd60e51b81526004016104c2906129a7565b60405163e6a4390560e01b81526001600160a01b0383169063e6a43905906120269087908790600401612483565b60206040518083038186803b15801561203e57600080fd5b505afa158015612052573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612076919061227c565b949350505050565b6001805480820190915590565b60008115806120a6575050808202828282816120a357fe5b04145b6120c25760405162461bcd60e51b81526004016104c290612691565b92915050565b808201828110156120c25760405162461bcd60e51b81526004016104c2906126bf565b60006060846001600160a01b031663095ea7b3858560405160240161211192919061252e565b6040516020818303038152906040529060e01b6020820180516001600160e01b03838183161783525050505060405161214a9190612436565b6000604051808303816000865af19150503d8060008114612187576040519150601f19603f3d011682016040523d82523d6000602084013e61218c565b606091505b50915091508180156121b65750805115806121b65750808060200190518101906121b69190612350565b611fb95760405162461bcd60e51b81526004016104c2906126ed565b808203828111156120c25760405162461bcd60e51b81526004016104c29061259a565b6040805161018081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e0810182905261010081018290526101208101829052610140810182905261016081019190915290565b60006020828403121561226a578081fd5b813561227581612d8e565b9392505050565b60006020828403121561228d578081fd5b815161227581612d8e565b600080600080600080600080610100898b0312156122b4578384fd5b88356122bf81612d8e565b975060208901356122cf81612d8e565b965060408901356122df81612db8565b955060608901356122ef81612db8565b94506080890135935060a0890135925060c0890135915060e089013561231481612d8e565b809150509295985092959890939650565b60008060408385031215612337578182fd5b823561234281612d8e565b946020939093013593505050565b600060208284031215612361578081fd5b81518015158114612275578182fd5b600080600060608486031215612384578283fd5b835161238f81612da3565b60208501519093506123a081612da3565b604085015190925063ffffffff811681146123b9578182fd5b809150509250925092565b6000602082840312156123d5578081fd5b815161ffff81168114612275578182fd5b6000602082840312156123f7578081fd5b5035919050565b60006020828403121561240f578081fd5b5051919050565b6001600160a01b03169052565b15159052565b6001600160801b03169052565b60008251815b81811015612456576020818601810151858301520161243c565b818111156124645782828501525b509190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039c8d1681529a8c1660208c01526001600160801b03998a1660408c01529790981660608a0152608089019590955260a088019390935290871660c087015260e086015261010085015261012084015292166101408201529015156101608201526101800190565b6001600160a01b039290921682526001600160801b0316602082015260400190565b6001600160a01b03929092168252602082015260400190565b6020808252825182820181905260009190848201906040850190845b8181101561258357835161ffff1683529284019291840191600101612563565b50909695505050505050565b901515815260200190565b60208082526015908201527464732d6d6174682d7375622d756e646572666c6f7760581b604082015260600190565b6020808252601f908201527f5472616e7366657248656c7065723a205452414e534645525f4641494c454400604082015260600190565b6020808252602a908201527f476e6f73697350726f746f636f6c52656c617965723a20494e56414c49445f50604082015269524943455f52414e474560b01b606082015260800190565b60208082526027908201527f476e6f73697350726f746f636f6c52656c617965723a2043414c4c45525f4e4f6040820152662a2fa7aba722a960c91b606082015260800190565b60208082526014908201527364732d6d6174682d6d756c2d6f766572666c6f7760601b604082015260600190565b60208082526014908201527364732d6d6174682d6164642d6f766572666c6f7760601b604082015260600190565b6020808252601e908201527f5472616e7366657248656c7065723a20415050524f56455f4641494c45440000604082015260600190565b60208082526022908201527f476e6f73697350726f746f636f6c52656c617965723a20554e4b4f574e5f504160408201526124a960f11b606082015260800190565b60208082526029908201527f476e6f73697350726f746f636f6c52656c617965723a204f524445525f4e4f5460408201526817d1561150d555115160ba1b606082015260800190565b6020808252602b908201527f476e6f73697350726f746f636f6c52656c617965723a20444541444c494e455f60408201526a1393d517d4915050d2115160aa1b606082015260800190565b60208082526028908201527f476e6f73697350726f746f636f6c52656c617965723a20494e56414c49445f546040820152674f4c4552414e434560c01b606082015260800190565b6020808252602a908201527f476e6f73697350726f746f636f6c52656c617965723a20414d4f554e545f4f55604082015269545f4f465f52414e474560b01b606082015260800190565b60208082526027908201527f476e6f73697350726f746f636f6c52656c617965723a20444541444c494e455f60408201526614915050d2115160ca1b606082015260800190565b60208082526025908201527f476e6f73697350726f746f636f6c52656c617965723a204f524445525f45584560408201526410d555115160da1b606082015260800190565b60208082526025908201527f476e6f73697350726f746f636f6c52656c617965723a20524553455256455f546040820152644f5f4c4f5760d81b606082015260800190565b6020808252602a908201527f476e6f73697350726f746f636f6c52656c617965723a204f42534552564154496040820152694f4e5f52554e4e494e4760b01b606082015260800190565b60208082526026908201527f476e6f73697350726f746f636f6c52656c617965723a20494e56414c49445f466040820152654143544f525960d01b606082015260800190565b60208082526028908201527f476e6f73697350726f746f636f6c52656c617965723a204f425345525641544960408201526713d397d15391115160c21b606082015260800190565b60208082526027908201527f476e6f73697350726f746f636f6c52656c617965723a20494e56414c49445f446040820152664541444c494e4560c81b606082015260800190565b6020808252602b908201527f476e6f73697350726f746f636f6c52656c617965723a20494e56414c49445f5460408201526a13d2d15397d05353d5539560aa1b606082015260800190565b60208082526025908201527f476e6f73697350726f746f636f6c52656c617965723a20494e5355464649454e6040820152640a8be8aa8960db1b606082015260800190565b60208082526023908201527f476e6f73697350726f746f636f6c52656c617965723a20494e56414c49445f5060408201526220a4a960e91b606082015260800190565b60208082526024908201527f476e6f73697350726f746f636f6c52656c617965723a20494e56414c49445f4f604082015263292222a960e11b606082015260800190565b60208082526023908201527f5472616e7366657248656c7065723a204554485f5452414e534645525f46414960408201526213115160ea1b606082015260800190565b6020808252602a908201527f476e6f73697350726f746f636f6c52656c617965723a20494e5355464649454e6040820152692a2faa27a5a2a72fa4a760b11b606082015260800190565b600061018082019050612c34828451612416565b6020830151612c466020840182612416565b506040830151612c596040840182612429565b506060830151612c6c6060840182612429565b506080830151608083015260a083015160a083015260c0830151612c9360c0840182612416565b5060e083810151908301526101008084015190830152610120808401519083015261014080840151612cc782850182612416565b505061016080840151612cdc82850182612423565b505092915050565b6001600160801b0391909116815260200190565b61ffff958616815293909416602084015263ffffffff9190911660408301526001600160801b039081166060830152909116608082015260a00190565b90815260200190565b9182526001600160a01b0316602082015260400190565b9283526001600160a01b039190911660208301526001600160801b0316604082015260600190565b63ffffffff91909116815260200190565b6001600160a01b03811681146110f457600080fd5b6001600160701b03811681146110f457600080fd5b6001600160801b03811681146110f457600080fdfea2646970667358221220987d6ddb059b6bea048bcac4fcac67759f6a8020c73b73873a0313053072181464736f6c63430006060033

Contracts also deployed on xDAI.

Oracle Creator:

GnosisProtocolRelayer:

1 Like