PR: #33 (feat/08-venus-adapter)
File: crates/charon-protocols/src/venus.rs
Lines: 144-146, 180-194, 254-255
Problem: connect() builds vtoken_to_underlying by calling underlying() on every vToken. vBNB (0xA07c5b74C9B40447a954e1466938b865b6BBea36) does not implement underlying() and reverts. Adapter silently debug!-logs skip at lines 186-193, omits vBNB from map. Guard at line 254 (self.vtoken_to_underlying.get(vtoken)) returns None for vBNB, asset dropped via continue. No warning emitted at scan time. No follow-up issue opened.
Impact: vBNB is the largest Venus market by TVL on BSC. Any borrower whose primary collateral is BNB is invisible to scanner. Positions never flagged for liquidation regardless of HF — direct missed revenue and systemic risk if large BNB-collateral accounts go underwater.
Fix: Special-case vBNB in connect():
const VBNB: Address = address!("A07c5b74C9B40447a954e1466938b865b6BBea36");
const WBNB: Address = address!("bb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c");
if vtoken == VBNB {
underlying_to_vtoken.insert(WBNB, VBNB);
vtoken_to_underlying.insert(VBNB, WBNB);
continue;
}
Emit warn! (not debug!) when any vToken skipped at scan time.
PR: #33 (feat/08-venus-adapter)
File: crates/charon-protocols/src/venus.rs
Lines: 144-146, 180-194, 254-255
Problem:
connect()buildsvtoken_to_underlyingby callingunderlying()on every vToken.vBNB(0xA07c5b74C9B40447a954e1466938b865b6BBea36) does not implementunderlying()and reverts. Adapter silentlydebug!-logs skip at lines 186-193, omits vBNB from map. Guard at line 254 (self.vtoken_to_underlying.get(vtoken)) returnsNonefor vBNB, asset dropped viacontinue. No warning emitted at scan time. No follow-up issue opened.Impact: vBNB is the largest Venus market by TVL on BSC. Any borrower whose primary collateral is BNB is invisible to scanner. Positions never flagged for liquidation regardless of HF — direct missed revenue and systemic risk if large BNB-collateral accounts go underwater.
Fix: Special-case vBNB in
connect():Emit
warn!(notdebug!) when any vToken skipped at scan time.