Forum

Increase max per tx limit for xDai deposits and withdrawals

Hi xDai bridge validators,

Thanks for your participation in the process of adapting the xDai bridge to current situation with growing popularity of the xDai bridge!

We have found that the bridge users sometimes require to send through the bridge amount of funds that is higher than the maximum per transaction limit currently configured in the bridge contracts.

We are proposing to make the limit for the amount of funds that can be send in one transaction to be equal daily limit - 10’000’000 Dai and 10’000’000 xDai.

Another reason for this is that the direct transfer feature of the bridge that allows users sends funds directly to the bridge contract without necessity to the preceding approve cannot prevent users to make a transactions with large amount of tokens so the users need to ask the bridge validators to return locked funds. Since it is not possible to stop the user to make the transaction, it seems logical to reduce possibility of the situation with locking funds occurring by making the max per transaction limit equal to the daily limit (assuming that no one will try to send such large amount of tokens).

If you agree to change the limit for deposits and withdrawals as so the maximum amount of Dai/xDai that could be send in one transaction will be 10’000’000 token please perform the following:

To set limit on the xDai side:

  1. Import your xDai bridge validator private key to the MetaMask or NiftyWallet.
  2. Visit the multisig wallet contract in the BlockScout.
  3. Enter to the field next to the method confirmTransaction the transaction ID 9.
  4. Press the “Write” button.
  5. In the MM/NW section change the gas to 500’000 and confirm the transaction.
  6. Enter to the field next to the method confirmTransaction the transaction ID 10.
  7. Press the “Write” button.
  8. In the MM/NW section change the gas to 500’000 and confirm the transaction.

To set limit on the Ethereum Mainnet side:

  1. Visit the multisig wallet contract in the Etherscan. Connect the currect MM/NF account to Web3.
  2. Enter to the field next to the method confirmTransaction the transaction ID 14.
  3. Press the “Write” button.
  4. In the MM/NW section change the gas to 500’000 and confirm the transaction.
  5. Enter to the field next to the method confirmTransaction the transaction ID 15.
  6. Press the “Write” button.
  7. In the MM/NW section change the gas to 500’000 and confirm the transaction.

If you have any question or issues appeared during the described steps, write a note below this forum post. As soon as you send a transaction with confirmation, reply to this message.

1 Like

This is transactions the multisig participant from POA Network project made to initialize transactions for the suggested changes:

  1. To set the execution max per tx limit (to limit deposits from the Ethereum Mainnet) on the xDai chain: https://blockscout.com/poa/xdai/tx/0x5c20cbfe8141af5bf0ce541228d0ae0184403428ac8b1ee5af30360e4bdd10a5/logs. It suggests to execute 0xf20151e100000000000000000000000000000000000000000008459508334a94a29c0000 on 0x7301CFA0e1756B71869E93d4e4Dca5c7d0eb0AA6 that corresponds to the call setExecutionMaxPerTx(9999999000000000000000000). The value is less than 10 mln because it is required that at least two transactions can be sent during a day.

  2. To set the max per tx limit (to limit withdrawals) on the xDai chain: https://blockscout.com/poa/xdai/tx/0x9b90034ae6448a440eb938bc7b6f2bc85636057a5eeae5cfa0ac7e00987c8113/logs. It suggests to execute 0xc6f6f21600000000000000000000000000000000000000000008459508334a94a29c0000 on 0x7301CFA0e1756B71869E93d4e4Dca5c7d0eb0AA6 that corresponds to the call setMaxPerTx(9999999000000000000000000). The value is less than 10 mln because it is required that at least two transactions can be sent during a day.

  3. To set the execution max per tx limit (to limit withdrawals from the xDai chain) on the Ethereum Mainnet: https://etherscan.io/tx/0x751ad75bee108c16285e7cd9be727e3670702e4bbb217525e4fb4ac4e48a330d#eventlog. It suggests to execute 0xf20151e100000000000000000000000000000000000000000008459508334a94a29c0000 on 0x4aa42145aa6ebf72e164c9bbc74fbd3788045016 that corresponds to the call setExecutionMaxPerTx(9999999000000000000000000). The value is less than 10 mln because it is required that at least two transactions can be sent during a day.

  4. To set the max per tx limit (to limit deposits) on the Ethereum Mainnet: https://etherscan.io/tx/0xf91ebd880ae2f3948e041bffaa0b5845a6100b4a199d5f9bf6bcee7c41ab31b9#eventlog. It suggests to execute 0xc6f6f21600000000000000000000000000000000000000000008459508334a94a29c0000 on 0x4aa42145aa6ebf72e164c9bbc74fbd3788045016 that corresponds to the call setMaxPerTx(9999999000000000000000000). The value is less than 10 mln because it is required that at least two transactions can be sent during a day.

The correspondence of the ABI encoded method call to the human readable form of the call can be checked if you take ABI:

[
  {
    "type":"function",
    "stateMutability":"nonpayable",
    "payable":false,
    "outputs":[
      
    ],
    "name":"setMaxPerTx",
    "inputs":[
      {
        "type":"uint256",
        "name":"_maxPerTx"
      }
    ],
    "constant":false
  },
  {
    "type":"function",
    "stateMutability":"nonpayable",
    "payable":false,
    "outputs":[
      
    ],
    "name":"setExecutionMaxPerTx",
    "inputs":[
      {
        "type":"uint256",
        "name":"_maxPerTx"
      }
    ],
    "constant":false
  }
]

and use it on the service: https://abi.hashex.org/#

@geleeroyale/@GriffGreen, @mgarcia/@ArseniiPetrovich and @mariano.conti/@savdao please take into consideration.

You will need to submit 4 transactions: 2 txs to the xDai chain, 2 txs to the Ethereum Mainnet.

Done :white_check_mark:

xDAI: https://blockscout.com/poa/xdai/tx/0x0eacabd4101fc8320e4c828c35d5ba4f1ffc605ea3707e9feed20930f5626ae8/internal-transactions

Eth Mainnet: https://etherscan.io/tx/0x899d60540c8fef96f2044f6a728370d2853c006f557754c2bd36854a0b23e6c7

2 Likes

Done on xDAI :white_check_mark:

Mainnet… ummm maybe an issue

13 went thru: https://etherscan.io/tx/0x45d2234530cc5761d7431d644644c9e505a693d2788939b64f08e5fabd114747

But @akolotov… confirming 12 maybe had a problem? I used a ridiculous gas limit… so it didn’t run short on gas: https://etherscan.io/tx/0xf58bda07f2760925f36a5adca9e57dbb7a259185a3e71bd3b5e74879446583ab ?

Sorry, Griff. I have found that I prepared the previous transactions incorrectly since we needed to initialize the limit by 1 Dai/xDai less. So, the max per tx limit must be 9’999’999 Dai/xDai. I updated the instructions correspondingly.

Could you re-send the confirmations? IDs for transactions on the xDai side are 9 and 10. 14 and 15 are for the transactions on the Ethereum Mainnet side.

Missed the following TXs:

xDAI: transaction ID 10 https://blockscout.com/tx/0x9f0001acbe35e872f9921af267e63bff46e8066f5af8f92543b795ae0fde838a

Ethereum Mainnet: transaction ID 15

Ok they all look good

14:

15:

xDAI

9:

10:

Thank you all! The limits were updated successfully.