πŸ€–
Smart Contract

Upgradeable Swap Protocol

What is an upgradeable contract?

One of the powerful features of the blockchain is its immutability. On the contrary, the quality of software came from upgrading and patching the code via iterative releases. The upgradeable proxy is a mechanism for upgrading smart contracts that can be controlled by a governance mechanism be it a multi-sig wallet, DAO, or even a simple address.

Why upgradeable?

As stated above, to deliver high-quality software we would love the ability to release the features iteratively. Said features are often new DEX integration, which in return will provide a better rate swap.
So why don't we just deploy a new contract without the proxy? Because that would require our users to approve the ERC-20 every time we change the smart contract. And we believe that won't give the best trading experience which is our aim.
The upgradeable contracts have downsides though. One of them is that a malicious actor can switch the implementation contract into something with unexpected behaviors e.g. stealing users' funds.

How to handle the malicious action?

The address that can execute the upgrade command on the proxy is the Timelock contract. This means everyone can see the upgrade 24 hours ahead of time before the actual change takes place. The users will have a decent amount of time to act accordingly in case a questionable upgrade is about to happen.

Deployed contracts

The explanation of each contract is as follows:
  • TransparentUpgradeableProxy is a proxy contract that points to the implementation (ArkenApprove) contract. The admin of the proxy is ProxyAdmin.
  • ArkenApprove is a contract that allows the transfer of funds only by ArkenDex.
  • ArkenDex is the swap protocol implementation.
  • ProxyAdmin is the admin of the TransparentUpgradeableProxy contract. The owner of this contract is Timelock.
  • Timelock is the timelock mechanism contract. Any administration actions will be done through this contract.
  • Multi-signature required 3 out of 5 owners to confirm the transaction while owners are as follows:
    • 0x77777EEf36045851c3E1832AC0815D0C894cE09f
    • 0xF29D5666174aC2A0743b6926f0e754A9f163736F
    • 0x75C58b0c23b432d0e166b7D9E6384152A49bc09C
    • 0x957964db0510BDD6E87e7516af59B74af7e68c63
    • 0x1dF0db33eFd1000FaB9662019bDb720Ff5cDfF7f

Ethereum

  • Proxy: 0x89d56979795c4b82828d893ac3ffe9711114a6f9
  • ArkenDexV3: 0x1d620454f3a2b17a09aeaa851f77573883505118
  • ArkenApprove: 0xc1fe82f26e5de50e25a5662d82ca2c09d085d35b
  • ProxyAdmin: 0x9ede19ede2baf93d25fba4c8f58577e008b8f963
  • TimelockController: 0xFb5c4D167802099adb085a049B8fA39df769B07d
  • Multi-signature: 0x853186004cFF42d94D0d5EDFCEfeb3eee7f2D9BE

BSC

  • Proxy: 0x1DA2CFDccd1AC5F1093a8c146260C5DC7159ed47
  • ArkenDexV3: 0xf6297d882e28fedf9d39f3c02f81ed9e3c4d9f4e
  • ArkenApprove: 0x96E302293e24768C093c93835e57b8A8b52f034b
  • ProxyAdmin: 0x2136e339c2815Bec09AB897D88eFD28B2f9DA53d
  • TimelockController: 0xD0f83087A8d0Cbe2f9148841b912899c26D0C0b9
  • Multi-signature: 0x047c1D16BAD48f86Dc0fe8FB02be421AF1Ec3D7a
  • ArkenSlamm: 0xc46f78963441f4e73a0b0d1c7352adc4964c51e1

Polygon

  • Proxy: 0x11a768b4Acf0212E9B0800d1B8142763518A4fC5
  • ArkenDexV3: 0xcbd3cBC8707643cC2Ced4B40907041F9627FFB51
  • ArkenApprove: 0xda2309efc83375b6f78137f629f74a3f1584b2c5
  • ProxyAdmin: 0x56AC7D363cA6ADFd65849B6330E6E27b11D5577A
  • TimelockController: 0xB3bBb464485F159B839E1699A352cE6D542c9433
  • Multi-signature: 0x4DD1eCa21257D8bD226eE7e74f6Ac2a2659E9158

