Skip to content

Tsukimarf patch 1#225

Open
Tsukimarf wants to merge 15 commits intoPiNetwork:mainfrom
Tsukimarf:Tsukimarf-patch-1
Open

Tsukimarf patch 1#225
Tsukimarf wants to merge 15 commits intoPiNetwork:mainfrom
Tsukimarf:Tsukimarf-patch-1

Conversation

@Tsukimarf
Copy link
Copy Markdown

Summary

Minor wording fixes for clarity and readability.

Changes

  • Corrected wording in existing content for improved clarity
  • No structural or substantive changes made

Motivation

The existing wording was unclear or imprecise. This patch improves readability without altering the intent or meaning of the original content.

Tsukimarf and others added 15 commits April 12, 2026 17:31
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
What it does: This PR adds a new JavaScript file (PiRC1/4-allocation/pirc_allocation_design2.js) implementing PiRC Allocation Design Option 2 — a model for liquidity pool (LP) formation using participant deposits and swaps on the Pi Network.
Key additions:

PIRC_ALLOCATION_DB — a static configuration object encoding allocation parameters: token/Pi splits, LP fees, engagement-based discount-to-lockup policy, process steps, and reference price points.
PiRCAllocationCalculator — a class that computes listing prices, AMM (constant-product) pool invariants, swap prices, effective blended prices (harmonic mean), discount percentages, and per-participant allocations.
A runDemo() function that logs pool summaries and price curves to the console.

Issues flagged by automated reviewers (Sourcery & Cubic):

Weak input validation in the constructor — T <= 0 || C <= 0 doesn't catch NaN, Infinity, or non-numeric strings. The fix is to use Number.isFinite(T) && Number.isFinite(C).
No bounds checking in participantSummary / discountPercent — values of s outside [0, C/2] can produce nonsensical or negative outputs without any error.
Redundant pEff(s) call in effectivePriceCurve — it's computed twice per iteration; storing it in a local variable is cleaner and more efficient.
runDemo() runs unconditionally on import — this causes side effects (console output) whenever the module is imported. It should be gated with if (require.main === module).

The author co-authored follow-up commits with Sourcery's suggestions, so some of these may already be addressed in the latest commit (75d0287).

2. Common Encryption Techniques
Encryption is the process of transforming readable data (plaintext) into an unreadable form (ciphertext) using an algorithm and a key. Here are the major categories:
Symmetric Encryption uses the same key to both encrypt and decrypt. It's fast and well-suited for large data. Common algorithms include AES (Advanced Encryption Standard, the current gold standard), DES (now obsolete), and 3DES. The main challenge is securely sharing the key between parties.
Asymmetric Encryption uses a mathematically linked key pair — a public key to encrypt and a private key to decrypt. This solves the key-distribution problem. RSA is the classic example; Elliptic Curve Cryptography (ECC) achieves similar security with much smaller key sizes, making it popular on mobile devices. Asymmetric encryption is slower than symmetric, so it's typically used to exchange keys rather than encrypt bulk data.
Hybrid Encryption combines both: asymmetric encryption is used to securely exchange a symmetric session key, then symmetric encryption handles the actual data. TLS (the "S" in HTTPS) works this way.
Hashing is technically a one-way transformation, not reversible encryption, but is closely related. Algorithms like SHA-256 and bcrypt produce a fixed-size digest of data. Hashing is used for password storage, data integrity checks, and digital signatures. It's worth noting that hashing is not encryption — you cannot recover the original data from a hash.
End-to-End Encryption (E2EE) is an application of asymmetric + symmetric techniques (like the Signal Protocol) ensuring only the communicating parties can read the messages — not even the service provider.
Common use cases by technique:
TechniqueExamplesUse CaseSymmetricAES, ChaCha20File encryption, disk encryptionAsymmetricRSA, ECCKey exchange, digital signatures, TLS handshakeHashingSHA-256, bcryptPasswords, integrity checksHybridTLS/HTTPS, PGPSecure communication
Let me know if you'd like a deeper dive into any of these, or a more specific review of the PR code itself!
Revert "Create pirc_allocation_design2.js"
@304411047
Copy link
Copy Markdown

Global pioneers are calling on the PCT to allow us to define the price of Pi ourselves, rather than letting it drift aimlessly and become a tool for speculation.
The PIRC2 smart contract API should set a price ceiling. We call on global pioneers to vote on this decision.
If not now, when will we decide on the GCV? How long will we allow this speculation to continue? This directly damages Pi's prospects. We strongly recommend defining the GCV at this stage; the first step is to set a ceiling for the smart contract subscription price.

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