Futures
Access hundreds of perpetual contracts
TradFi
Gold
One platform for global traditional assets
Options
Hot
Trade European-style vanilla options
Unified Account
Maximize your capital efficiency
Demo Trading
Introduction to Futures Trading
Learn the basics of futures trading
Futures Events
Join events to earn rewards
Demo Trading
Use virtual funds to practice risk-free trading
Launch
CandyDrop
Collect candies to earn airdrops
Launchpool
Quick staking, earn potential new tokens
HODLer Airdrop
Hold GT and get massive airdrops for free
Launchpad
Be early to the next big token project
Alpha Points
Trade on-chain assets and earn airdrops
Futures Points
Earn futures points and claim airdrop rewards
Yesterday $sui crashed
I accidentally saw that @Scallop_io users were asking about liquidation-related topics, and I also accidentally discovered this thing... feels pretty good. Sui ecosystem users should know about this.
This article is written by Nathan Ramli, the core developer/member of the leading lending protocol (Sui ecosystem of Scallop ).
The main focus of this article is about DeFi security, specifically how to prevent "Price Oracle Manipulation" (Price Oracle Manipulation). He introduces a mechanism called APM (Anti-Price Manipulation / Anti-Price Manipulation), which is also a key "moat" protecting user assets in the Scallop protocol.
Below is a summary of the core content of the article (in Chinese):
Article theme: The Manipulation Guard (Manipulation Defender)
—— Implementing the APM mechanism in lending protocols
1. Background: The biggest weakness of DeFi lending
Issue: Lending protocols typically rely on "oracles" (Oracles) to obtain asset prices.
Attack method: Hackers often exploit "Flash Loans" (Flash Loan) to manipulate the price of a token on DEXs (Decentralized Exchanges) within a very short period (within the same block).
Example: The hacker instantly inflates the price by 100 times.
Result: The oracle reads this erroneous high price, causing the lending protocol to mistakenly believe the collateral is worth a lot, allowing the hacker to borrow all stablecoins (USDC/USDT) in the protocol, leading to a bad debt.
2. Solution: APM mechanism $SUI Anti-Price Manipulation(
Nathan Ramli introduces a set of "defense mechanisms" implemented by Scallop, called APM. Its core logic no longer blindly trusts the oracle but adds an extra "filter."
How APM works:
* Cross-Check )Cross-Check(:
The system not only looks at the oracle's price but also monitors real-time spot prices of the asset across major DEXs (like Cetus, Turbos).
* Anomaly Detection )The Guard(:
If the price reported by the oracle shows extreme abnormal fluctuations compared to past prices (or market average), such as a sudden surge of 200% or 500%, the APM system will flag it as a "potential attack."
Automatic Circuit Breaker )Circuit Breaker(:
Once triggered, the contract will automatically pause the "borrowing" and "depositing" functions for that specific asset.
* Note: This is not a full shutdown, just a temporary lock on the problematic asset to prevent hackers from draining funds.
Recovery Mechanism:
When the price returns to a normal range or after a cooling-off period (e.g., 24 hours), the system will automatically unlock and resume normal operations.
3. Why is this important?
For users: Your deposits won't be drained by a hacker's flash loan attack.
For protocols: This is a necessary condition to achieve "Institutional Grade Security" )Institutional Grade Security(. Traditional finance has circuit breakers for price fluctuations; DeFi needs similar mechanisms.
Summary in one sentence:
This article explains how Scallop uses the APM mechanism to add an "insurance lock" to oracle prices, automatically pausing lending when prices spike abnormally, rendering hackers' flash loan attacks ineffective.