Aconomy

Aconomy Smart Contract Audit Report

Share
Share
BSCBSC
RWA / Tokenization / ReFiRWALending and Borrowing+1
BSCBSC
RWA / Tokenization / ReFiRWA+2

QuillAudits audited the Aconomy smart contracts on BSC between Jun 24, 2024 and Aug 14, 2024. The audit found 37 issues: 7 medium, 13 low, 17 informational, of which 20 resolved and 17 acknowledged.

Project Description

Aconomy is a decentralized NFT Marketplace for illiquid real-world asset classes to leverage all the monetary benefits that get unlocked when the assets are brought on-chain in the form of PiNFTs.
PiNFTs are a special kind of NFTs which possess underlying value in the form of ERC20 tokens(stable coins).

The project allows users to sell and buy NFTs using piMarket which also allows auctions. NFTLendingBorrowing contract allows collateralized borrowing/lending functionality. Where the bidder gets the functionality to claim borrower’s NFT incase of the non repayment of the loaned amount.

FundingPool can be used to take loans from verified lenders where the pool owner has ability to accept the loans based on the interest of lenders.
The poolAddress allows verified users/borrowers to raise a loan request, and verified lenders can then lend the tokens for the request raised.

Timeline

S1
Jun 24, 2024
S2
Aug 14, 2024

Scope of Audit

The scope of this audit was to analyse the Aconomy Codebase for quality, security, and correctness.

Methodology: the QuillAudits smart contract audit process.

speedometer
0
50%
60%
70%
90%
100%
95.2%
AUDIT SCORE
icon

High

Medium

Low

Informational

open0000
acknowledged0449
partially resolved0000
resolved0398

Medium Severity Issues

Users can take non collateralized loans

Acknowledged
arrow-right
Description

The users can take non collateralized loans in the Fundingpool and poolAddress. The ability to take non collateralized loans creates the possibility where the borrowers may never return the loans.

Contract

Fundingpool.sol, poolAddress.sol

Recommendation

Take the on chain collateral from the borrower.

User’s NFT can be claimed by another actor by paying the user’s debt at any time

Resolved
arrow-right
Description

There is no restriction on who can pay back the loan bidded for by the lender. Any user can repay the loan to receive the NFT that the original lender added as collateral. As it is, there is no time delta between when the user is 'safe' to redeem their tokens and when an arbitrageur/liquidator could swoop in to pick up the user's collateral. This means that users who put up their NFT for sale run the risk of losing their NFT immediately another user repays the amount + interest accrued.

Contract

NFTLendingBorrowing.sol

Recommendation

If the user isn't intended to lose their tokens this way, consider introducing a deadline to adjust when this can happen.

The user can choose low to no fees.

Resolved
arrow-right
Description

While calling BuyNFT()/executeBidOrder() the user has the ability to set _fromCollection as true/false to choose less (or even more for other users to whom the remaining amount would be sent) fees/royalties amount.
This happens because depending on the if{} or else{} execution , the different royalties are used.
Instead of allowing the user to toggle _fromCollection bool value in BuyNFT() and in executeBidOrder(), another variable can be added to the TokenMeta struct , where the bool value can be set while creating the sale itself.
The contract will make a call on the _contractAddress address entered by the user while creating the sale and will check if it is a collection or not. The ERC-165 standard interface detection can be used for the same.
In both BuyNFT() and in executeBidOrder() this boolean value can be used from the stored TokenMeta and depending on this bool value the royalties would be fetched in if or else.
The implemented functionality should be checked practically as it may break the functionality for contracts that are not supporting the ERC-165 standard interface detection. Additionally the assumption is made that the piMarket is only supporting valid collections/contract implementations supported by the marketplace as discussed internally.

Contract

piMarket.sol

Recommendation

We recommend the above solution for the mentioned issue and or additionally we encourage the team to think of a more efficient solution, where the manipulating royalty fee is not possible.

Borrower defaulting is unhandled by the smart contracts

Acknowledged
arrow-right
Description

The isLoanDefaulted() function is currently unused in the codebase, while in an isolated event this wouldn't be an issue but the poolAddress contract has no checks for borrowers who default on loans. As it stands, nothing stands between a defaulting borrower and a new loan being approved - not even with the scrutiny of the proposed lender. 
Within the loanRequest() function, there isn't any check/flag that indicates the borrower submitting a loan request has any bad debt. This isn't taken into consideration when the lender calls AcceptLoan(). The borrower's active loans are added to when in the actual sense, previous loans could be past their expiration time, thus defeating the purpose of a liquidation which occurs when liquidators (who are usually incentivized) clear bad debts from the system.
In both FundingPool and poolAddress the precaution needs to be taken if the borrower never returns the taken loan back.

