Gravity Bridge
- Project's own code
- Source public before the hack
Why it happened
Attack class: Bridge exploitValidators' signing infrastructure was subverted, so two thirds of the 58-set signed updateValset to shrink it to 34 and concentrate power, then that set signed withdrawals that drained the bridge.
What would have stopped it
- Put a timelock on validator-set changes, with a delay before a new set can sign withdrawals.
- Add a guardian or emergency-pause role that can freeze withdrawals independently of the validator set.
Not scored before the exploit
BlackHart had not scored Gravity Bridge before this exploit.
An attacker took over Gravity Bridge's validator set on Ethereum and drained about $5.4 million. Gravity is a bridge between Ethereum and the Cosmos-based Gravity chain, and its Ethereum contract releases funds only when validators holding two thirds of the voting power sign off. The attacker got enough of the real validators to sign a change that shrank the set from 58 validators to 34, concentrating control, then used that concentrated set to sign withdrawals that emptied the bridge's USDC, ETH, USDT and gold-backed PAXG. The funds were swapped to ETH and moved through ChangeNow and Binance. The attacker still holds about 2,059 ETH.
Gravity's Ethereum contract the bridge trusts whatever its stored validator set signs. A wallet that had been a legitimate Gravity relayer in early 2025, then went quiet for about 280 days, woke up and called updateValset, shrinking the validator set from 58 to 34 with enough signatures from the old set to pass the two-thirds threshold. About 28 hours later the concentrated set signed withdrawals that drained the bridge into a single recipient wallet, after which the funds were swapped to ETH and consolidated at a holding wallet and partly sent through ChangeNow and Binance.
Attack flow
All 5 on-chain stepsThe attack in 4 steps. Step 1, Takeover: Dormant relayer wallet (source), Gravity Bridge (bridge). Step 2, Drain: Recipient wallet (hub), about $5.4M reached this step. Step 3, Swap: Tokens swapped to ETH (swap). Step 4, Laundering: Holding wallet (exit).
Step 1: Takeover
- SourceDormant relayer walletwoke after ~280 dayscalled updateValset0xf3ec82f0...2eb1e8
- BridgeGravity Bridgevalset shrunk 58 to 34old set signed past 2/30xa4108aa1...f2d906
Step 2: Drain
- HubRecipient wallet4.35M USDC, 274 ETH, 434K USDT, 14.16 PAXG$5,400,000 claimed, +28h0x7b582033...2da1f9
Step 3: Swap
- SwapTokens swapped to ETHto ETHstablecoins, PAXG and WETH consolidated
Step 4: Laundering
- ExitHolding wallet~ 2,059 ETH still heldpartly via ChangeNow and Binance0x4d3ca32e...7C7A47
Why each step worked
- Subverted signing authority0xf3ec...b1e8
- 2/3 power is the only gateold 58-set signed the shrink to 34
- No timelock on valset changeupdateValset takes effect instantly, no guardian, no emergency stop
- Concentrated set signed withdrawals34-validator set met 2/3 power on four withdrawal batches; no per-period cap
- No outflow velocity capmissing controla single batch removed 4.35M USDC at once
- No realtime valset-change alertingmissing control~28h between the shrink and the drain went unflagged
Full forensic detail
Step-by-step reconstruction, root cause, counterfactuals, remediation, and disclosure timeline.
Exploit anatomy
Root cause
Gravity's Ethereum contract verifies that withdrawals and validator-set changes carry signatures from the stored validator set worth at least two thirds of the voting power. The signatures are the only authority, and there is no timelock, guardian, or circuit breaker on validator-set changes. The validators' signing infrastructure was compromised so that two thirds of the 58-validator set signed a change that shrank the set to 34 and concentrated power. The attacker then drained the bridge through withdrawals signed by that concentrated set. The contract behaved exactly as designed; the off-chain signing authority was subverted.
// Gravity only checks signature power, not whether a valset change is safe
function updateValset(ValsetArgs newValset, ValsetArgs currentValset, Signature[] sigs) external {
// ...verify currentValset matches checkpoint...
checkValidatorSignatures(currentValset, sigs, newCheckpoint, powerThreshold); // 2/3 power
state_lastValsetCheckpoint = newCheckpoint; // no timelock, no guardian, instant
}Prevention analysis
The malicious shrink from 58 to 34 would have been visible for hours before it took effect, giving the team and validators time to halt the bridge before any funds moved.
Even after the valset takeover, a guardian could have paused the bridge in the 28-hour gap before the drain.
A single batch could not have removed 4.35M USDC at once. The attacker would extract a fraction, buying defenders time.
Validators would not sign a set-shrinking change blindly through an automated pipeline. This is the root cause and the highest-leverage fix.
Similar incidents
Attacker obtained enough validator signing keys to authorize withdrawals. The bridge code was correct; the validator set was subverted. Same shape, larger scale.
Compromise of the multisig signer keys controlling the bridge; the stolen keys met the signing threshold and drained it.
Custodial signer authority over bridge-held assets was exercised to drain them. A signer-side compromise, not a code bug.
Remediation
Timeline
Get your protocol scored across 12 dimensions, or request ongoing coverage.