multiversx-defi-math
OfficialSecure DeFi financial math for MultiversX.
Authormultiversx
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill addresses the critical need for precise and safe financial calculations in DeFi smart contracts on MultiversX, preventing value leakage and exploitation due to rounding errors.
Core Features & Use Cases
- Precision Management: Provides constants and guidance for choosing appropriate decimal precision (BPS, PPM, WAD, RAY).
- Safe Rounding: Implements half-up rounding for unsigned and signed numbers to avoid systematic value loss.
- Percentage Calculations: Offers utilities for fee calculations using framework's
proportion()and manual BPS/PPM methods. - Use Case: When developing a lending protocol, use this Skill's
RAY_PRECISIONand half-up rounding for interest calculations to ensure accurate compounding and prevent protocol insolvency.
Quick Start
Use the multiversx-defi-math skill to calculate a 2.5% fee on a 1000 token amount.
Dependency Matrix
Required Modules
None requiredComponents
references
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: multiversx-defi-math Download link: https://github.com/multiversx/mx-ai-skills/archive/main.zip#multiversx-defi-math Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.