Contract

FundingPool.sol, poolAddress.sol

Recommendation

It would be advisable for the AcceptLoan() function to include a check for the borrower's health / credibility and also implement precautionary functionality for cases where defaulters never return the borrowed funds.

Bad debt can accrue over time giving users no incentive to pay back.

Resolved
arrow-right
Description

A nuanced action from the borrower may be seen when NFT deposits happen, they take loans and then do not pay back the ERC20 token loaned. There is no guarantee that users will pay back the loans they take by returning the ERC20 token along with the interest accrued over time. When enough time passes, retrieving the NFT by repaying the debt would be more expensive than the user could want to bear.

Contract

NFTLendingBorrowing.sol

Recommendation

It would be advisable to include a collateral-loan ratio that takes into account the value of the NFTs and the amount bidded for them to determine ‘safe’ debt levels.
Consider including a cap to which interest can safely be accrued until measures have to be taken against users who have defaulted on repayment.

Denial of service while paying monthly installment

Acknowledged
arrow-right
Description

When the lender supplies the amount to the pool with supplyToPool() it's getting checked that the _amount is greater or equal to 1000000.
But when the poolOwner tries to repay the monthly amount after accepting the lender's bid, in the repayMonthlyInstallment() on L528 it's getting checked that fundDetail.amount / fundDetail.installment.installments greater or equal to 1000000.
Let's say the lender entered _amount as 1000000 for the supplyToPool(), the check on L184 passed as the _amount is equal to 1000000.
Then while paying the monthly installment on L528 it will revert as in this case fundDetail.amount / fundDetail.installment.installments would be 1e6/6 = 166666, which is less than 1000000. Resulting in denial of service while paying the monthly amount.
While there can be an alternate solution to repay the full amount, the monthly repayment functionality would be useless.
A similar situation occurs in poolAddress.sol with the loanRequest amount being checked to be greater or equal to 1000000, and repayMonthlyInstallment checks that the principal divided by the number of installments is greater or equal to 1000000 (1e6). If the borrower takes a loan worth 1000000 (1e6) tokens, he would be unable to repay the monthly

Contract

FundingPool.sol, poolAddress.sol

Recommendation

Consider checking the fundDetail.amount / fundDetail.installment.installments >= 1000000 in the supplyToPool() function itself. if it's less, then the transaction should revert while supplying the tokens.

Add support for fee-on-transfer tokens.

Acknowledged
arrow-right
Description

stake() and addStake() allows anyone to stake any ERC20 token. In case the ERC20 token deducts fees on transfer, the calculation while storing/incrementing the stakedAmount would be incorrect.
E.g. The Validator stakes 100 tokens, the stakedAmount for that validator increased by 100 on L63. But while transferring tokens on L65 only 90 tokens were transferred (as 10 tokens deducted as some tax/fee by token contract). In this case, the increase of 100 on L63 is incorrect. So this can trick the owner into refunding 100 tokens to the validator address even though less than 100 tokens were transferred.
(It should be noted that while transferring the tokens back to the validator with refundStake(), less will be transferred in case of fee deducting tokens.)
In piNFTMethods.addERC20() allows validators to add any ERC20 token. In case the ERC20 token deducts fees on transfer, the calculation in updateERC20() for adding _value in erc20Balances mapping would be incorrect.

There’s a similar possibility in both piMarket and NFTlendingBorrowing regarding the usage of fees deducting tokens.
While this issue can be rare, we have decided to highlight the issue as there would be unpredictable possibilities for an open system like this when it comes to the types and incorrect implementations of ERC20 tokens.

Contract

validatorStake.sol, piNFTMethods.sol, piMarket.sol, NFTlendingBorrowing.sol

Recommendation

Consider storing the contract balance before the token transfer call and after that, it can be subtracted from the current balance value to know exactly the transferred tokens. Later this amount can be used to increment the stake amount in validatorStakes mapping.
Consider storing the contract balance before the token transfer call, and after that it can be subtracted from the current balance value to know the actual transferred token amount. Or restrict the ERC20 token to a specific token address as mentioned in other issue(s).

Low Severity Issues

Informational Issues

Appendix

Disclaimer

Aconomy

Aconomy

Medium Severity Issues
Low Severity Issues
Informational 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