Dria

Swan
NFTHardhat
21,000 USDC
View results
Submission Details
Severity: medium
Valid

Instant Oracle Registration and Deregistration Vulnerable to Sybil Attacks

Summary

Instant oracle registration and deregistration enable a malicious user to carry out a Sybil attack with only the minimum tokens needed for a single stake.

Vulnerability Details

In LLMOracleRegistry.sol, any user can register (LLMOracleRegistry.sol#L94) as a generator or validator oracle and start performing tasks immediately. Similarly, deregistration (LLMOracleRegistry.sol#L117) can be done at any time, with staked funds becoming available instantly.

A user can exploit this by leveraging the accounts they control—registering, executing a generation or validation task, and then deregistering repeatedly as needed to complete the targeted task.

It's worth noting that performing a Proof of Work task, (i.e finding a valid nonce), does not require active oracle registration. This allows an attacker to run nonce calculations concurrently across all account addresses, then register the first address that finds a valid nonce.

PoC

  1. Attacker registers account #1 as a generator oracle.

  2. Attacker submits the result to respond method.

  3. Attacker deregisters account #1 and sends unstaked funds to account #2.

  4. Attacker repeats steps 1 - 3 as many times as needed using different accounts.

  5. Same process as above is repeated for validator oracle.

Impact

This vulnerability renders the staking requirement insignificant, allowing an attacker to act as multiple oracles without staking a proportional amount of tokens. Consequently, the attacker can manipulate task results in their favor.

Tools Used

Manual review

Recommendations

  • Implement a substantial delay before activating a newly registered oracle.

  • Implement a significant waiting period before allowing funds withdrawal after oracle deactivation.

Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

There is no oracle whitelisting

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.