Skip to content
Smart contracts Audit finding Intermediate

LSP8Burnable extension incorrectly inherits LSP8IdentifiableDigitalAssetCore

The LSP8Burnable contract inherits from [redacted] instead of LSP8IdentifiableDigitalAsset, so developers using it lose LSP4DigitalAssetMetadata functionality and ERC-165 interface support. An attacker could not directly exploit this, but it causes compatibility issues for token implementations.

MiloTruck Follow

Originally disclosed on Code4rena

Submitted by MiloTruck

The LSP8Burnable contract inherits from LSP8IdentifiableDigitalAssetCore:

LSP8Burnable.sol#L15

abstract contract LSP8Burnable is LSP8IdentifiableDigitalAssetCore {

However, LSP8 extensions are supposed to inherit LSP8IdentifiableDigitalAsset instead. This can be inferred by looking at LSP8CappedSupply.sol, LSP8CompatibleERC721.sol and LSP8Enumerable.sol:

LSP8CappedSupply.sol#L13

abstract contract LSP8CappedSupply is LSP8IdentifiableDigitalAsset {

Additionally, the LSP8BurnableInitAbstract.sol file is missing in the repository.

Impact

As LSP8Burnable does not inherit LSP8IdentifiableDigitalAsset, a developer who implements their LSP8 token using LSP8Burnable will face the following issues:

  • All functionality from LSP4DigitalAssetMetadata will be unavailable.
  • As LSP8Burnable does not contain a supportsInterface() function, it will be incompatible with contracts that use ERC-165.

Recommended Mitigation

The LSP8Burnable contract should inherit LSP8IdentifiableDigitalAsset instead:

LSP8Burnable.sol#L15

-   abstract contract LSP8Burnable is LSP8IdentifiableDigitalAssetCore {
+   abstract contract LSP8Burnable is LSP8IdentifiableDigitalAsset {

Secondly, add a LSP8BurnableInitAbstract.sol file that contains an implementation of LSP8Burnable which can be used in proxies.

CJ42 (LUKSO) confirmed


The original report as published on Code4rena, by MiloTruck. Images and videos are our own copies; raw HTML is shown as text. View it on Code4rena.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the LSP8Burnable contract was written to inherit from the core contract instead of the full LSP8IdentifiableDigitalAsset contract, unlike other extensions.

Impact

Developers using LSP8Burnable will have tokens without LSP4DigitalAssetMetadata functionality and without ERC-165 compatibility, which could break integrations.

What the attacker needed

Developer uses LSP8Burnable for a token

The fix

The contract should inherit from LSP8IdentifiableDigitalAsset instead, and a proxy-compatible LSP8BurnableInitAbstract.sol file should be added.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

This is a smart contract design flaw where a building block (LSP8Burnable) is built on the wrong foundation. Because it skips a key parent contract, tokens made with it miss important features like metadata and a standard way to announce what interfaces they support. It is not a direct security hole but a bug that breaks expected behaviour.

What is Smart contracts?

Flaws in on-chain code that let an attacker drain funds, freeze them or break the protocol's accounting.

More by MiloTruck

View all

35 more disclosed reports, best first.

More from LUKSO

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Smart contract vulnerabilities

The lesson behind this report.

Flaws in on-chain code that let an attacker drain funds, freeze them or break the protocol's accounting.