Skip to content

What this page showsOne instruction (an action a wallet lists) of Drift Protocol v2: whether the code that runs it is the code an audit reviewed, why, and the recorded transactions that called it.

Verdict

Partial

Some evidence exists, but one required link is missing, for example the live source is only claimed by a provider or the report names no files.

Checked against the snapshot at slot 471,652,414

The proof chain
  1. Instruction decoded

    Established

    The instruction bytes match one entry in a pinned IDL or schema, with no collision.

  2. Live code rebuilt by POA

    Not established

    POA rebuilt a source commit and its hash equals the on-chain executable.

  3. Report names the handler file

    Established

    A published audit report's scope covers the file that implements this instruction.

  4. Reviewed commit printed

    Not established

    That report prints the scope and the exact commit it reviewed.

  5. Reviewed code is the live code

    Not established

    The reviewed commit and the rebuilt live commit hold the same program code.

Every link must hold before POA says Matched. A missing link is not a failure, and never an approval.

Reasons

  1. Program snapshot at slot 471652414: executable, RPC agree, hash 8299a9b85540….
  2. Decoded by anchor-sighash-derived 8bcd8d8d71245ebb.
  3. Handler programs/drift/src/instructions/user.rs#L2200 (handle_update_user_delegate).
  4. Only partly reviewed per drift-neodyme-2024 (Changes made during the audit timeframe (between start commit b828310 and last revision 0ee9e96) were only partially reviewed: a time-boxed review focused on core logic (p.5)), drift-tob-2022 (Admin instructions were only cursorily examined, for the admin signer and its tie to the state account (p.12, Coverage Limitations)); these reports give neither MATCHED nor CHANGED for this instruction.
  5. The report(s) whose printed scope covers the handler file (drift-neodyme-2024) say it was only partly reviewed.
  6. Live source not independently established (POA build state: reproduced_mismatch). A provider or docs claim does not count.

What would be needed for a stronger verdict

  1. A report whose printed scope paths cover the handler file.
  2. A POA reproducible build whose hash equals the current executable hash.

Checks

Decoded
Yes
Handler located
Yes
Handler in report-named files
Yes
Review scope established
No
Reviewed commit known
Yes
Live source rebuilt by POA
No
Live source equals reviewed
Not established
Handler changed since review
Not established
Program crate changed since review
Not established
Program immutable
No
Evidence fresh
Yes

Discriminator and decoding

Discriminator
8bcd8d8d71245ebb
Method
Derived Anchor sighash
IDL SHA-256
dfd61e9ea1d160321f83f5c7729199ea03c509d63fe8baf35743fd2a87a2dd2a
Collisions
None

Arguments

NameType
subAccountIdu16
delegatepubkey

Accounts

Signer and writable flags from the interface definition.

AccountFlagsFixed addressNotes
userWritable
authoritySigner

Handler source

Handler source at the pinned commitprograms/drift/src/instructions/user.rs#L2200-L2208Source on GitHub · fee7bfa ↗ (opens in a new tab)
Function
handle_update_user_delegate
File
programs/drift/src/instructions/user.rs · lines 2200–2208
At commit
fee7bfa60f52274969500c37acbbe79bea847ba1
Mapping
Anchor program module

Related files

No related files traced.

Audit relations

How each report relates to this instruction's handler file.

AuditorRelationReviewed commitScope confidence
NeodymeSecurity Audit: Drift Protocol (opens in a new tab)Handler file is in the named scope0ee9e96Printed in the report
Trail of BitsDrift Protocol Security Assessment (opens in a new tab)Program covered, no paths named57dd5c6Printed in the report

Changed files since review

Files changed between the reviewed commit and the live source, as recorded.

No changed file is recorded for this instruction.

Call trees

The static tree comes from the handler source. The observed tree comes from a finalized transaction. They are separate evidence and are not merged.

Instruction
The instruction itself, with its own verdict.
Static
A source file read at the handler map's pinned commit.
Observed
A call seen in a finalized mainnet transaction.
Inferred
A call read from the handler source, not observed on chain.

Static, from source at fee7bfa

  • Signer
    • InstructionPartial
      • StaticPartial

No curated transaction calls this instruction.

Transactions

Each curated transaction that calls this instruction, with what is known about the code that ran.

No curated transaction calls this instruction.