Skip to content

Releases: argentlabs/argent-contracts

Patching filters

20 May 07:18
Compare
Choose a tag to compare

This minor release patches the initial filter deployment of 2.5.0.

In #240 we add a new filter for WETH which was required for Paraswap and Balancer liquidity providing, and we update the main filter for Paraswap.

In #241 we add a deployment script for the patch which adds the new WETH filter, updates the Paraswap filter, update the Unizap filter for Uniswap V2 with the correct init bytecode, and add two missing filters for Compound.

L1 Vault

23 Apr 14:40
Compare
Choose a tag to compare

Wallet redesign

This is major redesign of the wallet aiming to significantly reduce the gas cost of operating the wallet by simplifying the scope and the code of the smart-contracts. #187

  • The security features designed to protect the wallet from a loss of the owner key remain unchanged (guardians, lock, recovery and transferOwnership).
  • The security features designed to protect the wallet from a theft of the owner key are strengthen yet simplified by:
    • pushing the daily limit to 0 which enables us to remove all the logic associated to it
    • generalising whitelisting by adding, on top of trusted contacts, the ability to opt-in/opt-out from registries of authorised dapps, and introducing a first default registry managed by Argent (to include Compound, Maker, Paraswap, and all the dapps currently integrated in the app).
  • Merging transferToken, approve, callContracts, and approveAndCall into a generic multiCall method that can take as input an array of transactions (to, value data).
  • Removing all the specific modules (ApprovedTransfer, TransferManager, CompoundManager , GuardianManager etc) as their logic can now be implemented through the new multiCall method.

As a result of this reduced scope the entire wallet functionality is implemented in a single ArgentModule which further reduces the cost of creation, operation and upgrades.

Static calls #195
ERC 1271, ERC 721 and ERC 165 supported by default on wallets
Added ERC 1155 support included by default for new wallets, and opt-in via the enableERC1155TokenReceiver() method for old wallets.

Authorisation sessions #196
Extending the concept of guardian approved operations by introducing sessions - additional signing keys that, once approved by a majority of guardians, can be used to bypass all the security checks during a pre-defined validity period.

When completing a recovery procedure any sessions are cleared. #206

Updated Relayer refunds #193
Updates the refund mechanism in the RelayerManager module.

Infrastructure updates

Enable ENS subname registration for the wallet owner. #184

Allow anyone to create wallets #181
removes the restriction on who can create new wallets. Any account possessing a valid signature from a WalletFactory manager can create a wallet. Also constructs the CREATE2 salt in a way that is compatible with zkSync.

Enable refund for wallet creation #191
Updates the WalletFactory to make the creation of wallet payable to the user. The amount and the token used must be approved by the wallet owner through a signature which is then provided to the createCounterfactualWallet method.

DappRegistry #199
uses bit vectors for more gas-efficient reads of authorisations and writes of enabled registries
implements timelocks for updating dapp filters and changing timelock

Filters

  • ParaswapV2, AaveV2, Balancer, Yearn, DSR #208
  • Compound #209
  • Lido #213
  • UniswapV2 #214
  • Paraswap V4 #221
  • Aave V1 #224
  • Additional filter checks for UniV1/V2 & ParaswapPool trades via Paraswap #230
  • Paraswap sub-filters for simpleSwap #236

MultiCallHelper #215
used by clients to determine in 1 call if and why a sequence of transactions will be authorised

Removed price logic from TokenPriceRegistry and renamed it TokenRegistry #227

Non-functional updates

Upgrade contracts to Solidity 0.8 #229
Upgrades all infrastructure, wallet and modules contracts to the latest solidity 0.8.3

Refactor revert error messages to shorten them under 32 characters long. #202

** Integration testing against a mainnet fork**

Make use of immutable properties where possible #223

Remove legacy code #232

Change optimisation runs to 300 for modules (set to 400 in #218 then dropped to 300 in #229)

When wallet is locked no refunds are issued

Change the value of the ETH-TOKEN constant from 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE to address(0) to save gas. #187

Production contracts

0xAb00eA153c43575184ff11Dd5e713c96bE005573 BaseWallet
0x536384FCd25b576265B6775F383D5ac408FF9dB7 WalletFactory
0x3d31D91003f9327623CaEc2e326B6BC681Bc3167 DappRegistry
0x8e4C969571a9C7aE8b5342874Ab532Dd7EB697bF MultiCallHelper
0xD270702a8344C4801Afbd0951cf17A2798700046 TokenRegistry
0x9D58779365B067D5D3fCc6e92d237aCd06F1e6a1 ArgentModule
0xF32FDDEF964b98b1d2d2b1C071ac60ED55d4D217 ArgentENSManager

Towards gas neutrality

18 Feb 13:13
Compare
Choose a tag to compare

Enables refunds for wallet creation #191

Better gas estimation for relayed transactions #180

Updated Production contracts

WalletFactory 0x1d09a6D1C45d1a9Eb8CB8A8354BCd78e225f06d3

Migrate to truffle framework

01 Dec 16:11
Compare
Choose a tag to compare

This is a maintenance-only release (no contracts are upgraded).

It includes the migration from etherlime to the truffle framework used for compilation, testing and deployment of contracts. Additionally a number of truffle extensions have been connected and provide code coverage, gas cost reporting and Etherscan verification. #146

A new script is added to the nightly build that checks all tokens in the TokenPriceRegistry for ERC20 compliance using the slither
https://github.com/crytic/slither/wiki/ERC-Conformance tool. #174

Special thanks ❤️ to
@montyly from Trail of Bits for his continuing support on getting the most of slither
@cgewecke for his code-coverage custom plugin contribution in #177
@rkalis for his support in getting the etherscan verification plugin working rkalis/truffle-plugin-verify#46
@gnidan , @eggplantzzz and the truffle and ganache-cli teams for their continuing support

ArgentWalletDetector and fixes

16 Nov 17:30
Compare
Choose a tag to compare

Maintenance and fix release containing:

Functional updates

ArgentWalletDetector
Add ArgentWalletDetector contract to detect if a given address corresponds to an Argent wallet. #156

TransferManager
Fix EIP1271 isValidSignature static calls on TransferManager #167

Non-functional updates

Add configuration reader script which allows us to read environment configuration #162

Moves TokenPriceRegistry to modules in config #165

Maintenance updates

Partially resolve an issue with contract verification (since 2.1 release) #170

Production contracts

WalletFactory 0x9ae0AcdB750bFcF694675f46B580847fC49A48bF
ENSResolver 0xDa1756Bb923Af5d1a05E277CB1E54f1D0A127890
ENSManager 0xC4BaAbB5b7DFF84Aa8023183E3Ca0bA3B2Fee519
TokenPriceProvider 0xE8a76D2f37Fe50B6A95d27FB92291Fe0B57407d3
ModuleRegistry 0xc17D432Bd8e8850Fd7b32B0270f5AfAc65DB0105
BaseWallet 0x29b94b045a0b828d9eb99136A16d97c7fF3d2600
CompoundRegistry 0xC43472062B4e3763C775956988CC883d4b863d91
MakerRegistry 0x7383757C8a2F4cbc6A21a26e1F33a0fd95e7bb77
DexRegistry 0x38AEED2AF853FCCF5c246E3aEE8bCCcbb5826d87
GuardianStorage 0x44DA3A8051bA88EAB0440DB3779cAB9D679ae76f
TransferStorage 0x391f0e86dA951C03b1183C60b195090671ADea88
ModuleManager 0x4DD68a6C27359E5640Fa6dCAF13631398C5613f1
MakerManager 0x963F86DA34Cf2CE619d4B8e5cE96577943f95B6b
GuardianManager 0x24802b055d0ac0e50e83a035210f93f5ecb4858b
LockManager 0x495b86820b45f7219472eab49945e19c0d5c455d
RecoveryManager 0x4c8afe33affa2dfb6e7628edae3b95ff6087cb02
ApprovedTransfer 0x8510211a852f0c5994051dd85eaef73112a82eb5
TokenExchanger 0x605658d9c507cfebcb8687bbff81e4d4a4fc73b7
NftTransfer 0xe50424df644bc6d7f623c3dcf4b2c3f38e339063
CompoundManager 0x915a2afcde5e4d524e46a541e4019ad37a3a4116
TransferManager 0x5094a8f54b12aec540bf7ccd0dd7b62f4fecf7f2
MakerV2Manager 0x014e746e08490800cc265d381fa75679b0f1b5ea
LimitStorage 0x045B32efA0D97a681Cc415f1B37C972Ad7299a55
TokenPriceRegistry 0xe4db5b456282Eff5fE9f1eb53A3a536Bf56AEffA
LockStorage 0xF657BB6bc979bf34d49e38AfBA34D5FD2A45B0Ca
RelayerManager 0x10a0847c2d170008ddca7c3a688124f493630032
VersionManager 0x645ba45dbe3c6942c812a46f9ee8115c89b524ec

All contracts are verified on Etherscan except for the following: TokenExchanger, TransferManager and LimitStorage due to an issue verifying contracts using the ABIEncoderV2. These can however still be verified locally.

Re-architecture and upgrade to Solidity 0.6

09 Oct 13:46
Compare
Choose a tag to compare

This major release abstracts the wallet modules one layer away behind the new VersionManager module #151 It also focusses on the upgrade of all features and parts of the infrastructure contracts to Solidity v0.6.12 .

Upgraded features: ApprovedTransfer, CompoundManager, GuardianManager, LockManager, NftTransfer, RecoveryManager, TokenExchanger, MakerV2Manager, TransferManager and the new RelayerManager. Additionally disables the MakerManager which is the now legacy Maker logic.

Upgraded infrastructure and wallet contracts: WalletFactory, BaseWallet and Proxy in addition to decommissioning the TokenPriceProvider and introducing TokenPriceRegistry instead.

Functional updates

RelayerManager
Extracted into a standalone module. All meta-transactions must be sent to its execute method which will verify them and relay the call to the target module.

Enable refunds in ETH and ERC20. All refunds are counted towards the daily limit, unless that target action is approved by the owner and a majority of guardians. #131

Failures of the sub-call in execute method are logged in the extended TransactionExecuted event. #97

Transfer modules: ApprovedTransfer and TransferManager
Add two new methods to ApprovedTransfer to simplify the management of the daily limit:

  • changeLimit updates the current value of the daily limit immediately when approved by guardians
  • resetLimit to reset the daily consumption to 0 immediately when approved by guardians

Every action in ApprovedTransfer resets the daily spent amount to 0.

In TransferManager decreasing the daily limit becomes immediate, while increasing the limit remains pending for the duration of the security period. #138

Allows whitelisted tokens to be called in TransferManager #133

Adds approveWethAndCallContract method to both transfer modules which wraps ETH into WETH -> approve WETH -> call a contract #140

TokenExchanger
Integrates with Paraswap instead of Kyber. #121

WalletFactory
ENS label is now optional when creating a wallet. #135

Wallets can only be created with a guardian. Removed factory methods that allow an empty guardian in wallet creation. #132

createCounterfactualWallet method returns the address of the wallet. #132

TokenPriceProvider
Split into a managed storage contract - TokenPriceRegistry while the getEtherValue logic is included in a wider LimitUtils library. The new design relies on prices set to be that of price per token * 10^(18- token decimals). This allows us to eliminate the reliance on decimals property of tokens which is an optional ERC20 property that can't be relied on. e.g. DGD token. Additionally we've agreed to remove the DGD token from the token price provider. #120

Non-functional improvements

Upgrade contracts to solidity 0.6.12 #114 #142

Separate daily limits state out of TransferManager and into LimitStorage contract. #122

More robust CompoundManager which now has added success checks to CToken methods. These do not revert when failing but return a non-zero error code instead. We add checks to ensure that the expected token balance changes have occurred after a Compound method is executed. #134

Lighter CompoundManager module since we removed Invest and Loan contract dependencies. #108

More robust approveTokenAndCallContract ensures there is sufficient token balance before executing #136

Improve the required signatures logic in relayer where we add an entry in the OwnerSignature enum called Anyone to make the intention clearer that there are cases where no mandated signatures are required #130

Disabled the ability to add a module (and therefore upgrade) when a wallet is locked. A wallet can be locked either explicitly by a guardian or during a wallet recovery. #128

Enables recovery of non-compliant tokens in the BaseModule. #125

Ensure a module is registered before upgrading #119

Consistent SafeMath library use #100

Maintenance updates

Add static contract analysis using slither to a nightly job in CI. #93 #126

Replace ethlint with solhint #137

Introduced bn-chai to easily compare big numbers in unit tests.

Production contracts

WalletFactory 0x9ae0AcdB750bFcF694675f46B580847fC49A48bF
ENSResolver 0xDa1756Bb923Af5d1a05E277CB1E54f1D0A127890
ENSManager 0xC4BaAbB5b7DFF84Aa8023183E3Ca0bA3B2Fee519
TokenPriceProvider 0xE8a76D2f37Fe50B6A95d27FB92291Fe0B57407d3
ModuleRegistry 0xc17D432Bd8e8850Fd7b32B0270f5AfAc65DB0105
BaseWallet 0x29b94b045a0b828d9eb99136A16d97c7fF3d2600
CompoundRegistry 0xC43472062B4e3763C775956988CC883d4b863d91
MakerRegistry 0x7383757C8a2F4cbc6A21a26e1F33a0fd95e7bb77
DexRegistry 0x38AEED2AF853FCCF5c246E3aEE8bCCcbb5826d87
GuardianStorage 0x44DA3A8051bA88EAB0440DB3779cAB9D679ae76f
TransferStorage 0x391f0e86dA951C03b1183C60b195090671ADea88
ModuleManager 0x4DD68a6C27359E5640Fa6dCAF13631398C5613f1
GuardianManager 0x95F6f73484b37Fcc36a75BD5d96D861CF855e85d
LockManager 0x42EaA6F456Ce8ee9292C0fdD9af40C389CAB48b0
RecoveryManager 0x5FC48Bc1B54F718d6B307C8027207cD7c3bcc0EF
ApprovedTransfer 0x321b3A051504B0f36b40082275090ffE5838a77E
TokenExchanger 0xC4B25cc5633a7079690b6DD87135e18a82C707FE
NftTransfer 0x7531F4d6b7DFD84ab84f9f56Ef75515bd03F800c
MakerManager 0x963F86DA34Cf2CE619d4B8e5cE96577943f95B6b
CompoundManager 0x18CfB667F10c004f9534eA3C928b864d14c8fc11
TransferManager 0xB2135c6bd950e197982FA4b02f45018bDB8bEDDa
MakerV2Manager 0x2Bf38de07042240b52B7C40F044ABEfD7b01A5BE
LimitStorage 0x045B32efA0D97a681Cc415f1B37C972Ad7299a55
TokenPriceRegistry 0xe4db5b456282Eff5fE9f1eb53A3a536Bf56AEffA
LockStorage 0xF657BB6bc979bf34d49e38AfBA34D5FD2A45B0Ca
RelayerManager 0x5f822140F77ae228E0838FeA425Adfa9Cba0Bb73
VersionManager 0x4B3fBe6d554c540C2672eB7A501018a1A39f7F53

All contracts are verified on Etherscan except for the following: ApprovedTransfer, TokenExchanger, TransferManager, LimitStorage and RelayerManager due to an issue verifying contracts using the ABIEncoderV2. These can however still be verified locally.

Fix for wallets with 0 guardians

19 Jun 13:22
Compare
Choose a tag to compare

Fixes an issue with executing a recovery for wallets with no guardians.

New MakerManager, Transfer ownership and approveAndCall transfers

08 May 04:46
Compare
Choose a tag to compare

Functional updates

Added MakerV2Manager module #50 which enables:

  • Borrowing DAI via MCD Vaults
  • DAI investments into the DSR pot

The MakerManager module will be replaced in the next release by the MakerV2Manager module.

Added RecoveryManager module - Transfer ownership logic #63 to allow for instant wallet recovery using owner + ceil (n/2) guardian signatures.

Updated RecoveryManager module - Recovery logic #63 to:

  • recovery needs to be signed by ceil(N/2) guardians
  • cancel needs to be signed by owner + floor(n/2) guardians

Updated ApprovedTransfer and TransferManager modules - approveTokenAndCallContract #73 #84 to approve an amount of tokens and call a contract that consumes these tokens in one atomic transaction. This function existed in TransferManager but not in ApprovedTransfer prior to this release. Additionally this method now enables a different contract address for the approved spender and the called contract.
Also in this method we've changed the logic to restore the original approved amount.

Maintenance

  • Expose getRequiredSignatures as public on RelayerModuleV2
  • Disable the UniswapManager module #71
  • Set the kyberNetwork variable to address(0) in TokenPriceProvider since we are no longer using it to sync prices. #77
  • Remove LegacyUpgrader - limit backward compatibility to 1 to force rolling upgrades. #91
  • Refactoring of the RelayerModule validateSignatures #76
  • Makes gas price configurable and consistent on deployments #87
  • Restructuring of the contracts folder structure in the repo #86
  • Add JavaScript linting to the CI checks #62

Counterfactual wallet creation

30 Mar 16:26
ecec7b9
Compare
Choose a tag to compare

The wallet factory now utilises the new CREATE2 opcode for creating wallets counterfactually.

ENS Manager updates to migrate to the new ENS Registry.

Enabling WalletConnect

29 Nov 13:34
Compare
Choose a tag to compare
v1.4.0

audit report with updated commit