1/ How does @sec3dev's WatchTower `SmartThreatMonitor` learn which transactions are normal and which one's aren't to provide on demand real time alerts of abnormalities?
2/ First, it loads all historical transactions of a particular smart contract and analyzes them using a machine learning algorithm to construct an initial set of invariants (pattern of behaviour)
3/ It then tracks every new transaction and updates its database of invariants and sends out an alert if any transactions or interactions is out of the ordinary
4/ The more often you train the monitor, the smarter it gets. Here is an example of the dashboard for the `SmartThreatMonitor`, where in a normal transaction the 5th input accounts are to match the content in the table. When it doesn't, an alert is sent out through sms/slack/tg
5/ You can even go a step further, by pausing your smart contract as soon as a potential threat is detected
6/ What are some common invariants?
- Token transfer amts
- Contract dependencies
- Contract Cohorts
- Reentrancies
- Frequency
- Instructions
- Flash Loans
And much more. To test #WatchTower yourself, schedule a demo!
1/ Let's look at what was discussed during the Solana Changelog - January 31, 2023 video!
2/ A new proposal have been put up to have a fee market for storage on the cluster, where the cost of storage would change based on demand. This would change the cost of things like NFTs, token accounts, and programs
3/ Recent commits include:
• New online Tracer added to banking stage for easier debugging and performance improvement
• Geysers get updates with missing fields added, enabling faster & more efficient RPC clients
1/ This is a great Validator Security workshop by @TimGarcia0 !
2/ Key takeaways for best practices for hardening Ubuntu servers:
• Use SSH keys for login, avoid password login
• Disable password and challenge response authentication
• Consider setting up two-factor authentication
3/ • Regularly update and upgrade packages
• Audit installed packages and remove unused ones
• Use intrusion detection software like fail2ban
1/ What are some more common vulnerabilities that an attacker can exploit in Solana? 🧵
2/ - Arithmetic overflow/underflows: If an arithmetic operation results in a higher or lower value, the value will wrap around with two’s complement
- Numerical precision errors: floating point can cause precision errors and those errors can accumulate
3/ - Loss of precision in calculation: numeric calculations on integer types such as division can lose precision
- Incorrect calculation: incorrect numerical computes due to copy/paste errors
- Casting truncation
- Exponential complexity in calculation
1/ What are 5 common vulnerabilities attackers can exploit in Solana?🧵Let’s dive in:
2/ Missing signer checks: if an instruction should only be available to a restricted set of entities, but the program does not verify that the call has been signed by the appropriate entity (e.g., by checking AccountInfo::is_signer ).
3/ Missing ownership checks: for accounts that are not supposed to be fully user-controlled, the program does not check the AccountInfo::owner field
2/ Our vision from the beginning has always been to provide a suite of end-to-end solutions to help secure DApps and user experience for as many people as possible.
3/ As codebases grow much faster than human auditors, we understood early on that in order to do that we must build scalable, full-stack software solutions on top of providing top quality Manual Launch Audits.
1/ In #DEFI, borrow/lending is one of the most exciting innovations. Our WatchTower system offers LiquidationMonitor that tracks real time Loan-to-Value-Ratio(LTV) for positions in platforms such as @solendprotocol@HedgeLabs and @HubbleProtocol
2/ It does this by looking directly at on-chain states of each borrowed position and comparing it with their corresponding obligation account, at the oracle refresh level
3/ It's also super easy to customize and get it up and running for other lending protocols and chains as well! We have a public dashboard at alerts.sec3.dev/liquidation for positions that are at risk of liquidation