ISPZ

ISPZ Smart Contract Audit Report

Share
Share
PolygonPolygon
Bonding Curve Algo
PolygonPolygon
Bonding Curve Algo

QuillAudits audited the ISPZ smart contracts on Polygon between Jul 4, 2024 and Jul 12, 2024. The audit found 7 issues: 4 high, 3 low, of which 6 resolved and 1 acknowledged.

Timeline

S1
Jul 4, 2024
S2
Jul 12, 2024
speedometer
0
50%
60%
70%
90%
100%
95.7%
AUDIT SCORE
icon

High

Medium

Low

Informational

open0000
acknowledged0010
partially resolved0000
resolved4020

High Severity Issues

Users will not be able to buy pazatokens due to wrong assumptions of decimals.

Resolved
arrow-right
Description

There are two functions calculateUsdcAmountBuy and calculateUsdcAmountSell to calculate the amount of usdc based on the input value of tokens provided by these functions in BondingCurve.sol • buyWithExactToken • calculateTaxPercent Both of these functions rely on an assumption that the input token amount will be 18 decimal places. This can be confirmed by the implementation of calculateUsdcAmountBuy where tokenNumber is calculated by dividing the input token amount with 10**18 This means as long as the input token amount has some arbitrary value that does not account for decimal places, tokenNumber will round down to zero resulting in output usdc amount as zero. This same problem can be seen in calculateUsdcAmountSell also where the calculation of tokenNumber assumes an input amount with 18 decimal places. 2 scenarios can happen here: 1. User tries to call buyWithExactToken with a value (let’s say 2000). The function call goes to calculateUsdcAmountSell resulting in tokenNumber = 0 and then usdcGiven = 0. This triggers the require statement require(usdcAmount > 0, “Invalid USDC amount”); and users are not able to buy pazatokens. 2. calculateTaxPercent is called with an amount (let’s say 2000), which internally calls calculateUsdcAmountBuy and calculateUsdcAmountSell. There’s no require statement here, so the resultant tax = buyPriceUsdc - sellPriceUsdc will be zero

Contract

BondingCurveCalculation.sol

Recommendation

Either change the library implementation to correctly handle decimal places or add a require statement to all the the functions that are using calculateUsdcAmountBuy and calculateUsdcAmountSell like this:

Improper Accounting in sellWithExactUsdc Function

Resolved
arrow-right
Description

The sellWithExactUsdc function improperly handles token amount calculations and updates, leading to inaccurate accounting of the totalSupply. The BondingCurveCalculations.calculateTokenAmountSell function returns values with 10 decimals, but the function incorrectly attempts to divide the token amount by 10**18, which results in zero being subtracted from totalSupply. This leads to incorrect total supply updates.

Contract

BondingCurve.sol

Recommendation

To fix this issue, ensure that the token amount calculations are handled consistently with
their decimal format. Specifically, avoid unnecessary conversions that lead to incorrect
values.

Collected Tax Can’t Be Claimed from the Bonding Curve Contract

Resolved
arrow-right
Description

The current implementation of the _transfer function sends taxes to the bondingCurve
contract. However, the bondingCurve contract lacks a mechanism to withdraw or reclaim
these collected taxes, resulting in potential permanent loss of the funds.

Contract

BondingCurve.sol

Recommendation

Implement a withdrawal mechanism in the bondingCurve contract to allow authorized
entities to reclaim the collected taxes. This mechanism should include proper access
controls to prevent unauthorized withdrawals.

Incorrect totalSupply variable update in the buyWithExactUsdc

Resolved
arrow-right
Description

The function buyWithExactUsdc is responsible for handling token purchases with USDC. However, there are issues with the way totalSupply and usdcPoolBalance are updated. Specifically, the totalSupply is updated incorrectly because the tokenAmount is calculated with 18 decimals, which leads to an incorrect increase in the totalSupply.

Contract

BondingCurve.sol

Recommendation

• Adjust totalSupply Properly: Ensure that totalSupply is updated correctly by
considering the correct decimal places for token amounts.
• Verify usdcPoolBalance Update: Ensure that usdcPoolBalance is updated accurately
reflecting the correct USDC amount transferred.

Low Severity Issues

Appendix

Disclaimer

ISPZ

ISPZ

High Severity Issues
Low Severity Issues
Appendix
Disclaimer
View Report PDF

Get an Audit done today for your Smart Contract

Join 1500+ leaders who secured themselves from losing Billion Dollars

cta-banner
cta-banner-bgcta-banner-bg-mobile

Related audits

WE SECURE EVERYTHING YOU BUILD.

From day-zero risk mapping to exchange-ready audits, QuillAudits helps projects grow with confidence. Smart contracts, dApps, infrastructure, compliance: secured end to end.

QuillAudits Logo


ISO 27001Circle Alliance Program
Uniswap FoundationAethiropt-collectivePolygon SPNBNB Chain Kickstart

All Rights Reserved. © 2026. QuillAudits - LLC