Skip to content

Instantly share code, notes, and snippets.

@bitcoinwarrior1
Created September 6, 2021 06:21
Show Gist options
  • Save bitcoinwarrior1/9881f45265d0e405b7f5598dfaf31006 to your computer and use it in GitHub Desktop.
Save bitcoinwarrior1/9881f45265d0e405b7f5598dfaf31006 to your computer and use it in GitHub Desktop.
pragma solidity ^0.8.12;
interface TransactionTaxWitholding {
/*
* @dev allows the user to send eth and withhold the tax percentage CGT by converting the tax rate into a stable coin
* @param amount - the amount that the user wants to send (excluding witholding)
* @param withholdingPercentage - the percentage they wish to convert into stable coins for the purpose of tax
* @param tokenToConvert - the stable coin token they wish to convert the eth into for witholing purposes.
* Since stablecoins are pegged to fiat, they can be used safely for witholding purposes
*/
function sendEthWithWithholding(uint amount, Decimal withholdingPercentage, address tokenToConvert) external payable;
}
@jonathanpdunne
Copy link

How would you derive (1) whether or not the transaction is a CGT event, and (2) what the effective CGT rate is? Presumably (1) can be determined by the context in which the method is called. But re. (2), wouldn't you need to know the user's tax jurisdiction, income rate, and perhaps whether or not the position has been held for over a year?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment