Skip to content

Commit 432f147

Browse files
committed
Revert "fix: rounding error in GNS"
This reverts commit 9c75992.
1 parent 9c75992 commit 432f147

File tree

1 file changed

+3
-6
lines changed
  • packages/contracts/contracts/discovery

1 file changed

+3
-6
lines changed

packages/contracts/contracts/discovery/GNS.sol

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -740,13 +740,10 @@ abstract contract GNS is GNSV3Storage, GraphUpgradeable, IGNS, Multicall {
740740
return _tokens;
741741
}
742742

743-
// Total after the tax
744-
uint256 totalWithoutOwnerTax = uint256(MAX_PPM)
745-
.sub(_curationTaxPercentage)
746-
.mul(_tokens)
747-
.div(MAX_PPM);
748743
// Tax on the total bonding curve funds
749-
uint256 taxOnOriginal = _tokens.sub(totalWithoutOwnerTax);
744+
uint256 taxOnOriginal = _tokens.mul(_curationTaxPercentage).div(MAX_PPM);
745+
// Total after the tax
746+
uint256 totalWithoutOwnerTax = _tokens.sub(taxOnOriginal);
750747
// The portion of tax that the owner will pay
751748
uint256 ownerTax = taxOnOriginal.mul(ownerTaxPercentage).div(MAX_PPM);
752749

0 commit comments

Comments
 (0)