·multiversx-defi-math
!

multiversx-defi-math

Financial math patterns for MultiversX smart contracts — precision management, half-up rounding, safe rescaling, and percentage calculations. Use when building any DeFi contract that handles financial calculations, fees, rates, or token math.

6Installs·0Trend·@multiversx

Installation

$npx skills add https://github.com/multiversx/mx-ai-skills --skill multiversx-defi-math

How to Install multiversx-defi-math

Quickly install multiversx-defi-math AI skill to your development environment via command line

  1. Open Terminal: Open your terminal or command line tool (Terminal, iTerm, Windows Terminal, etc.)
  2. Run Installation Command: Copy and run this command: npx skills add https://github.com/multiversx/mx-ai-skills --skill multiversx-defi-math
  3. Verify Installation: Once installed, the skill will be automatically configured in your AI coding environment and ready to use in Claude Code, Cursor, or OpenClaw

Source: multiversx/mx-ai-skills.

SKILL.md

View raw

Reusable mathematical patterns for financial safety in MultiversX smart contracts.

| BPS (4) | 10,000 = 100% | Fees, simple percentages, reserve factors | | PPM (6) | 1,000,000 = 100% | Fine-grained percentages, partial withdrawals | | WAD (18) | 1e18 = 1.0 | Token amounts, prices, share ratios | | RAY (27) | 1e27 = 1.0 | Interest indices, compounding rates, any math needing minimal precision loss |

Rule of thumb: Use the lowest precision that avoids rounding errors in your domain. For intermediate calculations, always use a higher precision than the final result.

Financial math patterns for MultiversX smart contracts — precision management, half-up rounding, safe rescaling, and percentage calculations. Use when building any DeFi contract that handles financial calculations, fees, rates, or token math. Source: multiversx/mx-ai-skills.

Facts (cite-ready)

Stable fields and commands for AI/search citations.

Install command
npx skills add https://github.com/multiversx/mx-ai-skills --skill multiversx-defi-math
Category
!Security
Verified
First Seen
2026-02-22
Updated
2026-03-10

Browse more skills from multiversx/mx-ai-skills

Quick answers

What is multiversx-defi-math?

Financial math patterns for MultiversX smart contracts — precision management, half-up rounding, safe rescaling, and percentage calculations. Use when building any DeFi contract that handles financial calculations, fees, rates, or token math. Source: multiversx/mx-ai-skills.

How do I install multiversx-defi-math?

Open your terminal or command line tool (Terminal, iTerm, Windows Terminal, etc.) Copy and run this command: npx skills add https://github.com/multiversx/mx-ai-skills --skill multiversx-defi-math Once installed, the skill will be automatically configured in your AI coding environment and ready to use in Claude Code, Cursor, or OpenClaw

Where is the source repository?

https://github.com/multiversx/mx-ai-skills