Platform: Code4rena
Start Date: 01/09/2023
Pot Size: $36,500 USDC
Total HM: 4
Participants: 70
Period: 6 days
Judge: kirk-baird
Id: 281
League: ETH
Rank: 39/70
Findings: 1
Award: $18.85
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: catellatech
Also found by: 0xAsen, 0xE1D, 0xStalin, 0xmystery, Breeje, Bube, DedOhWale, JayShreeRAM, K42, Krace, castle_chain, hals, hunter_w3b, kaveyjoe, m4ttm, mahdikarimi, nirlin, peanuts, sandy
18.8458 USDC - $18.85
This project aims to create cross chain stablecoin backed by real world USD assets deposited in a bank account .
USDY is a token that represents real world USD assets deposited in a bank account and earn daily interest , as interest accrues value of USDY increases so we can't consider it a stablecoin .
rUSDY is a rebasing token backed by USDY , since USDY price increases and it's not a stablecoin rUSDY holds USDY and as price of USDY increases , rUSDY rebases and adds to it total supply but price still stay stable .
RWADynamicRateOracle is the oracle used used by rUSDY to calculate USDY price , as interest rate of bank changes overtime admin of oracle sets time ranges that specifies daily interest rate at different time ranges , so RWADynamicRateOracle calculates price of USDY based on time and daily interest .
SourceBridge and DestinationBridge are implemented to enable cross chain functionality for USDY , it uses axelar to send messages to destination chain , by calling burnAndCallAxelar tokens bridged to destination chain , first tokens are burned , pays the gas and then call contract on destination chain .
DestinationBridge receives messages from SourceBridge and mint tokens (burned tokens in source) , when _execute function is called it hashes the payload and based on predefined approvals needed for amounts and source chain , attaches a approval threshold to txHash , once needed approvals met , new tokens are minted .
After analyzing the whole code base (in scope) and understanding purpose and workflow of project, i created the following checklist of malicious actions and tried to find a way to perform them .
It's worth metion that owners have full control over users assets , they can blacklist users , burn and seize their assets and change custom oracle for USDY price at any time .
I submitted a low issue indicating that txnToThresholdSet[txnHash] is not deleted after _mintIfThresholdMet, so it can be used if nonce is not spent by another chain , since txnHash calculated by hash of payload , user can bridge using the same nonce and amount from another chain so txnHash will be the same as old tx and approvals can be reused for bridge , however it's possible only if threshold is not set for that amount of tokens because it will overrides old txnToThresholdSet[txnHash] , despite very low likelihood of this issue i think it's better to fix it simply by removing txnToThresholdSet[txnHash] after _mintIfThresholdMet to lower the risks as much as possible .
8 hours
#0 - c4-pre-sort
2023-09-08T14:45:39Z
raymondfam marked the issue as sufficient quality report
#1 - c4-judge
2023-09-24T07:08:51Z
kirk-baird marked the issue as grade-b