Reproduced Exploit
Remora: changing PaymentSettler.stablecoin bricks dividend claims
RemoraToken.stablecoin is documented as the same coin PaymentSettler uses, and the setter that used to live on DividendManager was removed. PaymentSettler.changeStablecoin still replaces its own slot. After that call the two addresses differ. claimDividend reverts on the mismatch, so 1000 USDC sitt…
Loss
1000 USDC dividends locked in PaymentSettler. claimDividend reverts
Chain
Ethereum
Category
logic
Date
Jul 2025
Source
AuditVault
EVM Playground
Source-level debugger — step opcodes and Solidity in sync
The attack is replayed in an in-browser EVM preloaded with the exact dumped fork state. The execution tree shows every call; step by Solidity line or by opcode across all depths — source, Stack, Memory, Storage, Balances (native / ERC-20 / NFT), Transient storage and Return value stay in sync. Click a tree node, opcode, or source line to jump. Query opens a search over the trace: previous and next writes, balance changes and calls, breakpoints, and a diff of everything that changed between two steps. No backend, no live RPC.
Source & credit. Reproduction of a public audit finding curated by AuditVault — the original finding: 61177-paymentsettler-can-change-stablecoin-but-remoratoken-cant-re. Standalone Foundry PoC and full write-up: 61177-paymentsettler-can-change-stablecoin-but-remoratoken-cant-re_exp in the
evm-hack-registrymirror.
Vulnerability classes:
vuln/logic/incorrect-state-transition·vuln/logic/state-update
Key info#
| Field | Value |
|---|---|
| Loss | 1000 USDC dividends locked in PaymentSettler. claimDividend reverts |
| Vulnerable contract | PaymentSettler.changeStablecoin |
| Attacker EOA | 0x1111111111111111111111111111111111111111 (the holder, and the restricted caller in this reduction) |
| Attack contract | Exploit |
| Attack tx | Exploit.run() |
| Chain / block / date | Ethereum model · block 0 · 2025-07 |
| Compiler | solc 0.8.27, cancun, via IR |
| Bug class | One stablecoin slot can be updated and the other cannot |
TL;DR#
RemoraToken.stablecoin is documented as the same coin PaymentSettler uses, and the setter that used to live on DividendManager was removed. PaymentSettler.changeStablecoin still replaces its own slot. After that call the two addresses differ. claimDividend reverts on the mismatch, so 1000 USDC sitting in the settler for the holder is not paid. Before the change, the same claim pays the 1000.
Background#
Cyfrin's 4 July 2025 Remora Pledge v2.0 review, reported by Dacian. RemoraToken carries address public stablecoin with the comment that it must match the payment settler. PaymentSettler has the same member and a restricted changeStablecoin. Remora fixed this in commit ced21ba by deleting stablecoin from RemoraToken and settling fees through PaymentSettler.settleTransferFee. Cyfrin verified that commit.
The vulnerable code#
address public stablecoin; // make sure same stablecoin is used here that is used in payment settler
function changeStablecoin(address newStablecoin) external {
if (newStablecoin == address(0)) revert InvalidAddress(); // @> VULN: this setter stores newStablecoin and RemoraToken has no matching write
stablecoin = newStablecoin;
}
claimDividend reads both slots and reverts when they differ, which is the core payout the report says stops working:
address tokenCoin = stablecoin;
address settlerCoin = settler.stablecoin();
if (tokenCoin != settlerCoin) revert("stablecoin mismatch");
The report's fix removes the token-side slot entirely:
- address public stablecoin;
- if (tokenCoin != settlerCoin) revert("stablecoin mismatch");
+ settler.pay(user, amount);
Root cause#
The two contracts each store a stablecoin address, and only one of them can change. Any later function that requires the addresses to be equal becomes unreachable. The dividend tokens are already in PaymentSettler under the old coin, and pay would transfer that old coin. The claim never gets that far.
Preconditions#
RemoraToken.stablecoinandPaymentSettler.stablecoinboth start as the old USDC.- The holder is owed 1000, and the settler holds 1000 of the old USDC.
- The restricted caller invokes
changeStablecoinwith a new non-zero coin.RemoraTokenhas no function that can follow it.
Attack walkthrough#
- Mint 1000 old USDC to the settler and record a 1000 dividend for the holder.
- Call
changeStablecoinwith a freshly deployed USDC. The settler's slot updates. The token's slot does not. claimDividendreads both addresses, sees they differ, and reverts.- The settler still holds 1000. The holder's balance is 0.
- The control calls
claimDividendbefore the change. The holder receives 1000 and the settler is empty.
Diagrams#
Impact#
The holder cannot claim 1000 USDC. The coins remain in PaymentSettler and every later claimDividend reverts on the same mismatch. There is no token function that restores the old pairing. The claim that runs before changeStablecoin pays the 1000 in full.
Remediation#
Do not keep a second stablecoin on RemoraToken. That is the change in ced21ba: the token calls PaymentSettler for the transfer, so there is only one slot to update. The report also warns that a new coin with different decimals corrupts accounting, which is a separate check on changeStablecoin itself.
How to reproduce#
cd 61177-paymentsettler-can-change-stablecoin-but-remoratoken-cant-re_exp
forge test -vv
test_exploit_dividend_claim_reverts_and_locks_1000 asserts the claim reverts, the two slots differ, and the settler still holds 1000. test_control_claim_pays_before_the_coin_changes asserts the claim pays 1000 while the slots still match. Captured output is output.txt.
Sources#
- AuditVault finding: https://github.com/Auditware/AuditVault/blob/main/findings/61177-paymentsettler-can-change-stablecoin-but-remoratoken-cant-re.md
- Cyfrin report: https://github.com/solodit/solodit_content/blob/main/reports/Cyfrin/2025-07-04-cyfrin-remora-pledge-v2.0.md
- Fix commit: https://github.com/remora-projects/remora-smart-contracts/commit/ced21ba9758b814eb48a09a5e792aa89cc87e8f5
Sources & further analysis#
Reproductions & code
- Standalone PoC + full trace: 61177-paymentsettler-can-change-stablecoin-but-remoratoken-cant-re_exp (evm-hack-registry mirror).
- AuditVault finding: 61177-paymentsettler-can-change-stablecoin-but-remoratoken-cant-re.
Alerts & third-party analyses
These dashboards index community alerts tweets, post-mortems, and independent write-ups. Reach them through the protocol name above to cross-check this reproduction against other analyses.