🪐
Cantina Docs
  • 🪐Welcome to Cantina
  • 🤝Services
    • Security Reviews
    • Competitions
    • Bug Bounty
    • Guilds
    • Public Goods
  • 💵Referral program
  • 📄Public Reports
  • 👑Reputation
  • 👥Cantina Account
    • 🔷Claim an Account
    • 🔷Company Account
      • 🔹Create a Company Account
      • 🔹Managing users
      • 🔹Company Dashboard
      • 🔹Company Reviews
    • 🔷Security Researcher Account
      • 🔹Create Security Researcher Account
      • 🔹Security Researcher Dashboard
      • 🔹Calendar
      • 🔹Reviews
      • 🔹KYC and Payments
  • 💻Cantina Code
    • 🕵️Cantina Code for Security Researchers
      • 🔶Code Review
        • 🔸Download content and toggle sidebar
        • 🔸Highlighting code
      • 🔶Findings
        • 🔸Findings Submission
        • 🔸Findings Labels
        • 🔸Findings Status
        • 🔸Add code to existing finding
        • 🔸Examples
      • 🔶Chat
      • 🔶Reports
      • 🔶Comments & Pings
      • 🔶Diagrams & Formulas
    • 🏢Cantina Code for Companies
      • 🗄️Responding to Pings
      • 🗄️Responding to Findings
      • 🗄️Report Generation
  • 🏆Cantina Competitions
    • 🕵️For Security Researchers
      • 🔶Payments
      • 🔶Teams
      • 🔶Finding Status
      • 🔶Finding Labels
    • 🏢For Companies
      • 🗄️Competition Submission Template
    • 🧑‍⚖️Judging Process
      • 📜Finding Severity Criteria
      • 📜Scoring
      • 📜Judging Phase
      • 📜Escalation Process
    • 🤝 Fellowship Steward Model
  • 💰 Cantina Bounties
    • Bounty Severity Classification
    • Mediation Process for Bounties
  • ✅ Cantina Bug Bounty Coverage
    • Cantina Coverage Details
  • ❓FAQ
    • ❔FAQ Competitions
    • ❔FAQ Security Reviews
  • 🔗Links
Powered by GitBook
On this page
  • Mermaid Diagram
  • MathJax Formulas
  1. Cantina Code
  2. Cantina Code for Security Researchers

Diagrams & Formulas

PreviousComments & PingsNextCantina Code for Companies

Last updated 3 months ago

Cantina Code supports diagramming libraries such as and MathJax for mathematical formula rendering. Paired with a well written finding or comment, these tools allow you to visually and efficiently communicate your point to the reader.

Mermaid Diagram

The following code block

sequenceDiagram
    participant Bank
    participant Attacker

    Attacker->>+Bank: Request withdrawal
    Bank->>+Attacker: Transfer funds
    Attacker->>+Bank: Request withdrawal (reentry)
    Bank->>+Attacker: Transfer funds (reentry)
    Bank-->>-Attacker: Insufficient balance

when introduced as a comment will display as illustrated in the image below.

MathJax Formulas

Cantina Comments also render MathJax formulas. The following code block

$$
H_{f} = \frac {\sum Collateral_{i}\;in\;ETH  \times  Liquidation\;Threshold}{Total\;Collateral\;in\;ETH} 
$$

when introduced inside a comment will render as such

💻
🕵️
🔶
Mermaid.js
Rendered mermaid diagram
Rendered Mathjax formula
Sequence diagram shows smart contract reentrancy attack.
ssue in Cantina Code with a mathematical formula using Mathjax, highlighting a potential error in implementation for Web3 security audits.