# Biweekly report by Genuine Labs
Dear Terra Classic Community,
Another 2 weeks is coming up and we - Genuine Labs are excited to share all the details about the Tax2Gas process outlined in our PPJ Proposal. We are pleased to announce that the **tax2gas**'s logic and testing in **e2e** has been completed. We are deeply grateful for the community's ongoing support and appreciate your interest in our work.
This is the final version of our work in Tax2Gas:
https://github.com/classic-terra/core/pull/500
Our testscenarios for testing Tax2Gas logic in e2e can be found at: [Test Scenario](https://gist.github.com/phamminh0811/524deee67f1e017bce0e13683fbcef9a)
Let's dive into what we have done!
## Finish tax2gas logic
For tax2 gas logic, there're still a few problems that make us stuck in the previous weeks:
- Make the user that execute contract to pay for multiple forward flow
- Calculate the exact amount of gas that has been consumed in the form of gas
### 1. Make the user that execute contract to pay for multiple forward flow
This is an example of how this will work:
User A do an execute contract action that will send **10000uluna** to contract B, contract B will execute or do bank send with the amount it received to account C. The original flow in terra classic v3.0.0 will make user A to pay **200uluna** as burn tax and make contract B to pay for the amount it transfer. Therefore, contract B itself will deduct amount it receive to **9800uluna** in order to make the transfer success, and the receiver C can only receive **9800uluna**.
In tax2gas context, we don't want to make this happen. Receiver C should receive **10000uluna** and user A must be the one to pay for all of the taxes, which includes **200uluna** when execute contract B and **200uluna** when contract B forward to another address.
### 2. Calculate the exact amount of gas that has been consumed in the form of gas
As we convert tax to gas and the gas amount can only be deducted on post handler, there is a problem come up: we need to know what is the exact amount of tax to handle the **BurnTaxSplit** logic, which will send 80% to burn, 10% to Community Pool, 10% to rewards.
If we send all of the gas consumed in runTx to **BurnTaxSplit**, the validator rewards will be very low because most of the fees will be burn, therefore no one will want to run validator.
### Our solution
Recognize those problem, we has custom the cosmos-sdk for a special gas meter: **TaxGasMeter**
Our custom can be found at: https://github.com/classic-terra/cosmos-sdk/tree/release/v0.47.x-terra-classic
TaxGasMeter will only consume gas when there is a special tx that cost taxes. Therefore, it will solve both cases above:
- When a contract dispatch a msg, we will check if the tx is in the list or not. If it's a tax cost msg, we will consume the correspond tax gas for it. On posthandler, user will be the one who pay for all of the taxes.
- As the tax gas is separated to normal gas, we can compute the amount of taxes and handler **BurnTaxSplit** only for those taxes
### Bypass IBC tx
Inspired from Global Fee module, we add a few msg types of IBC that is allowed to not pay fees:
- MsgUpdateClient
- MsgRecvPacket
- MsgAcknowledgement
- MsgTimeout
- MsgTimeoutOnClose
The max bypass gas parameter is 1.000.000 gas, which means above tx types will not be charged fees if gas limit is smaller than 1.000.000 gas.
With this addition, IBC relayers can relay without fees if all txs are small and enhance the IBC relaying for the chain.
## E2E test scenario
In order to ensure everything is on the right track. We listed all the testcases and scenarios that we believe that it cover most circumstances.
Our testscenarios for testing Tax2Gas logic in e2e can be found at: [Test Scenario](https://gist.github.com/phamminh0811/524deee67f1e017bce0e13683fbcef9a)
## Next steps
This is the final report for our PPJ work on tax2gas. In the coming time, we plan to conduct thorough testing on the testnet and create a proposal for chain upgrade and spend proposal.
We couldn't be building a better Terra Classic without your incredible support. Thank you for standing with us through the challenges!
Best regards,
Genuine Labs Team