Idea to drastically lower unshielding fees on ethereum: batch transactions

Hello team,

I have an idea to drastically reduce unshielding fees on ethereum transactions. There are several L2 solutions that will bundle transactions and submit them after certain time intervals. The idea would be to give an option for users to join the next batch (could be done every 48 hours, or faster as incongito gains popularity).

This could be coded from scratch or tools such as https://disperse.app and https://bulksender.app could potentially be used.

4 Likes

No need to use a third party (“centralized”) service. Batch transactions can easily be added in a smart contract update.

Solidity:


pragma solidity ^0.8.1;

interface IERC20 {
    function transfer(address to, uint256 value) external;
    function transferFrom(address from, address to, uint256 value) external;
    function balanceOf(address tokenOwner)  external returns (uint balance);

}
contract Bulksender{
   function bulksendToken(IERC20 _token, address[] _to, uint256[] _values) public  
   {
      require(_to.length == _values.length);
      for (uint256 i = 0; i < _to.length; i++) {
          require(_token.transferFrom(msg.sender, _to[i], _values[i]));
    }
  }
}

4 Likes

That’s even better! It also looks simple. :slight_smile:

2 Likes

This is a great idea! This could also be used for the btc bridge to help reduce fees! No need for lets say 5 users to pay the same network fee if they join the same block the bridge outputs to! @duc

thoughts?

3 Likes
  • Lowers privacy (debatable-ish)
  • Involves modding v security sensitive parts of code
  • how often to batch? Means we all gotta wait more
  • what if no-one to batch with?

It may sound nifty but there are alot of implications.
I’d go for a solution allowing users to choose from batch or single and have all batched ones just twice per day or something.

These features should be audited well…
Incognito is getting bigger by the day, all these new features and also bridges can compromise security…
I see this further down the road not now…

2 Likes

Yes, it can be easily used in BTC and probably other coins too. Actually this was one of the main ideas implemented for bitcoin after the 2017 bull run when transaction fees were out of control. Exchanges started batching withdraws and dramatically cut down on the entire network fees. This week is the first time in a year that a 3sat transaction didn’t confirm within an hour. I had to choose 3.5 sat.

There is not really any security concerns, except that all withdraws generally should be executed carefully. It’s not really a new feature—it’s coding for efficiency. I should have said that this is a new idea for incognito, not that it’s a new idea for blockchains. It’s actually a very common idea.

1 Like