Avalanche

  • Proxy: 0x8f8667137Be38ca1973C908ae1A1D27CF0caCCe4
  • ArkenDexV3: 0xB417B70B1A3c22Bc1aECf5E31DCA7E05945057DB
  • ArkenApprove: 0x5E4Bf13dCEf16a01fB14DD2F54c2660C14bFB3C1
  • ProxyAdmin: 0x0db91c7dc41e6cb9c94e11d76478cf249e02afe3
  • TimelockController: 0x6EDd44dD70Dca9947d7D72F664Af3579c92De279
  • Multi-signature: 0x98fD41285C6F9dD2C09D3E45A24Bae4132f718ec

Arbitrum

  • Proxy: 0x8f8667137Be38ca1973C908ae1A1D27CF0caCCe4
  • ArkenDexV3: 0x9Eea8E424Ca2e03beF5eee46668d5D98EA0EAAA7
  • ArkenApprove: 0xd288A09f07C5AfBd65AEa7ba9534D5f830f9d1c6
  • ProxyAdmin: 0x6EDd44dD70Dca9947d7D72F664Af3579c92De279
  • TimelockController: 0xbFabaa95267BA1144051bb8d39766a0A2215985C
  • Multi-signature: 0x41a1552E752Baddf4aFFdd8852093DeEcdE5aC61

Aurora

  • Proxy: 0x85B0b361a4453A4051C532B46209Cd7cE070f15E
  • ArkenDexV3: 0xeE6DB2CC1ed15424A00E62ccDFE23397b54AaB89
  • ArkenApprove: 0x0DB91c7dC41E6CB9C94e11D76478CF249e02Afe3
  • ProxyAdmin: 0xfFA4D6cDF9A2aeb6FcB73808785f83260b6cBd19
  • TimelockController: 0x29c79cB6324a50bd08Ac55C44a92D1A242A535F7
  • Multi-signature: 0xcDC751f0db2b2Cc493a2D3293eF141e5EdC36011

Rei

  • Proxy: 0xC1Fe82f26E5de50e25A5662d82Ca2C09d085D35B
  • ArkenDexV3: 0x5E4Bf13dCEf16a01fB14DD2F54c2660C14bFB3C1
  • ArkenApprove: 0x0DB91c7dC41E6CB9C94e11D76478CF249e02Afe3
  • ProxyAdmin: 0x91aC657bDFF58f526E9B288c410321C7845d20a2
  • TimelockController: 0x6EDd44dD70Dca9947d7D72F664Af3579c92De279

Fantom

  • Proxy: 0xd288A09f07C5AfBd65AEa7ba9534D5f830f9d1c6
  • ArkenDexV3: 0x9EDe19edE2baf93d25FBA4C8F58577E008b8F963
  • ArkenApprove: 0x91aC657bDFF58f526E9B288c410321C7845d20a2
  • ProxyAdmin: 0x91aC657bDFF58f526E9B288c410321C7845d20a2
  • TimelockController: 0x6EDd44dD70Dca9947d7D72F664Af3579c92De279
  • Multi-signature: 0xd231008E5BB015040cdE6f54b6da685A69eA0788
​

Changelog

15 July 2022
  • Add new feature SLAMM on BNB chain
​
17 May 2022
  • Deploy on Fantom Network
​
4 April 2022
  • Deploy on Rei Network
15 March 2022
  • Deploy on Aurora Network
​
3 March 2022
  • Update per CertiK & Inspex Audit
  • Add Multi-signature as privileged roles
    • Executor & Admin of Timelock
    • Owner of ArkenDex for configuration variables control
​
24 January 2022
  • Add Arbitrum contracts
  • Upgrade to ArkenDexV3
    • TransparentUpgradeableProxy now direct at ArkenApprove
    • ArkenDexV3 is no longer behind a proxy
    • Remove EtherWrapper
​
15 November 2021
  • Deploy on Avalanche Network
​
2 November 2021
​
28 October 2021