Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/_run-monitoring.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ env:
TELEGRAM_TOPIC_ID_RTOKEN: ${{ vars.TELEGRAM_TOPIC_ID_RTOKEN }}
TELEGRAM_TOPIC_ID_SILO: ${{ vars.TELEGRAM_TOPIC_ID_SILO }}
TELEGRAM_TOPIC_ID_STRATA: ${{ vars.TELEGRAM_TOPIC_ID_STRATA }}
TELEGRAM_TOPIC_ID_USTB: ${{ vars.TELEGRAM_TOPIC_ID_USTB }}
TELEGRAM_TOPIC_ID_USDAI: ${{ vars.TELEGRAM_TOPIC_ID_USDAI }}
TELEGRAM_TOPIC_ID_YEARN: ${{ vars.TELEGRAM_TOPIC_ID_YEARN }}

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/hourly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
timelock/timelock_alerts.py
# always run proposals after timelock alerts
aave/proposals.py
ustb/main.py
compound/proposals.py
fluid/proposals.py
maker/proposals.py
Expand Down
2 changes: 2 additions & 0 deletions stables/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
# maple
("syrupUSDC", "ethereum:0x80ac24aa929eaf5013f6436cda2a7ba190f5cc0b", "maple", Decimal("1.1")),
("syrupUSDT", "ethereum:0x356b8d89c1e1239cbbb9de4815c39a1474d5ba7d", "maple", Decimal("1.1")),
# ustb (superstate)
("USTB", "ethereum:0x43415eB6ff9DB7E26A15b704e7A3eDCe97d31C4e", "ustb", Decimal("10.5")),
# cap
# (
# "cUSD",
Expand Down
48 changes: 48 additions & 0 deletions ustb/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# USTB (Superstate) Monitoring

Monitors the [Superstate Short Duration US Government Securities Fund (USTB)](https://superstate.co/ustb) on Ethereum Mainnet.

[Risk Score Report](https://curation.yearn.fi/report/superstate-ustb/)

## Structure

- `main.py`: NAV/Share, redemption capacity, supply changes, and oracle staleness checks. Run hourly via GitHub Actions.
- Stablecoin price check is in [`stables/main.py`](../stables/main.py).

## Contract Addresses

| Contract | Address |
| ---------------------- | --------------------------------------------------------------------------------------------------------------------- |
| USTB Token (Proxy) | [`0x43415eB6ff9DB7E26A15b704e7A3eDCe97d31C4e`](https://etherscan.io/address/0x43415eB6ff9DB7E26A15b704e7A3eDCe97d31C4e) |
| Continuous Price Oracle| [`0xe4fa682f94610ccd170680cc3b045d77d9e528a8`](https://etherscan.io/address/0xe4fa682f94610ccd170680cc3b045d77d9e528a8) |
| Chainlink Oracle | [`0x289B5036cd942e619E1Ee48670F98d214E745AAC`](https://etherscan.io/address/0x289B5036cd942e619E1Ee48670F98d214E745AAC) |
| RedemptionIdle (Proxy) | [`0x4c21b7577c8fe8b0b0669165ee7c8f67fa1454cf`](https://etherscan.io/address/0x4c21b7577c8fe8b0b0669165ee7c8f67fa1454cf) |

## Alerts

### NAV/Share (Continuous Oracle + Chainlink)

- **NAV decrease**: CRITICAL alert if the latest oracle checkpoint NAV is lower than the previous one — indicates fund losses.
- **Oracle divergence**: HIGH alert if the Continuous Price Oracle and Chainlink feed differ by more than **0.5%**.

### RedemptionIdle

- **Low USDC balance**: HIGH alert if the RedemptionIdle contract holds less than **$500K** USDC (reduced redemption capacity).

### Supply Changes

- **Large supply change**: HIGH alert if USTB total supply changes by more than **+/-10%** compared to the 24h-cached baseline.

### Oracle Staleness

- **Stale oracle**: HIGH alert if the latest checkpoint `effectiveAt` timestamp is more than **4 days** (345,600s) old. The SuperstateOracle reverts at 5 days (432,000s), so this provides a 1-day buffer.

### Stablecoin Price (via stables)

- **USTB price drop**: CRITICAL alert if DeFiLlama price falls below **$10.50** (monitored in `stables/main.py`).

## Resources

- [Superstate Docs](https://docs.superstate.com/)
- [Smart Contracts](https://docs.superstate.com/welcome-to-superstate/smart-contracts)
- [Chainlink USTB NAV Feed](https://data.chain.link/feeds/ethereum/mainnet/ustb-nav)
24 changes: 24 additions & 0 deletions ustb/abi/ChainlinkAggregator.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[
{
"inputs": [],
"name": "latestRoundData",
"outputs": [
{ "internalType": "uint80", "name": "roundId", "type": "uint80" },
{ "internalType": "int256", "name": "answer", "type": "int256" },
{ "internalType": "uint256", "name": "startedAt", "type": "uint256" },
{ "internalType": "uint256", "name": "updatedAt", "type": "uint256" },
{ "internalType": "uint80", "name": "answeredInRound", "type": "uint80" }
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "decimals",
"outputs": [
{ "internalType": "uint8", "name": "", "type": "uint8" }
],
"stateMutability": "view",
"type": "function"
}
]
37 changes: 37 additions & 0 deletions ustb/abi/SuperstateOracle.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[
{
"inputs": [],
"name": "latestRoundData",
"outputs": [
{ "internalType": "uint80", "name": "roundId", "type": "uint80" },
{ "internalType": "int256", "name": "answer", "type": "int256" },
{ "internalType": "uint256", "name": "startedAt", "type": "uint256" },
{ "internalType": "uint256", "name": "updatedAt", "type": "uint256" },
{ "internalType": "uint80", "name": "answeredInRound", "type": "uint80" }
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{ "internalType": "uint256", "name": "", "type": "uint256" }
],
"name": "checkpoints",
"outputs": [
{ "internalType": "uint256", "name": "timestamp", "type": "uint256" },
{ "internalType": "uint256", "name": "effectiveAt", "type": "uint256" },
{ "internalType": "uint256", "name": "navs", "type": "uint256" }
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "decimals",
"outputs": [
{ "internalType": "uint8", "name": "", "type": "uint8" }
],
"stateMutability": "view",
"type": "function"
}
]
Loading