OKRW Module
Manages the creation and parameters of the native KRW-pegged stablecoin, OKRW.
OKRW minting governs how new atokrw — Maroo's native gas token — comes into existence. (Staking is settled in a separate bond denom, atmaroo.) The design is intentionally simple: one authorized minter account creates new OKRW through the OKRW precompile, and that account changes only through on-chain governance.
Key Features
Controlled Minting
Only one pre-configured account — the minter that IOkrw.getParams() returns — can mint new OKRW.
Simple and Secure
The OKRW precompile exposes only two functions — mint and the getParams view — which keeps the surface small and the attack vectors few.
Architecture
graph TD
A["Governance"] -->|sets the authorized minter| B["OKRW parameters<br/>minter · mintDenom"]
C["Authorized minter"] -->|"IOkrw.mint(recipient, amount)"| D["OKRW precompile<br/>0x…0001"]
B -.->|caller checked against minter| D
D -->|credits atokrw| E["Recipient balance"]
classDef evm fill:#0096AA,stroke:#0096AA,color:#fff;
classDef precompile fill:#FF8C50,stroke:#FF8C50,color:#fff;
class A,B,C,E evm;
class D precompile; How OKRW is minted: governance sets the single authorized minter, and only that account's IOkrw.mint call on the OKRW precompile mints and credits OKRW.
Minting Mechanism
0x1000000000000000000000000000000000000001: IOkrw.mint(recipient, amount) mints amount of OKRW and credits it to recipient. The amount is in atokrw, the 18-decimal base unit. The call checks three things before it mints:1. The recipient must not be the zero address; it reverts with
InvalidAddress(string bad).2. The amount must not be zero; a zero amount reverts with
InvalidAmount(string amount).3. The caller must be the single authorized minter; a caller that passes the first two checks but is not the minter reverts with
UnauthorizedMinter(address caller, address authorizedMinter).A successful call credits the new OKRW to the recipient's balance in the same transaction. See
okrw-mint for the full signature, errors and examples.Parameter Management
minter) and the denom it mints (mintDenom, atokrw on the testnet). A contract reads both from IOkrw.getParams(). Neither changes through a transaction from a dApp or from the minter itself: only a successful on-chain governance vote updates them, so the community controls who may mint OKRW and what its base unit is.