Skip to content

Conversation

@YauheniPratasau
Copy link

Summary

Fixed an incorrect example in the "swapVAIForStable (If the oracle price of the paired stablecoin is above $1)" paragraph.

Details

The previous documentation stated that the user would provide 11.1 VAI when feeOut = 10%, but the correct amount should be 12.1 VAI.

Correct calculation

  • Oracle price: 1 USDT = $1.1
  • Desired amount: 10 USDT
  • Conversion rate: max(1, 1.1) = 1.1 VAI per USDT
  • Principal: 10 × 1.1 = 11 VAI
  • Fee (10%): 11 × 0.1 = 1.1 VAI
  • Total = 12.1 VAI

Changes

  • Corrected the total amount from 11.1 VAI12.1 VAI
  • Unified the calculation format across multiple examples to the same clear style: 11 VAI (10 USDT * 1.1 $/USDT) + fees

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants