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.
Submitted by MiloTruck
The LSP8Burnable contract inherits from LSP8IdentifiableDigitalAssetCore:
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:
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
LSP4DigitalAssetMetadatawill be unavailable. - As
LSP8Burnabledoes not contain asupportsInterface()function, it will be incompatible with contracts that use ERC-165.
Recommended Mitigation
The LSP8Burnable contract should inherit LSP8IdentifiableDigitalAsset instead:
- 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.
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.