Segurança

Oracle Manipulation

An attack in which an adversary artificially distorts the price or data reported by an on-chain oracle — most commonly by executing large trades to move a spot-price oracle (such as one based on a single AMM's instantaneous price) — and then exploits protocols that consume that price for lending, liquidation, or derivatives settlement before the oracle corrects. Flash-loan-amplified oracle manipulation is particularly dangerous: an attacker borrows a large sum atomically, moves the price, exploits the manipulated price, and repays the loan in one transaction. Defenses include using time-weighted average prices (TWAPs), aggregating multiple independent oracle sources (e.g., Pyth's aggregate confidence interval, Switchboard's weighted median), and enforcing staleness and confidence-band checks on every consumed price feed.

IDoracle-manipulation

Leitura rápida

Comece pela explicação mais curta e útil antes de aprofundar.

An attack in which an adversary artificially distorts the price or data reported by an on-chain oracle — most commonly by executing large trades to move a spot-price oracle (such as one based on a single AMM's instantaneous price) — and then exploits protocols that consume that price for lending, liquidation, or derivatives settlement before the oracle corrects. Flash-loan-amplified oracle manipulation is particularly dangerous: an attacker borrows a large sum atomically, moves the price, exploits the manipulated price, and repays the loan in one transaction. Defenses include using time-weighted average prices (TWAPs), aggregating multiple independent oracle sources (e.g., Pyth's aggregate confidence interval, Switchboard's weighted median), and enforcing staleness and confidence-band checks on every consumed price feed.

Modelo mental

Use primeiro a analogia curta para raciocinar melhor sobre o termo quando ele aparecer em código, docs ou prompts.

Pense nisso como um bloco de construção que ajuda a ligar uma definição isolada ao sistema maior onde ela vive.

Contexto técnico

Coloque o termo dentro da camada de Solana em que ele vive para raciocinar melhor sobre ele.

Falhas, auditorias, superfícies de ataque e padrões seguros.

Por que builders ligam para isso

Transforme o termo de vocabulário em algo operacional para produto e engenharia.

Este termo destrava conceitos adjacentes rapidamente, então funciona melhor quando você o trata como um ponto de conexão, não como definição isolada.

Handoff para IA

Handoff para IA

Use este bloco compacto quando quiser dar contexto aterrado para um agente ou assistente sem despejar a página inteira.

Oracle Manipulation (oracle-manipulation)
Categoria: Segurança
Definição: An attack in which an adversary artificially distorts the price or data reported by an on-chain oracle — most commonly by executing large trades to move a spot-price oracle (such as one based on a single AMM's instantaneous price) — and then exploits protocols that consume that price for lending, liquidation, or derivatives settlement before the oracle corrects. Flash-loan-amplified oracle manipulation is particularly dangerous: an attacker borrows a large sum atomically, moves the price, exploits the manipulated price, and repays the loan in one transaction. Defenses include using time-weighted average prices (TWAPs), aggregating multiple independent oracle sources (e.g., Pyth's aggregate confidence interval, Switchboard's weighted median), and enforcing staleness and confidence-band checks on every consumed price feed.
Relacionados: Oráculo, Feed de Preços, Empréstimo Flash
Glossary Copilot

Faça perguntas de Solana com contexto aterrado sem sair do glossário.

Use contexto do glossário, relações entre termos, modelos mentais e builder paths para receber respostas estruturadas em vez de output genérico.

Explicar este código

Opcional: cole código Anchor, Solana ou Rust para o Copilot mapear primitivas de volta para termos do glossário.

Faça uma pergunta aterrada no glossário

Faça uma pergunta aterrada no glossário

O Copilot vai responder usando o termo atual, conceitos relacionados, modelos mentais e o grafo ao redor do glossário.

Grafo conceitual

Veja o termo como parte de uma rede, não como uma definição sem saída.

Esses ramos mostram quais conceitos esse termo toca diretamente e o que existe uma camada além deles.

Ramo

Oráculo

A service that provides external data (prices, randomness) to on-chain programs. DeFi protocols rely on oracles for accurate price feeds to calculate collateral ratios, liquidation thresholds, and swap rates. Solana's primary oracles are Pyth (high-frequency price feeds) and Switchboard (general-purpose data feeds and VRF).

Ramo

Feed de Preços

An on-chain account maintained by an oracle (Pyth or Switchboard) containing the current price, confidence interval, and timestamp for an asset pair (e.g., SOL/USD). DeFi programs read price feeds to calculate collateral values, trigger liquidations, and determine swap rates. Feed staleness must be checked to prevent using outdated prices.

Ramo

Empréstimo Flash

An uncollateralized loan that must be borrowed and repaid within the same transaction. If the loan isn't repaid by transaction end, the entire transaction reverts atomically. Flash loans enable arbitrage, collateral swaps, and self-liquidation with zero capital. On Solana, Solend and MarginFi offer flash loans; they're also used in sandwich attacks.

Próximos conceitos para explorar

Continue a cadeia de aprendizado em vez de parar em uma única definição.

Estes são os próximos conceitos que valem abrir se você quiser que este termo faça mais sentido dentro de um workflow real de Solana.

DeFi

Oráculo

A service that provides external data (prices, randomness) to on-chain programs. DeFi protocols rely on oracles for accurate price feeds to calculate collateral ratios, liquidation thresholds, and swap rates. Solana's primary oracles are Pyth (high-frequency price feeds) and Switchboard (general-purpose data feeds and VRF).

DeFi

Feed de Preços

An on-chain account maintained by an oracle (Pyth or Switchboard) containing the current price, confidence interval, and timestamp for an asset pair (e.g., SOL/USD). DeFi programs read price feeds to calculate collateral values, trigger liquidations, and determine swap rates. Feed staleness must be checked to prevent using outdated prices.

DeFi

Empréstimo Flash

An uncollateralized loan that must be borrowed and repaid within the same transaction. If the loan isn't repaid by transaction end, the entire transaction reverts atomically. Flash loans enable arbitrage, collateral swaps, and self-liquidation with zero capital. On Solana, Solend and MarginFi offer flash loans; they're also used in sandwich attacks.

Segurança

OtterSec

Leading Solana security audit firm that has audited major protocols including Jupiter, Marinade, Jito, and the Solana runtime. Known for deep expertise in Rust/Solana program security and responsible vulnerability disclosure. One of the most trusted names in Solana security.

Termos relacionados

Siga os conceitos que realmente dão contexto a este termo.

Entradas de glossário só ficam úteis quando estão conectadas. Esses links são o caminho mais curto para ideias adjacentes.

DeFioracle

Oráculo

A service that provides external data (prices, randomness) to on-chain programs. DeFi protocols rely on oracles for accurate price feeds to calculate collateral ratios, liquidation thresholds, and swap rates. Solana's primary oracles are Pyth (high-frequency price feeds) and Switchboard (general-purpose data feeds and VRF).

DeFiprice-feed

Feed de Preços

An on-chain account maintained by an oracle (Pyth or Switchboard) containing the current price, confidence interval, and timestamp for an asset pair (e.g., SOL/USD). DeFi programs read price feeds to calculate collateral values, trigger liquidations, and determine swap rates. Feed staleness must be checked to prevent using outdated prices.

DeFiflash-loan

Empréstimo Flash

An uncollateralized loan that must be borrowed and repaid within the same transaction. If the loan isn't repaid by transaction end, the entire transaction reverts atomically. Flash loans enable arbitrage, collateral swaps, and self-liquidation with zero capital. On Solana, Solend and MarginFi offer flash loans; they're also used in sandwich attacks.

Mais na categoria

Permaneça na mesma camada e continue construindo contexto.

Essas entradas vivem ao lado do termo atual e ajudam a página a parecer parte de um grafo maior, não um beco sem saída.

Segurança

Missing Signer Check

A vulnerability where a program accepts an account in a privileged role (e.g., admin, authority, payer) without verifying that the account actually signed the transaction, allowing any caller to impersonate that authority by simply passing the target pubkey as an instruction account. In native Solana programs, the check requires asserting account.is_signer == true; in Anchor, the Signer<'info> type enforces this automatically. Exploitation lets an attacker bypass all access control gated on authority equality checks, making it one of the most critical and commonly audited vulnerabilities in Solana programs.

Segurança

Missing Owner Check

A vulnerability where a program deserializes and trusts account data without first confirming that the account is owned by the expected program, allowing an attacker to substitute a maliciously crafted account owned by a different program whose byte layout happens to satisfy the deserialization. On Solana, every account stores a 32-byte owner field set to the program that created it; native programs must assert account.owner == &expected_program_id, while Anchor's Account<'info, T> wrapper performs this check automatically. Failure to validate ownership can lead to complete auth bypass if an attacker can construct a fake account whose data parses into a struct with elevated privileges.

Segurança

Arbitrary CPI

A vulnerability where a program accepts an arbitrary program account from the caller and invokes it via Cross-Program Invocation (CPI) without verifying it matches a known, trusted program ID, effectively letting an attacker substitute a malicious program that executes under the victim program's authority or manipulates accounts the victim program passes to it. A common pattern is accepting a token_program account without checking it equals spl_token::ID, so the attacker passes a lookalike program that records or drains account data. Prevention requires hard-coding or explicitly checking the program ID before every CPI call.

Segurança

PDA Substitution Attack

A vulnerability where a program derives a PDA internally but accepts an externally supplied account as that PDA without re-deriving and comparing the address, allowing an attacker to pass a different PDA (derived from attacker-controlled seeds) that the program will treat as legitimate. Because PDAs are deterministic, the only way to guarantee account identity is to call Pubkey::find_program_address (or equivalent) with the expected seeds inside the program and assert the result equals the supplied key. Anchor's seeds and bump constraints on the Account type automate this re-derivation and equality check.