[{"data":1,"prerenderedAt":3482},["ShallowReactive",2],{"navigation":3,"\u002Fprotocol\u002Fm-token":260,"\u002Fprotocol\u002Fm-token-surround":3477},[4,22,105,148,177,186,243],{"title":5,"path":6,"stem":7,"children":8,"page":21},"Agents","\u002Fagents","agents",[9,13,17],{"title":10,"path":11,"stem":12},"LLMs.txt","\u002Fagents\u002Fllms-txt","agents\u002Fllms-txt",{"title":14,"path":15,"stem":16},"MCP Server","\u002Fagents\u002Fmcp-server","agents\u002Fmcp-server",{"title":18,"path":19,"stem":20},"Skills","\u002Fagents\u002Fskills","agents\u002Fskills",false,{"title":23,"path":24,"stem":25,"children":26,"page":21},"Api Reference","\u002Fapi-reference","api-reference",[27,31,35,68],{"title":28,"path":29,"stem":30},"Authentication","\u002Fapi-reference\u002Fauthentication","api-reference\u002Fauthentication",{"title":32,"path":33,"stem":34},"API Reference","\u002Fapi-reference\u002Fintroduction","api-reference\u002Fintroduction",{"title":36,"path":37,"stem":38,"children":39,"page":21},"Orchestration","\u002Fapi-reference\u002Forchestration","api-reference\u002Forchestration",[40,44,48,52,56,60,64],{"title":41,"path":42,"stem":43},"POST \u002Fcancel-order","\u002Fapi-reference\u002Forchestration\u002Fcancel-order","api-reference\u002Forchestration\u002Fcancel-order",{"title":45,"path":46,"stem":47},"GET \u002Forder-status\u002F{orderId}","\u002Fapi-reference\u002Forchestration\u002Forder-status","api-reference\u002Forchestration\u002Forder-status",{"title":49,"path":50,"stem":51},"GET \u002Forders","\u002Fapi-reference\u002Forchestration\u002Forders","api-reference\u002Forchestration\u002Forders",{"title":53,"path":54,"stem":55},"Orchestration API","\u002Fapi-reference\u002Forchestration\u002Foverview","api-reference\u002Forchestration\u002Foverview",{"title":57,"path":58,"stem":59},"POST \u002Fquote","\u002Fapi-reference\u002Forchestration\u002Fquote","api-reference\u002Forchestration\u002Fquote",{"title":61,"path":62,"stem":63},"GET \u002Fsupported-assets","\u002Fapi-reference\u002Forchestration\u002Fsupported-assets","api-reference\u002Forchestration\u002Fsupported-assets",{"title":65,"path":66,"stem":67},"TypeScript Type Generation","\u002Fapi-reference\u002Forchestration\u002Ftype-generation","api-reference\u002Forchestration\u002Ftype-generation",{"title":69,"path":70,"stem":71,"children":72,"page":21},"Recipes","\u002Fapi-reference\u002Frecipes","api-reference\u002Frecipes",[73,77,81,85,89,93,97,101],{"title":74,"path":75,"stem":76},"Collateral Composition","\u002Fapi-reference\u002Frecipes\u002Fcollateral-composition","api-reference\u002Frecipes\u002Fcollateral-composition",{"title":78,"path":79,"stem":80},"Daily Yields","\u002Fapi-reference\u002Frecipes\u002Fdaily-yields","api-reference\u002Frecipes\u002Fdaily-yields",{"title":82,"path":83,"stem":84},"Earner Rate History","\u002Fapi-reference\u002Frecipes\u002Fearner-rate-history","api-reference\u002Frecipes\u002Fearner-rate-history",{"title":86,"path":87,"stem":88},"Minter Daily Expenses","\u002Fapi-reference\u002Frecipes\u002Fminter-daily-expenses","api-reference\u002Frecipes\u002Fminter-daily-expenses",{"title":90,"path":91,"stem":92},"Network Supply","\u002Fapi-reference\u002Frecipes\u002Fnetwork-supply","api-reference\u002Frecipes\u002Fnetwork-supply",{"title":94,"path":95,"stem":96},"Protocol Configuration","\u002Fapi-reference\u002Frecipes\u002Fprotocol-config","api-reference\u002Frecipes\u002Fprotocol-config",{"title":98,"path":99,"stem":100},"Token Holders","\u002Fapi-reference\u002Frecipes\u002Ftoken-holders","api-reference\u002Frecipes\u002Ftoken-holders",{"title":102,"path":103,"stem":104},"Token Overview","\u002Fapi-reference\u002Frecipes\u002Ftoken-overview","api-reference\u002Frecipes\u002Ftoken-overview",{"title":106,"path":107,"stem":108,"children":109,"page":21},"Build","\u002Fbuild","build",[110,114,118,122,126,130,134,138,142,145],{"title":111,"path":112,"stem":113},"Integrating with the M0 Portals","\u002Fbuild\u002Fbridging-developer","build\u002Fbridging-developer",{"title":115,"path":116,"stem":117},"Bridging M And wM Tokens","\u002Fbuild\u002Fbridging-user","build\u002Fbridging-user",{"title":119,"path":120,"stem":121},"Stablecoin Extension Templates","\u002Fbuild\u002Fchoosing-your-model","build\u002Fchoosing-your-model",{"title":123,"path":124,"stem":125},"How to Design Your Stablecoin","\u002Fbuild\u002Foverview","build\u002Foverview",{"title":127,"path":128,"stem":129},"Implementation Guide: NoYield","\u002Fbuild\u002Fsvm-noyield-guide","build\u002Fsvm-noyield-guide",{"title":131,"path":132,"stem":133},"Getting started","\u002Fbuild\u002Fsvm-noyield-guide-overview","build\u002Fsvm-noyield-guide-overview",{"title":135,"path":136,"stem":137},"Implementation Guide: MYieldToOne (Onshore)","\u002Fbuild\u002Ftreasury-guide","build\u002Ftreasury-guide",{"title":139,"path":140,"stem":141},"Implementation Guide: JMI (Offshore)","\u002Fbuild\u002Ftreasury-jmi-guide","build\u002Ftreasury-jmi-guide",{"title":131,"path":143,"stem":144},"\u002Fbuild\u002Ftreasury-jmi-overview","build\u002Ftreasury-jmi-overview",{"title":131,"path":146,"stem":147},"\u002Fbuild\u002Ftreasury-model","build\u002Ftreasury-model",{"title":149,"path":150,"stem":151,"children":152,"page":21},"Get Started","\u002Fget-started","get-started",[153,157,161,165,169,173],{"title":154,"path":155,"stem":156},"Accessing Liquidity","\u002Fget-started\u002Faccessing-liquidity","get-started\u002Faccessing-liquidity",{"title":158,"path":159,"stem":160},"Cross Chain Interoperability","\u002Fget-started\u002Fcross-chain","get-started\u002Fcross-chain",{"title":162,"path":163,"stem":164},"Architecture Overview","\u002Fget-started\u002Fhow-it-works","get-started\u002Fhow-it-works",{"title":166,"path":167,"stem":168},"Overview","\u002Fget-started\u002Foverview","get-started\u002Foverview",{"title":170,"path":171,"stem":172},"Platform Mechanics & Reward Programmability","\u002Fget-started\u002Fprotocol-mechanics","get-started\u002Fprotocol-mechanics",{"title":174,"path":175,"stem":176},"Stablecoin Features","\u002Fget-started\u002Fstablecoin-features","get-started\u002Fstablecoin-features",{"title":178,"path":179,"stem":180,"children":181,"page":21},"Issuers","\u002Fissuers","issuers",[182],{"title":183,"path":184,"stem":185},"Issue Your Stablecoin","\u002Fissuers\u002Foverview","issuers\u002Foverview",{"title":187,"path":188,"stem":189,"children":190,"page":21},"Protocol","\u002Fprotocol","protocol",[191,195,199,203,207,211,215,219,223,227,231,235,239],{"title":192,"path":193,"stem":194},"Distribution Vault","\u002Fprotocol\u002Fdistribution-vault","protocol\u002Fdistribution-vault",{"title":196,"path":197,"stem":198},"M0 Extensions","\u002Fprotocol\u002Fextensions","protocol\u002Fextensions",{"title":200,"path":201,"stem":202},"Limit Order Protocol","\u002Fprotocol\u002Flimit-order-protocol","protocol\u002Flimit-order-protocol",{"title":204,"path":205,"stem":206},"M0 Portals","\u002Fprotocol\u002Fm-portals","protocol\u002Fm-portals",{"title":208,"path":209,"stem":210},"M Token","\u002Fprotocol\u002Fm-token","protocol\u002Fm-token",{"title":212,"path":213,"stem":214},"M Token Specification","\u002Fprotocol\u002Fm-token-spec","protocol\u002Fm-token-spec",{"title":216,"path":217,"stem":218},"Minting & Burning (MinterGateway)","\u002Fprotocol\u002Fminting-burning","protocol\u002Fminting-burning",{"title":220,"path":221,"stem":222},"Portal V2","\u002Fprotocol\u002Fportal-v2","protocol\u002Fportal-v2",{"title":224,"path":225,"stem":226},"Rate Models & Yield","\u002Fprotocol\u002Frate-models","protocol\u002Frate-models",{"title":228,"path":229,"stem":230},"Roles","\u002Fprotocol\u002Froles","protocol\u002Froles",{"title":232,"path":233,"stem":234},"M0 On Solana","\u002Fprotocol\u002Fsolana","protocol\u002Fsolana",{"title":236,"path":237,"stem":238},"Wrapped M (wM)","\u002Fprotocol\u002Fwrapped-m","protocol\u002Fwrapped-m",{"title":240,"path":241,"stem":242},"Wrapped M Specification","\u002Fprotocol\u002Fwrapped-m-spec","protocol\u002Fwrapped-m-spec",{"title":244,"path":245,"stem":246,"children":247,"page":21},"Resources","\u002Fresources","resources",[248,252,256],{"title":249,"path":250,"stem":251},"Deployments","\u002Fresources\u002Faddresses","resources\u002Faddresses",{"title":253,"path":254,"stem":255},"Audits","\u002Fresources\u002Faudits","resources\u002Faudits",{"title":257,"path":258,"stem":259},"Glossary","\u002Fresources\u002Fglossary","resources\u002Fglossary",{"id":261,"title":208,"body":262,"description":3470,"extension":3471,"links":3472,"meta":3473,"navigation":3474,"path":209,"seo":3475,"stem":210,"__hash__":3476},"docs\u002Fprotocol\u002Fm-token.md",{"type":263,"value":264,"toc":3448},"minimark",[265,269,276,285,292,309,319,328,370,374,416,421,426,431,475,479,486,513,517,520,552,564,568,572,578,582,626,633,638,642,648,1056,1078,1082,1088,1407,1410,1414,1423,1510,1514,1520,1559,1563,1566,1795,1825,1829,1835,1839,1893,1897,1902,3001,3005,3008,3031,3034,3058,3062,3075,3140,3147,3176,3180,3216,3220,3226,3230,3266,3270,3345,3349,3391,3395,3408,3412,3432,3436,3444],[266,267,166],"h2",{"id":268},"overview",[270,271,272],"p",{},[273,274,275],"em",{},"M is for Money.",[270,277,278],{},[279,280],"img",{"alt":281,"className":282,"src":284},"M",[283],"doc-logo","\u002Fimages\u002Ftechnical-documentations\u002Fm\u002FM.png",[270,286,287,291],{},[288,289,290],"code",{},"$M"," is an immutable ERC20-compliant token at the heart of the M0 Ecosystem. It serves as the foundational building block for all M0 Extensions. Each unit is backed 1:1 by approved collateral. It implements an innovative dual-balance accounting system:",[293,294,295,303],"ol",{},[296,297,298,302],"li",{},[299,300,301],"strong",{},"Non-earning Balances",": Standard ERC20-style token balances that remain static over time - non-rebasing amounts do not increase without external transactions.",[296,304,305,308],{},[299,306,307],{},"Earning Balances",": Token balances that automatically increase in quantity over time through continuous compounding. Holders with earning balances receive additional tokens without requiring any transactions. This rebasing mechanism means users see their token count grow as interest accrues continuously, with their viewable balance updating in real-time (per block).",[270,310,311,312,318],{},"This design separates standard token functionality from interest-bearing capabilities. The M0 Two-Token Governance (TTG) system determines which accounts are eligible to become Earners through an approval process recorded in the ",[313,314,315],"a",{"href":229},[288,316,317],{},"TTGRegistrar",".",[270,320,321,323,324,327],{},[288,322,290],{}," interacts closely with several ",[299,325,326],{},"key components"," of the M0 Protocol:",[329,330,331,341,351,360],"ul",{},[296,332,333,340],{},[299,334,335],{},[313,336,337],{"href":217},[288,338,339],{},"MinterGateway",": Controls the total supply through secure mint and burn operations.",[296,342,343,350],{},[299,344,345],{},[313,346,347],{"href":225},[288,348,349],{},"Rate Models",": External smart contracts that dynamically calculate the interest rates for both Minters and Earners.",[296,352,353,359],{},[299,354,355],{},[313,356,357],{"href":229},[288,358,317],{},": The governance-controlled parameter store that, among other things, maintains the list of approved Earners and the addresses of the active Rate Models.",[296,361,362,369],{},[299,363,364],{},[313,365,366],{"href":193},[288,367,368],{},"DistributionVault",": Receives excess yield, which arises when the interest charged to Minters exceeds the yield distributed to Earners.",[266,371,373],{"id":372},"key-features-and-user-interactions","Key Features and User Interactions",[329,375,376,382,388,394,400,406],{},[296,377,378,381],{},[299,379,380],{},"Governance-Approved Yield Access",": Selected accounts can earn continuous yield after Two Token Governance (TTG) approval.",[296,383,384,387],{},[299,385,386],{},"Automatic Yield",": Earning balances grow continuously without requiring any user action.",[296,389,390,393],{},[299,391,392],{},"Transparency",": All interest calculations occur onchain with fully transparent mechanics.",[296,395,396,399],{},[299,397,398],{},"Efficiency",": A single token contract handles both stable (non-earning) and yield-generating (earning) use cases.",[296,401,402,405],{},[299,403,404],{},"Precision",": Advanced mathematical techniques are employed to ensure accurate interest calculations.",[296,407,408,411,412,415],{},[299,409,410],{},"Safety Mechanisms",": Protections are in place to ensure accounts removed from the ",[288,413,414],{},"APPROVED_EARNERS"," list by governance cannot continue earning.",[417,418,420],"h3",{"id":419},"user-interactions","User Interactions",[422,423,425],"h4",{"id":424},"basic-token-operations","Basic Token Operations",[270,427,428,430],{},[288,429,290],{}," implements all standard ERC20 functions and includes additional features:",[329,432,433,440,459,466],{},[296,434,435,436,439],{},"It has ",[299,437,438],{},"6 decimal places"," of precision for all operations.",[296,441,442,443,446,447,450,451,454,455,458],{},"Supports standard transfers (",[288,444,445],{},"transfer",", ",[288,448,449],{},"transferFrom","), approvals (",[288,452,453],{},"approve","), and balance inquiries (",[288,456,457],{},"balanceOf",").",[296,460,461,462,465],{},"Includes support for EIP-2612 ",[288,463,464],{},"permit"," for gasless approvals.",[296,467,468,469,446,472,458],{},"Includes support for EIP-3009 for transfers with authorization (",[288,470,471],{},"transferWithAuthorization",[288,473,474],{},"receiveWithAuthorization",[422,476,478],{"id":477},"earning-status-management","Earning Status Management",[270,480,481,482,485],{},"Users can interact with the earning functionality through several key functions on the ",[288,483,484],{},"MToken"," contract:",[329,487,488,494,500],{},[296,489,490,493],{},[288,491,492],{},"startEarning()",": Converts an account's regular (non-earning) balance to an earning balance. This function can only be called by an account for itself, and only if that account has been approved as an Earner by M0 Governance.",[296,495,496,499],{},[288,497,498],{},"stopEarning()",": Converts an account's earning balance back to a regular (non-earning) balance. The account retains all interest accrued up to that point. This can be called by the account owner.",[296,501,502,505,506,509,510,512],{},[288,503,504],{},"stopEarning(address account_)",": A safety function that allows anyone to stop the earning status for a specified ",[288,507,508],{},"account_"," if that account is no longer on the governance-approved ",[288,511,414],{}," list. This ensures that accounts cannot continue to earn yield if their approval is revoked.",[422,514,516],{"id":515},"balance-querying","Balance Querying",[270,518,519],{},"Several methods are available to check different aspects of balances:",[329,521,522,528,534,540,546],{},[296,523,524,527],{},[288,525,526],{},"balanceOf(address account)",": Returns the current balance of the account. For earning accounts, this includes all accrued interest up to the current block.",[296,529,530,533],{},[288,531,532],{},"principalBalanceOf(address account)",": Returns the underlying principal amount for earning accounts. For non-earning accounts, this will be 0.",[296,535,536,539],{},[288,537,538],{},"isEarning(address account)",": Checks if an account is currently in earning mode.",[296,541,542,545],{},[288,543,544],{},"totalEarningSupply()",": Returns the total amount of tokens (present value including accrued interest) currently held in earning balances.",[296,547,548,551],{},[288,549,550],{},"totalNonEarningSupply()",": Returns the total amount of tokens held in non-earning balances.",[270,553,554,555,558,559,561,562,318],{},"The ",[288,556,557],{},"totalSupply()"," is the sum of ",[288,560,544],{}," and ",[288,563,550],{},[266,565,567],{"id":566},"technical-mechanics","Technical Mechanics",[417,569,571],{"id":570},"dual-balance-system","Dual Balance System",[270,573,574,575,577],{},"The dual balance system is one of the core innovations of the ",[288,576,290],{}," token, enabling it to function both as a standard stable token and a yield-bearing asset.",[422,579,581],{"id":580},"two-balance-types","Two Balance Types",[583,584,585,598],"table",{},[586,587,588],"thead",{},[589,590,591,595],"tr",{},[592,593,594],"th",{},"Non-Earning",[592,596,597],{},"Earning (allowed by governance)",[599,600,601,610,618],"tbody",{},[589,602,603,607],{},[604,605,606],"td",{},"Function exactly like regular ERC20 tokens",[604,608,609],{},"Automatically increase in value over time through continuous compounding",[589,611,612,615],{},[604,613,614],{},"Value remains constant unless explicitly transferred",[604,616,617],{},"Stored internally as \"principal amounts\" that get multiplied by a growing index",[589,619,620,623],{},[604,621,622],{},"Stored as actual token amounts in the contract",[604,624,625],{},"Interest accrues without requiring any transactions or claim process",[417,627,629,630,632],{"id":628},"balance-conversions-in-m-token","Balance Conversions in ",[288,631,290],{}," token",[270,634,554,635,637],{},[288,636,484],{}," contract implements a dual accounting system that allows users and developers to leverage both non-earning and earning states. Understanding how the state changes work is crucial.",[422,639,641],{"id":640},"non-earning-to-earning-conversion-process","Non-earning to Earning Conversion Process",[270,643,644,645,647],{},"When an approved user calls ",[288,646,492],{}," to convert from non-earning to earning status:",[293,649,650,655,662,1007,1014,1035],{},[296,651,652,653,458],{},"The contract first checks if the user is approved as an earner in the M0 Governance system (via the ",[288,654,317],{},[296,656,657,658,661],{},"The user's current token balance (let's call it ",[288,659,660],{},"amount",") is read from storage.",[296,663,664,665,667,668,996,999,1000,1003,1004,318],{},"This ",[288,666,660],{}," is converted to a smaller \"principal amount\" using the following calculation:",[669,670,673],"span",{"className":671},[672],"katex-display",[669,674,677,789],{"className":675},[676],"katex",[669,678,681],{"className":679},[680],"katex-mathml",[682,683,686],"math",{"xmlns":684,"display":685},"http:\u002F\u002Fwww.w3.org\u002F1998\u002FMath\u002FMathML","block",[687,688,689,784],"semantics",{},[690,691,692,695,698,701,704,707,709,711,713,716,719,722,725,728,730,733,737],"mrow",{},[693,694,270],"mi",{},[693,696,697],{},"r",[693,699,700],{},"i",[693,702,703],{},"n",[693,705,706],{},"c",[693,708,700],{},[693,710,270],{},[693,712,313],{},[693,714,715],{},"l",[693,717,718],{},"A",[693,720,721],{},"m",[693,723,724],{},"o",[693,726,727],{},"u",[693,729,703],{},[693,731,732],{},"t",[734,735,736],"mo",{},"=",[738,739,740,754],"mfrac",{},[690,741,742,744,746,748,750,752],{},[693,743,313],{},[693,745,721],{},[693,747,724],{},[693,749,727],{},[693,751,703],{},[693,753,732],{},[690,755,756,758,760,762,764,767,769,771,774,776,779,781],{},[693,757,706],{},[693,759,727],{},[693,761,697],{},[693,763,697],{},[693,765,766],{},"e",[693,768,703],{},[693,770,732],{},[693,772,773],{},"I",[693,775,703],{},[693,777,778],{},"d",[693,780,766],{},[693,782,783],{},"x",[785,786,788],"annotation",{"encoding":787},"application\u002Fx-tex","principalAmount = \\frac{amount}{currentIndex}",[669,790,794,862],{"className":791,"ariaHidden":793},[792],"katex-html","true",[669,795,798,803,808,812,816,819,822,825,828,832,835,838,841,844,847,850,855,859],{"className":796},[797],"base",[669,799],{"className":800,"style":802},[801],"strut","height:0.8889em;vertical-align:-0.1944em;",[669,804,270],{"className":805},[806,807],"mord","mathnormal",[669,809,697],{"className":810,"style":811},[806,807],"margin-right:0.0278em;",[669,813,815],{"className":814},[806,807],"in",[669,817,706],{"className":818},[806,807],[669,820,700],{"className":821},[806,807],[669,823,270],{"className":824},[806,807],[669,826,313],{"className":827},[806,807],[669,829,715],{"className":830,"style":831},[806,807],"margin-right:0.0197em;",[669,833,718],{"className":834},[806,807],[669,836,721],{"className":837},[806,807],[669,839,724],{"className":840},[806,807],[669,842,727],{"className":843},[806,807],[669,845,703],{"className":846},[806,807],[669,848,732],{"className":849},[806,807],[669,851],{"className":852,"style":854},[853],"mspace","margin-right:0.2778em;",[669,856,736],{"className":857},[858],"mrel",[669,860],{"className":861,"style":854},[853],[669,863,865,869],{"className":864},[797],[669,866],{"className":867,"style":868},[801],"height:1.9781em;vertical-align:-0.686em;",[669,870,872,877,992],{"className":871},[806],[669,873],{"className":874},[875,876],"mopen","nulldelimiter",[669,878,880],{"className":879},[738],[669,881,885,983],{"className":882},[883,884],"vlist-t","vlist-t2",[669,886,889,978],{"className":887},[888],"vlist-r",[669,890,894,942,953],{"className":891,"style":893},[892],"vlist","height:1.2921em;",[669,895,897,902],{"style":896},"top:-2.314em;",[669,898],{"className":899,"style":901},[900],"pstrut","height:3em;",[669,903,905,908,911,914,917,920,923,926,930,933,936,939],{"className":904},[806],[669,906,706],{"className":907},[806,807],[669,909,727],{"className":910},[806,807],[669,912,697],{"className":913,"style":811},[806,807],[669,915,697],{"className":916,"style":811},[806,807],[669,918,766],{"className":919},[806,807],[669,921,703],{"className":922},[806,807],[669,924,732],{"className":925},[806,807],[669,927,773],{"className":928,"style":929},[806,807],"margin-right:0.0785em;",[669,931,703],{"className":932},[806,807],[669,934,778],{"className":935},[806,807],[669,937,766],{"className":938},[806,807],[669,940,783],{"className":941},[806,807],[669,943,945,948],{"style":944},"top:-3.23em;",[669,946],{"className":947,"style":901},[900],[669,949],{"className":950,"style":952},[951],"frac-line","border-bottom-width:0.04em;",[669,954,956,959],{"style":955},"top:-3.677em;",[669,957],{"className":958,"style":901},[900],[669,960,962,966,969,972,975],{"className":961},[806],[669,963,965],{"className":964},[806,807],"am",[669,967,724],{"className":968},[806,807],[669,970,727],{"className":971},[806,807],[669,973,703],{"className":974},[806,807],[669,976,732],{"className":977},[806,807],[669,979,982],{"className":980},[981],"vlist-s","​",[669,984,986],{"className":985},[888],[669,987,990],{"className":988,"style":989},[892],"height:0.686em;",[669,991],{},[669,993],{"className":994},[995,876],"mclose",[997,998],"br",{},"where ",[288,1001,1002],{},"currentIndex"," started at 1.0 (represented as 1e12) and has been growing continuously based on the ",[288,1005,1006],{},"EARNER_RATE_MODEL",[296,1008,1009,1010,1013],{},"The conversion rounds ",[299,1011,1012],{},"down"," in favor of the protocol (a tiny fraction may be left, contributing to protocol reserves).",[296,1015,1016,1017,1020,1021,1024,1025,1028,1029,1032,1033,318],{},"The user's raw balance in storage (within the ",[288,1018,1019],{},"_balances"," mapping, specifically ",[288,1022,1023],{},"MBalance.rawBalance",") is updated to this ",[288,1026,1027],{},"principalAmount",". Their ",[288,1030,1031],{},"MBalance.isEarning"," flag is set to ",[288,1034,793],{},[296,1036,1037,1038],{},"Global accounting variables are updated:",[329,1039,1040,1048],{},[296,1041,1042,1045,1046,318],{},[288,1043,1044],{},"totalNonEarningSupply"," is decreased by the original ",[288,1047,660],{},[296,1049,1050,1053,1054,318],{},[288,1051,1052],{},"principalOfTotalEarningSupply"," is increased by the ",[288,1055,1027],{},[270,1057,664,1058,1060,1061,1063,1064,1067,1068,1071,1072,1074,1075,1077],{},[288,1059,1027],{}," will continually grow in value as the ",[288,1062,1002],{}," increases. The user doesn't see their token count change directly in the ",[288,1065,1066],{},"rawBalance"," storage, but when they check their balance through ",[288,1069,1070],{},"balanceOf()",", the contract multiplies their ",[288,1073,1027],{}," by the ",[288,1076,1002],{}," to show their true balance including all earned interest.",[422,1079,1081],{"id":1080},"earning-to-non-earning-conversion-process","Earning to Non-earning Conversion Process",[270,1083,1084,1085,1087],{},"When a user calls ",[288,1086,498],{}," to convert from earning to non-earning status:",[293,1089,1090,1096,1358,1377,1390],{},[296,1091,1092,1093,1095],{},"The contract reads the user's current ",[288,1094,1027],{}," from storage.",[296,1097,1098,1099],{},"This principal is converted back to a \"present amount\" (actual token value) by multiplying:",[669,1100,1102],{"className":1101},[672],[669,1103,1105,1203],{"className":1104},[676],[669,1106,1108],{"className":1107},[680],[682,1109,1110],{"xmlns":684,"display":685},[687,1111,1112,1200],{},[690,1113,1114,1116,1118,1120,1123,1125,1127,1129,1131,1133,1135,1137,1139,1141,1143,1145,1147,1149,1151,1153,1155,1157,1159,1161,1163,1165,1167,1169,1171,1173,1176,1178,1180,1182,1184,1186,1188,1190,1192,1194,1196,1198],{},[693,1115,270],{},[693,1117,697],{},[693,1119,766],{},[693,1121,1122],{},"s",[693,1124,766],{},[693,1126,703],{},[693,1128,732],{},[693,1130,718],{},[693,1132,721],{},[693,1134,724],{},[693,1136,727],{},[693,1138,703],{},[693,1140,732],{},[734,1142,736],{},[693,1144,270],{},[693,1146,697],{},[693,1148,700],{},[693,1150,703],{},[693,1152,706],{},[693,1154,700],{},[693,1156,270],{},[693,1158,313],{},[693,1160,715],{},[693,1162,718],{},[693,1164,721],{},[693,1166,724],{},[693,1168,727],{},[693,1170,703],{},[693,1172,732],{},[734,1174,1175],{},"×",[693,1177,706],{},[693,1179,727],{},[693,1181,697],{},[693,1183,697],{},[693,1185,766],{},[693,1187,703],{},[693,1189,732],{},[693,1191,773],{},[693,1193,703],{},[693,1195,778],{},[693,1197,766],{},[693,1199,783],{},[785,1201,1202],{"encoding":787},"presentAmount = principalAmount \\times currentIndex",[669,1204,1206,1256,1315],{"className":1205,"ariaHidden":793},[792],[669,1207,1209,1213,1216,1219,1223,1226,1229,1232,1235,1238,1241,1244,1247,1250,1253],{"className":1208},[797],[669,1210],{"className":1211,"style":1212},[801],"height:0.8778em;vertical-align:-0.1944em;",[669,1214,270],{"className":1215},[806,807],[669,1217,697],{"className":1218,"style":811},[806,807],[669,1220,1222],{"className":1221},[806,807],"ese",[669,1224,703],{"className":1225},[806,807],[669,1227,732],{"className":1228},[806,807],[669,1230,718],{"className":1231},[806,807],[669,1233,721],{"className":1234},[806,807],[669,1236,724],{"className":1237},[806,807],[669,1239,727],{"className":1240},[806,807],[669,1242,703],{"className":1243},[806,807],[669,1245,732],{"className":1246},[806,807],[669,1248],{"className":1249,"style":854},[853],[669,1251,736],{"className":1252},[858],[669,1254],{"className":1255,"style":854},[853],[669,1257,1259,1262,1265,1268,1271,1274,1277,1280,1283,1286,1289,1292,1295,1298,1301,1304,1308,1312],{"className":1258},[797],[669,1260],{"className":1261,"style":802},[801],[669,1263,270],{"className":1264},[806,807],[669,1266,697],{"className":1267,"style":811},[806,807],[669,1269,815],{"className":1270},[806,807],[669,1272,706],{"className":1273},[806,807],[669,1275,700],{"className":1276},[806,807],[669,1278,270],{"className":1279},[806,807],[669,1281,313],{"className":1282},[806,807],[669,1284,715],{"className":1285,"style":831},[806,807],[669,1287,718],{"className":1288},[806,807],[669,1290,721],{"className":1291},[806,807],[669,1293,724],{"className":1294},[806,807],[669,1296,727],{"className":1297},[806,807],[669,1299,703],{"className":1300},[806,807],[669,1302,732],{"className":1303},[806,807],[669,1305],{"className":1306,"style":1307},[853],"margin-right:0.2222em;",[669,1309,1175],{"className":1310},[1311],"mbin",[669,1313],{"className":1314,"style":1307},[853],[669,1316,1318,1322,1325,1328,1331,1334,1337,1340,1343,1346,1349,1352,1355],{"className":1317},[797],[669,1319],{"className":1320,"style":1321},[801],"height:0.6944em;",[669,1323,706],{"className":1324},[806,807],[669,1326,727],{"className":1327},[806,807],[669,1329,697],{"className":1330,"style":811},[806,807],[669,1332,697],{"className":1333,"style":811},[806,807],[669,1335,766],{"className":1336},[806,807],[669,1338,703],{"className":1339},[806,807],[669,1341,732],{"className":1342},[806,807],[669,1344,773],{"className":1345,"style":929},[806,807],[669,1347,703],{"className":1348},[806,807],[669,1350,778],{"className":1351},[806,807],[669,1353,766],{"className":1354},[806,807],[669,1356,783],{"className":1357},[806,807],[296,1359,1360,1361,1364,1365,1367,1368,1370,1371,1373,1374,458],{},"The resulting ",[288,1362,1363],{},"presentAmount"," includes all interest earned up to that moment. The calculation of ",[288,1366,1363],{}," from ",[288,1369,1027],{}," is rounded ",[299,1372,1012],{}," (",[288,1375,1376],{},"_getPresentAmountRoundedDown",[296,1378,1379,1380,1382,1383,1028,1385,1032,1387,318],{},"The user's ",[288,1381,1066],{}," in storage is updated to this ",[288,1384,1363],{},[288,1386,1031],{},[288,1388,1389],{},"false",[296,1391,1037,1392],{},[329,1393,1394,1400],{},[296,1395,1396,1053,1398,318],{},[288,1397,1044],{},[288,1399,1363],{},[296,1401,1402,1404,1405,318],{},[288,1403,1052],{}," is decreased by the ",[288,1406,1027],{},[270,1408,1409],{},"After this conversion, the user's balance no longer earns interest but now includes all interest accrued up to the conversion point. Their balance will remain static until they perform another transaction or start earning again (if still approved).",[422,1411,1413],{"id":1412},"example-to-illustrate","Example to Illustrate",[270,1415,1416,1417,1419,1420,1422],{},"Consider a user with 1,000 ",[288,1418,290],{}," tokens in non-earning state, and the ",[288,1421,1002],{}," is 1.05 (representing a 5% increase since inception):",[293,1424,1425,1460,1484],{},[296,1426,1427,1428,1430,1431],{},"When they call ",[288,1429,492],{},":\n",[329,1432,1433,1446,1452],{},[296,1434,1435,1438,1439,1441,1442,1445],{},[288,1436,1437],{},"principalAmount = 1000 \u002F 1.05 ≈ 952.380952"," (actual value depends on 6 decimals for ",[288,1440,290],{}," and 12 decimals for index, then rounded down). Let's say it's ",[288,1443,1444],{},"952.380952 * 10^6"," as raw principal.",[296,1447,1448,1449,1451],{},"Their storage value for ",[288,1450,1066],{}," becomes this principal.",[296,1453,1454,1456,1457,318],{},[288,1455,1070],{}," returns ",[288,1458,1459],{},"(principalAmount * 1.05 * 10^12) \u002F 10^{12} ≈ 1000 * 10^6",[296,1461,1462,1463,1465,1466],{},"After time passes and the ",[288,1464,1002],{}," grows to 1.08:\n",[329,1467,1468,1476],{},[296,1469,1470,1471,1473,1474,318],{},"Their stored ",[288,1472,1066],{}," (principal) is still ",[288,1475,1444],{},[296,1477,1478,1480,1481,318],{},[288,1479,1070],{}," now returns ",[288,1482,1483],{},"(principalAmount * 1.08 * 10^12) \u002F 10^{12} ≈ 1028.571428 * 10^6",[296,1485,1427,1486,1430,1488],{},[288,1487,498],{},[329,1489,1490,1496,1503],{},[296,1491,1492,1495],{},[288,1493,1494],{},"presentAmount = (principalAmount * 1.08 * 10^{12}) \u002F 10^{12}"," (rounded down).",[296,1497,1448,1498,1500,1501,318],{},[288,1499,1066],{}," becomes this ",[288,1502,1363],{},[296,1504,1505,1507,1508,318],{},[288,1506,1070],{}," now returns exactly this ",[288,1509,1363],{},[417,1511,1513],{"id":1512},"transfer-mechanics","Transfer Mechanics",[270,1515,1516,1517,1519],{},"Transfers in ",[288,1518,484],{}," handle accounts with different earning statuses:",[293,1521,1522,1540],{},[296,1523,1524,1527,1528],{},[299,1525,1526],{},"In-kind Transfers",": Between two accounts with the same earning status.\n",[329,1529,1530,1537],{},[296,1531,1532,1533,1536],{},"Between two earning accounts: The transfer involves principal amounts. The amount to be transferred is converted to its principal equivalent (rounded ",[299,1534,1535],{},"up"," if sender, effectively taking slightly more principal for the given token amount) and then adjusted in the sender's and receiver's principal balances.",[296,1538,1539],{},"Between two non-earning accounts: The transfer is a standard token amount transfer.",[296,1541,1542,1545,1546],{},[299,1543,1544],{},"Out-of-kind Transfers",": Between accounts with different earning statuses.\n",[329,1547,1548,1554],{},[296,1549,1550,1551,1553],{},"From earning to non-earning: The sender's earning balance (principal) is reduced (principal equivalent rounded ",[299,1552,1535],{},"), and the receiver's non-earning balance (token amount) is increased by the specified token amount.",[296,1555,1556,1557,458],{},"From non-earning to earning: The sender's non-earning balance (token amount) is reduced, and the receiver's earning balance is increased by the principal equivalent of the token amount (rounded ",[299,1558,1012],{},[417,1560,1562],{"id":1561},"strategic-rounding","Strategic Rounding",[270,1564,1565],{},"The protocol employs consistent rounding rules that slightly favor the protocol to create a small buffer, enhancing system stability and protecting against potential exploitation. These small rounding differences accumulate as protocol reserves.",[583,1567,1568,1591],{},[586,1569,1570],{},[589,1571,1572,1576,1579,1582,1585,1588],{},[592,1573,1575],{"align":1574},"left","Operation",[592,1577,1578],{"align":1574},"From",[592,1580,1581],{"align":1574},"To",[592,1583,1584],{"align":1574},"Rounding Rule for Amount Conversion to Principal",[592,1586,1587],{"align":1574},"Protocol Favored",[592,1589,1590],{"align":1574},"Internal Function Involved (Illustrative)",[599,1592,1593,1610,1635,1656,1673,1698,1717,1738,1755,1776],{},[589,1594,1595,1600,1602,1604,1606,1608],{},[604,1596,1597],{"align":1574},[299,1598,1599],{},"Conversions",[604,1601],{"align":1574},[604,1603],{"align":1574},[604,1605],{"align":1574},[604,1607],{"align":1574},[604,1609],{"align":1574},[589,1611,1612,1615,1618,1621,1627,1630],{},[604,1613,1614],{"align":1574},"Start Earning",[604,1616,1617],{"align":1574},"Non-Earner",[604,1619,1620],{"align":1574},"Earner",[604,1622,1623,1624],{"align":1574},"Principal from present amount rounded ",[299,1625,1626],{},"DOWN",[604,1628,1629],{"align":1574},"Yes",[604,1631,1632],{"align":1574},[288,1633,1634],{},"_getPrincipalAmountRoundedDown",[589,1636,1637,1640,1642,1644,1650,1652],{},[604,1638,1639],{"align":1574},"Stop Earning",[604,1641,1620],{"align":1574},[604,1643,1617],{"align":1574},[604,1645,1646,1647,1649],{"align":1574},"Present amount from principal rounded ",[299,1648,1626],{}," (for the final balance calculation)",[604,1651,1629],{"align":1574},[604,1653,1654],{"align":1574},[288,1655,1376],{},[589,1657,1658,1663,1665,1667,1669,1671],{},[604,1659,1660],{"align":1574},[299,1661,1662],{},"Transfers",[604,1664],{"align":1574},[604,1666],{"align":1574},[604,1668],{"align":1574},[604,1670],{"align":1574},[604,1672],{"align":1574},[589,1674,1675,1678,1680,1682,1689,1692],{},[604,1676,1677],{"align":1574},"Earner to Earner",[604,1679,1620],{"align":1574},[604,1681,1620],{"align":1574},[604,1683,1684,1685,1688],{"align":1574},"Amount to principal for sender: rounded ",[299,1686,1687],{},"UP","; for receiver: (principal transferred directly)",[604,1690,1691],{"align":1574},"Sender: Yes",[604,1693,1694,1697],{"align":1574},[288,1695,1696],{},"_getPrincipalAmountRoundedUp"," (sender)",[589,1699,1700,1703,1705,1707,1711,1713],{},[604,1701,1702],{"align":1574},"Earner to Non-Earner",[604,1704,1620],{"align":1574},[604,1706,1617],{"align":1574},[604,1708,1684,1709],{"align":1574},[299,1710,1687],{},[604,1712,1629],{"align":1574},[604,1714,1715,1697],{"align":1574},[288,1716,1696],{},[589,1718,1719,1722,1724,1726,1731,1733],{},[604,1720,1721],{"align":1574},"Non-Earner to Earner",[604,1723,1617],{"align":1574},[604,1725,1620],{"align":1574},[604,1727,1728,1729],{"align":1574},"Amount to principal for receiver: rounded ",[299,1730,1626],{},[604,1732,1629],{"align":1574},[604,1734,1735,1737],{"align":1574},[288,1736,1634],{}," (receiver)",[589,1739,1740,1745,1747,1749,1751,1753],{},[604,1741,1742],{"align":1574},[299,1743,1744],{},"Mint\u002FBurn",[604,1746],{"align":1574},[604,1748],{"align":1574},[604,1750],{"align":1574},[604,1752],{"align":1574},[604,1754],{"align":1574},[589,1756,1757,1760,1763,1765,1770,1772],{},[604,1758,1759],{"align":1574},"Mint to Earner",[604,1761,1762],{"align":1574},"-",[604,1764,1620],{"align":1574},[604,1766,1767,1768],{"align":1574},"Amount to principal rounded ",[299,1769,1626],{},[604,1771,1629],{"align":1574},[604,1773,1774],{"align":1574},[288,1775,1634],{},[589,1777,1778,1781,1783,1785,1789,1791],{},[604,1779,1780],{"align":1574},"Burn from Earner",[604,1782,1620],{"align":1574},[604,1784,1762],{"align":1574},[604,1786,1767,1787],{"align":1574},[299,1788,1687],{},[604,1790,1629],{"align":1574},[604,1792,1793],{"align":1574},[288,1794,1696],{},[270,1796,1797],{},[273,1798,1799,1800,1805,1806,446,1809,446,1812,446,1815,446,1818,446,1821,1824],{},"(Note: The table simplifies complex interactions. Refer to the ",[313,1801,1802],{"href":209},[288,1803,1804],{},"MToken.sol"," contract for precise implementation details, especially ",[288,1807,1808],{},"_transferOutOfKind",[288,1810,1811],{},"_transferAmountInKind",[288,1813,1814],{},"_addEarningAmount",[288,1816,1817],{},"_subtractEarningAmount",[288,1819,1820],{},"_addNonEarningAmount",[288,1822,1823],{},"_subtractNonEarningAmount",".)",[417,1826,1828],{"id":1827},"global-index-continuous-compounding","Global Index & Continuous Compounding",[270,1830,1831,1832,1834],{},"At the heart of the ",[288,1833,290],{}," token's interest mechanism for earning balances is a global index that efficiently tracks the growth of all earning balances through continuous compound interest.",[422,1836,1838],{"id":1837},"index-mechanism","Index Mechanism",[329,1840,1841,1851,1863,1873],{},[296,1842,1843,1846,1847,1850],{},[299,1844,1845],{},"Single Global Index",": A single shared growth factor (",[288,1848,1849],{},"latestIndex",") applies to all earning balances, making the system highly gas-efficient.",[296,1852,1853,1856,1857,1859,1860,318],{},[299,1854,1855],{},"Mathematical Relationship",": For an earning account, its ",[288,1858,1070],{}," is effectively ",[288,1861,1862],{},"principalAmount * currentIndex",[296,1864,1865,1868,1869,1872],{},[299,1866,1867],{},"Starting Point",": The index starts at 1.0 (represented as ",[288,1870,1871],{},"1e12"," internally due to 12 decimal places of precision for the index) and only increases over time.",[296,1874,1875,1878,1879,1881,1882,1885,1886,1888,1889,1892],{},[299,1876,1877],{},"Index Storage",": The ",[288,1880,484],{}," contract inherits from ",[288,1883,1884],{},"ContinuousIndexing",", which stores ",[288,1887,1849],{}," (uint128) and ",[288,1890,1891],{},"latestUpdateTimestamp"," (uint40).",[422,1894,1896],{"id":1895},"mathematical-implementation","Mathematical Implementation",[270,1898,554,1899,1901],{},[288,1900,484],{}," contract implements true continuous compounding:",[329,1903,1904,1913,1923,2982,2991],{},[296,1905,1906,1909,1910,318],{},[299,1907,1908],{},"Continuous Compounding Formula",": The index is updated using the formula ",[288,1911,1912],{},"newIndex = oldIndex * e^(rate * timeElapsed \u002F SECONDS_PER_YEAR)",[296,1914,1915,1918,1919,1922],{},[299,1916,1917],{},"Interest Accumulation",": Interest compounds with every second that passes, with the ",[288,1920,1921],{},"currentIndex()"," function calculating the up-to-date index on-demand.",[296,1924,1925,1878,1928,1931,1932],{},[299,1926,1927],{},"Exponential Approximation",[288,1929,1930],{},"e^x"," function is implemented onchain using a Pade approximant R(4,4) for gas efficiency and precision:",[669,1933,1935],{"className":1934},[672],[669,1936,1938,2080],{"className":1937},[676],[669,1939,1941],{"className":1940},[680],[682,1942,1943],{"xmlns":684,"display":685},[687,1944,1945,2077],{},[690,1946,1947,1949,1952,1954,1957,1960],{},[693,1948,766],{},[734,1950,1951],{"stretchy":1389},"(",[693,1953,783],{},[734,1955,1956],{"stretchy":1389},")",[734,1958,1959],{},"≈",[738,1961,1962,2024],{},[690,1963,1964,1968,1971,1978,1980,1997,1999,2010,2012],{},[1965,1966,1967],"mn",{},"1",[734,1969,1970],{},"+",[738,1972,1973,1975],{},[693,1974,783],{},[1965,1976,1977],{},"2",[734,1979,1970],{},[738,1981,1982,1994],{},[690,1983,1984,1987],{},[1965,1985,1986],{},"3",[1988,1989,1990,1992],"msup",{},[693,1991,783],{},[1965,1993,1977],{},[1965,1995,1996],{},"28",[734,1998,1970],{},[738,2000,2001,2007],{},[1988,2002,2003,2005],{},[693,2004,783],{},[1965,2006,1986],{},[1965,2008,2009],{},"84",[734,2011,1970],{},[738,2013,2014,2021],{},[1988,2015,2016,2018],{},[693,2017,783],{},[1965,2019,2020],{},"4",[1965,2022,2023],{},"1680",[690,2025,2026,2028,2031,2037,2039,2053,2055,2065,2067],{},[1965,2027,1967],{},[734,2029,2030],{},"−",[738,2032,2033,2035],{},[693,2034,783],{},[1965,2036,1977],{},[734,2038,1970],{},[738,2040,2041,2051],{},[690,2042,2043,2045],{},[1965,2044,1986],{},[1988,2046,2047,2049],{},[693,2048,783],{},[1965,2050,1977],{},[1965,2052,1996],{},[734,2054,2030],{},[738,2056,2057,2063],{},[1988,2058,2059,2061],{},[693,2060,783],{},[1965,2062,1986],{},[1965,2064,2009],{},[734,2066,1970],{},[738,2068,2069,2075],{},[1988,2070,2071,2073],{},[693,2072,783],{},[1965,2074,2020],{},[1965,2076,2023],{},[785,2078,2079],{"encoding":787},"e(x) \\approx \\frac{1 + \\frac{x}{2} + \\frac{3x^2}{28} + \\frac{x^3}{84} + \\frac{x^4}{1680}}{1 - \\frac{x}{2} + \\frac{3x^2}{28} - \\frac{x^3}{84} + \\frac{x^4}{1680}}",[669,2081,2083,2111],{"className":2082,"ariaHidden":793},[792],[669,2084,2086,2090,2093,2096,2099,2102,2105,2108],{"className":2085},[797],[669,2087],{"className":2088,"style":2089},[801],"height:1em;vertical-align:-0.25em;",[669,2091,766],{"className":2092},[806,807],[669,2094,1951],{"className":2095},[875],[669,2097,783],{"className":2098},[806,807],[669,2100,1956],{"className":2101},[995],[669,2103],{"className":2104,"style":854},[853],[669,2106,1959],{"className":2107},[858],[669,2109],{"className":2110,"style":854},[853],[669,2112,2114,2118],{"className":2113},[797],[669,2115],{"className":2116,"style":2117},[801],"height:2.9043em;vertical-align:-1.1514em;",[669,2119,2121,2124,2979],{"className":2120},[806],[669,2122],{"className":2123},[875,876],[669,2125,2127],{"className":2126},[738],[669,2128,2130,2970],{"className":2129},[883,884],[669,2131,2133,2967],{"className":2132},[888],[669,2134,2137,2554,2563],{"className":2135,"style":2136},[892],"height:1.7529em;",[669,2138,2140,2144],{"style":2139},"top:-2.2115em;",[669,2141],{"className":2142,"style":2143},[900],"height:3.0179em;",[669,2145,2147,2150,2153,2156,2159,2235,2238,2241,2244,2348,2351,2354,2357,2451,2454,2457,2460],{"className":2146},[806],[669,2148,1967],{"className":2149},[806],[669,2151],{"className":2152,"style":1307},[853],[669,2154,2030],{"className":2155},[1311],[669,2157],{"className":2158,"style":1307},[853],[669,2160,2162,2165,2232],{"className":2161},[806],[669,2163],{"className":2164},[875,876],[669,2166,2168],{"className":2167},[738],[669,2169,2171,2223],{"className":2170},[883,884],[669,2172,2174,2220],{"className":2173},[888],[669,2175,2178,2197,2205],{"className":2176,"style":2177},[892],"height:0.6954em;",[669,2179,2181,2184],{"style":2180},"top:-2.655em;",[669,2182],{"className":2183,"style":901},[900],[669,2185,2191],{"className":2186},[2187,2188,2189,2190],"sizing","reset-size6","size3","mtight",[669,2192,2194],{"className":2193},[806,2190],[669,2195,1977],{"className":2196},[806,2190],[669,2198,2199,2202],{"style":944},[669,2200],{"className":2201,"style":901},[900],[669,2203],{"className":2204,"style":952},[951],[669,2206,2208,2211],{"style":2207},"top:-3.394em;",[669,2209],{"className":2210,"style":901},[900],[669,2212,2214],{"className":2213},[2187,2188,2189,2190],[669,2215,2217],{"className":2216},[806,2190],[669,2218,783],{"className":2219},[806,807,2190],[669,2221,982],{"className":2222},[981],[669,2224,2226],{"className":2225},[888],[669,2227,2230],{"className":2228,"style":2229},[892],"height:0.345em;",[669,2231],{},[669,2233],{"className":2234},[995,876],[669,2236],{"className":2237,"style":1307},[853],[669,2239,1970],{"className":2240},[1311],[669,2242],{"className":2243,"style":1307},[853],[669,2245,2247,2250,2345],{"className":2246},[806],[669,2248],{"className":2249},[875,876],[669,2251,2253],{"className":2252},[738],[669,2254,2256,2337],{"className":2255},[883,884],[669,2257,2259,2334],{"className":2258},[888],[669,2260,2263,2277,2285],{"className":2261,"style":2262},[892],"height:0.9164em;",[669,2264,2265,2268],{"style":2180},[669,2266],{"className":2267,"style":901},[900],[669,2269,2271],{"className":2270},[2187,2188,2189,2190],[669,2272,2274],{"className":2273},[806,2190],[669,2275,1996],{"className":2276},[806,2190],[669,2278,2279,2282],{"style":944},[669,2280],{"className":2281,"style":901},[900],[669,2283],{"className":2284,"style":952},[951],[669,2286,2287,2290],{"style":2207},[669,2288],{"className":2289,"style":901},[900],[669,2291,2293],{"className":2292},[2187,2188,2189,2190],[669,2294,2296,2299],{"className":2295},[806,2190],[669,2297,1986],{"className":2298},[806,2190],[669,2300,2302,2305],{"className":2301},[806,2190],[669,2303,783],{"className":2304},[806,807,2190],[669,2306,2309],{"className":2307},[2308],"msupsub",[669,2310,2312],{"className":2311},[883],[669,2313,2315],{"className":2314},[888],[669,2316,2319],{"className":2317,"style":2318},[892],"height:0.7463em;",[669,2320,2322,2326],{"style":2321},"top:-2.786em;margin-right:0.0714em;",[669,2323],{"className":2324,"style":2325},[900],"height:2.5em;",[669,2327,2331],{"className":2328},[2187,2329,2330,2190],"reset-size3","size1",[669,2332,1977],{"className":2333},[806,2190],[669,2335,982],{"className":2336},[981],[669,2338,2340],{"className":2339},[888],[669,2341,2343],{"className":2342,"style":2229},[892],[669,2344],{},[669,2346],{"className":2347},[995,876],[669,2349],{"className":2350,"style":1307},[853],[669,2352,2030],{"className":2353},[1311],[669,2355],{"className":2356,"style":1307},[853],[669,2358,2360,2363,2448],{"className":2359},[806],[669,2361],{"className":2362},[875,876],[669,2364,2366],{"className":2365},[738],[669,2367,2369,2440],{"className":2368},[883,884],[669,2370,2372,2437],{"className":2371},[888],[669,2373,2375,2389,2397],{"className":2374,"style":2262},[892],[669,2376,2377,2380],{"style":2180},[669,2378],{"className":2379,"style":901},[900],[669,2381,2383],{"className":2382},[2187,2188,2189,2190],[669,2384,2386],{"className":2385},[806,2190],[669,2387,2009],{"className":2388},[806,2190],[669,2390,2391,2394],{"style":944},[669,2392],{"className":2393,"style":901},[900],[669,2395],{"className":2396,"style":952},[951],[669,2398,2399,2402],{"style":2207},[669,2400],{"className":2401,"style":901},[900],[669,2403,2405],{"className":2404},[2187,2188,2189,2190],[669,2406,2408],{"className":2407},[806,2190],[669,2409,2411,2414],{"className":2410},[806,2190],[669,2412,783],{"className":2413},[806,807,2190],[669,2415,2417],{"className":2416},[2308],[669,2418,2420],{"className":2419},[883],[669,2421,2423],{"className":2422},[888],[669,2424,2426],{"className":2425,"style":2318},[892],[669,2427,2428,2431],{"style":2321},[669,2429],{"className":2430,"style":2325},[900],[669,2432,2434],{"className":2433},[2187,2329,2330,2190],[669,2435,1986],{"className":2436},[806,2190],[669,2438,982],{"className":2439},[981],[669,2441,2443],{"className":2442},[888],[669,2444,2446],{"className":2445,"style":2229},[892],[669,2447],{},[669,2449],{"className":2450},[995,876],[669,2452],{"className":2453,"style":1307},[853],[669,2455,1970],{"className":2456},[1311],[669,2458],{"className":2459,"style":1307},[853],[669,2461,2463,2466,2551],{"className":2462},[806],[669,2464],{"className":2465},[875,876],[669,2467,2469],{"className":2468},[738],[669,2470,2472,2543],{"className":2471},[883,884],[669,2473,2475,2540],{"className":2474},[888],[669,2476,2478,2492,2500],{"className":2477,"style":2262},[892],[669,2479,2480,2483],{"style":2180},[669,2481],{"className":2482,"style":901},[900],[669,2484,2486],{"className":2485},[2187,2188,2189,2190],[669,2487,2489],{"className":2488},[806,2190],[669,2490,2023],{"className":2491},[806,2190],[669,2493,2494,2497],{"style":944},[669,2495],{"className":2496,"style":901},[900],[669,2498],{"className":2499,"style":952},[951],[669,2501,2502,2505],{"style":2207},[669,2503],{"className":2504,"style":901},[900],[669,2506,2508],{"className":2507},[2187,2188,2189,2190],[669,2509,2511],{"className":2510},[806,2190],[669,2512,2514,2517],{"className":2513},[806,2190],[669,2515,783],{"className":2516},[806,807,2190],[669,2518,2520],{"className":2519},[2308],[669,2521,2523],{"className":2522},[883],[669,2524,2526],{"className":2525},[888],[669,2527,2529],{"className":2528,"style":2318},[892],[669,2530,2531,2534],{"style":2321},[669,2532],{"className":2533,"style":2325},[900],[669,2535,2537],{"className":2536},[2187,2329,2330,2190],[669,2538,2020],{"className":2539},[806,2190],[669,2541,982],{"className":2542},[981],[669,2544,2546],{"className":2545},[888],[669,2547,2549],{"className":2548,"style":2229},[892],[669,2550],{},[669,2552],{"className":2553},[995,876],[669,2555,2557,2560],{"style":2556},"top:-3.2479em;",[669,2558],{"className":2559,"style":2143},[900],[669,2561],{"className":2562,"style":952},[951],[669,2564,2566,2569],{"style":2565},"top:-3.7529em;",[669,2567],{"className":2568,"style":2143},[900],[669,2570,2572,2575,2578,2581,2584,2652,2655,2658,2661,2761,2764,2767,2770,2864,2867,2870,2873],{"className":2571},[806],[669,2573,1967],{"className":2574},[806],[669,2576],{"className":2577,"style":1307},[853],[669,2579,1970],{"className":2580},[1311],[669,2582],{"className":2583,"style":1307},[853],[669,2585,2587,2590,2649],{"className":2586},[806],[669,2588],{"className":2589},[875,876],[669,2591,2593],{"className":2592},[738],[669,2594,2596,2641],{"className":2595},[883,884],[669,2597,2599,2638],{"className":2598},[888],[669,2600,2602,2616,2624],{"className":2601,"style":2177},[892],[669,2603,2604,2607],{"style":2180},[669,2605],{"className":2606,"style":901},[900],[669,2608,2610],{"className":2609},[2187,2188,2189,2190],[669,2611,2613],{"className":2612},[806,2190],[669,2614,1977],{"className":2615},[806,2190],[669,2617,2618,2621],{"style":944},[669,2619],{"className":2620,"style":901},[900],[669,2622],{"className":2623,"style":952},[951],[669,2625,2626,2629],{"style":2207},[669,2627],{"className":2628,"style":901},[900],[669,2630,2632],{"className":2631},[2187,2188,2189,2190],[669,2633,2635],{"className":2634},[806,2190],[669,2636,783],{"className":2637},[806,807,2190],[669,2639,982],{"className":2640},[981],[669,2642,2644],{"className":2643},[888],[669,2645,2647],{"className":2646,"style":2229},[892],[669,2648],{},[669,2650],{"className":2651},[995,876],[669,2653],{"className":2654,"style":1307},[853],[669,2656,1970],{"className":2657},[1311],[669,2659],{"className":2660,"style":1307},[853],[669,2662,2664,2667,2758],{"className":2663},[806],[669,2665],{"className":2666},[875,876],[669,2668,2670],{"className":2669},[738],[669,2671,2673,2750],{"className":2672},[883,884],[669,2674,2676,2747],{"className":2675},[888],[669,2677,2680,2694,2702],{"className":2678,"style":2679},[892],"height:1.0179em;",[669,2681,2682,2685],{"style":2180},[669,2683],{"className":2684,"style":901},[900],[669,2686,2688],{"className":2687},[2187,2188,2189,2190],[669,2689,2691],{"className":2690},[806,2190],[669,2692,1996],{"className":2693},[806,2190],[669,2695,2696,2699],{"style":944},[669,2697],{"className":2698,"style":901},[900],[669,2700],{"className":2701,"style":952},[951],[669,2703,2704,2707],{"style":2207},[669,2705],{"className":2706,"style":901},[900],[669,2708,2710],{"className":2709},[2187,2188,2189,2190],[669,2711,2713,2716],{"className":2712},[806,2190],[669,2714,1986],{"className":2715},[806,2190],[669,2717,2719,2722],{"className":2718},[806,2190],[669,2720,783],{"className":2721},[806,807,2190],[669,2723,2725],{"className":2724},[2308],[669,2726,2728],{"className":2727},[883],[669,2729,2731],{"className":2730},[888],[669,2732,2735],{"className":2733,"style":2734},[892],"height:0.8913em;",[669,2736,2738,2741],{"style":2737},"top:-2.931em;margin-right:0.0714em;",[669,2739],{"className":2740,"style":2325},[900],[669,2742,2744],{"className":2743},[2187,2329,2330,2190],[669,2745,1977],{"className":2746},[806,2190],[669,2748,982],{"className":2749},[981],[669,2751,2753],{"className":2752},[888],[669,2754,2756],{"className":2755,"style":2229},[892],[669,2757],{},[669,2759],{"className":2760},[995,876],[669,2762],{"className":2763,"style":1307},[853],[669,2765,1970],{"className":2766},[1311],[669,2768],{"className":2769,"style":1307},[853],[669,2771,2773,2776,2861],{"className":2772},[806],[669,2774],{"className":2775},[875,876],[669,2777,2779],{"className":2778},[738],[669,2780,2782,2853],{"className":2781},[883,884],[669,2783,2785,2850],{"className":2784},[888],[669,2786,2788,2802,2810],{"className":2787,"style":2679},[892],[669,2789,2790,2793],{"style":2180},[669,2791],{"className":2792,"style":901},[900],[669,2794,2796],{"className":2795},[2187,2188,2189,2190],[669,2797,2799],{"className":2798},[806,2190],[669,2800,2009],{"className":2801},[806,2190],[669,2803,2804,2807],{"style":944},[669,2805],{"className":2806,"style":901},[900],[669,2808],{"className":2809,"style":952},[951],[669,2811,2812,2815],{"style":2207},[669,2813],{"className":2814,"style":901},[900],[669,2816,2818],{"className":2817},[2187,2188,2189,2190],[669,2819,2821],{"className":2820},[806,2190],[669,2822,2824,2827],{"className":2823},[806,2190],[669,2825,783],{"className":2826},[806,807,2190],[669,2828,2830],{"className":2829},[2308],[669,2831,2833],{"className":2832},[883],[669,2834,2836],{"className":2835},[888],[669,2837,2839],{"className":2838,"style":2734},[892],[669,2840,2841,2844],{"style":2737},[669,2842],{"className":2843,"style":2325},[900],[669,2845,2847],{"className":2846},[2187,2329,2330,2190],[669,2848,1986],{"className":2849},[806,2190],[669,2851,982],{"className":2852},[981],[669,2854,2856],{"className":2855},[888],[669,2857,2859],{"className":2858,"style":2229},[892],[669,2860],{},[669,2862],{"className":2863},[995,876],[669,2865],{"className":2866,"style":1307},[853],[669,2868,1970],{"className":2869},[1311],[669,2871],{"className":2872,"style":1307},[853],[669,2874,2876,2879,2964],{"className":2875},[806],[669,2877],{"className":2878},[875,876],[669,2880,2882],{"className":2881},[738],[669,2883,2885,2956],{"className":2884},[883,884],[669,2886,2888,2953],{"className":2887},[888],[669,2889,2891,2905,2913],{"className":2890,"style":2679},[892],[669,2892,2893,2896],{"style":2180},[669,2894],{"className":2895,"style":901},[900],[669,2897,2899],{"className":2898},[2187,2188,2189,2190],[669,2900,2902],{"className":2901},[806,2190],[669,2903,2023],{"className":2904},[806,2190],[669,2906,2907,2910],{"style":944},[669,2908],{"className":2909,"style":901},[900],[669,2911],{"className":2912,"style":952},[951],[669,2914,2915,2918],{"style":2207},[669,2916],{"className":2917,"style":901},[900],[669,2919,2921],{"className":2920},[2187,2188,2189,2190],[669,2922,2924],{"className":2923},[806,2190],[669,2925,2927,2930],{"className":2926},[806,2190],[669,2928,783],{"className":2929},[806,807,2190],[669,2931,2933],{"className":2932},[2308],[669,2934,2936],{"className":2935},[883],[669,2937,2939],{"className":2938},[888],[669,2940,2942],{"className":2941,"style":2734},[892],[669,2943,2944,2947],{"style":2737},[669,2945],{"className":2946,"style":2325},[900],[669,2948,2950],{"className":2949},[2187,2329,2330,2190],[669,2951,2020],{"className":2952},[806,2190],[669,2954,982],{"className":2955},[981],[669,2957,2959],{"className":2958},[888],[669,2960,2962],{"className":2961,"style":2229},[892],[669,2963],{},[669,2965],{"className":2966},[995,876],[669,2968,982],{"className":2969},[981],[669,2971,2973],{"className":2972},[888],[669,2974,2977],{"className":2975,"style":2976},[892],"height:1.1514em;",[669,2978],{},[669,2980],{"className":2981},[995,876],[296,2983,2984,2987,2988,2990],{},[299,2985,2986],{},"Rate Conversion",": Rates obtained from the ",[288,2989,1006],{}," (in basis points) are converted to a scaled format suitable for the exponential calculations.",[296,2992,2993,2996,2997,3000],{},[299,2994,2995],{},"Time Scaling",": Rates are scaled by the time elapsed (in seconds) divided by ",[288,2998,2999],{},"SECONDS_PER_YEAR"," (31,536,000).",[422,3002,3004],{"id":3003},"principal-vs-present-value","Principal vs. Present Value",[270,3006,3007],{},"The contract manages two key value concepts for earning balances:",[329,3009,3010,3019],{},[296,3011,3012,3015,3016,3018],{},[299,3013,3014],{},"Principal Amount",": The base ",[288,3017,1066],{}," (uint240, but effectively uint112 for principal part) stored for earning accounts. This is the amount that earns interest.",[296,3020,3021,3024,3025,3027,3028,3030],{},[299,3022,3023],{},"Present Amount",": The current value of an earning balance, including all accrued interest, calculated as ",[288,3026,1862],{},". This is what ",[288,3029,1070],{}," returns.",[270,3032,3033],{},"Conversion functions handle translations:",[329,3035,3036,3046,3052],{},[296,3037,3038,3041,3042,3045],{},[288,3039,3040],{},"_getPresentAmount(uint112 principalAmount_)"," or ",[288,3043,3044],{},"_getPresentAmountRoundedDown(uint112 principalAmount, uint128 index_)",": Multiplies principal by the current index.",[296,3047,3048,3051],{},[288,3049,3050],{},"_getPrincipalAmountRoundedDown(uint240 presentAmount_)",": Divides present amount by the current index, rounded down. Used when adding to earning accounts.",[296,3053,3054,3057],{},[288,3055,3056],{},"_getPrincipalAmountRoundedUp(uint240 presentAmount_)",": Divides present amount by the current index, rounded up. Used when subtracting from earning accounts.",[422,3059,3061],{"id":3060},"index-updates","Index Updates",[270,3063,3064,3065,3067,3068,3070,3071,3074],{},"The global earning index (",[288,3066,1849],{},") in ",[288,3069,484],{}," is updated by calling ",[288,3072,3073],{},"updateIndex()",". This function is typically called:",[329,3076,3077,3099],{},[296,3078,3079,3080,3082,3083,3085,3086,446,3089,446,3092,446,3095,3098],{},"By the ",[288,3081,339],{}," during its own ",[288,3084,3073],{}," calls (e.g., during ",[288,3087,3088],{},"mintM",[288,3090,3091],{},"burnM",[288,3093,3094],{},"updateCollateral",[288,3096,3097],{},"deactivateMinter","). This ensures synchronization between Minter interest payments and Earner yield accrual.",[296,3100,3101,3102,3104,3105,3107,3108],{},"Internally within ",[288,3103,484],{}," before operations that change an account's earning status or modify ",[288,3106,1052],{},", such as:\n",[329,3109,3110,3115,3120,3126,3132],{},[296,3111,3112],{},[288,3113,3114],{},"_startEarning()",[296,3116,3117],{},[288,3118,3119],{},"_stopEarning()",[296,3121,3122,3123,318],{},"Minting directly to an earning account via ",[288,3124,3125],{},"_mint()",[296,3127,3128,3129,318],{},"Burning directly from an earning account via ",[288,3130,3131],{},"_burn()",[296,3133,3134,3135,446,3137,3139],{},"Transfers that involve an earning account (",[288,3136,1808],{},[288,3138,1811],{}," for earning-to-earning).",[270,3141,3142,3143,3146],{},"Each ",[288,3144,3145],{},"MToken.updateIndex()"," call:",[293,3148,3149,3157,3162,3168],{},[296,3150,3151,3152,3154,3155,458],{},"Fetches the current earner rate from the ",[288,3153,1006],{}," (address obtained from ",[288,3156,317],{},[296,3158,3159,3160,318],{},"Calculates the time elapsed since ",[288,3161,1891],{},[296,3163,3164,3165,318],{},"Computes the new index: ",[288,3166,3167],{},"newIndex = latestIndex * e^(rate * timeElapsed \u002F SECONDS_PER_YEAR)",[296,3169,3170,3171,561,3173,3175],{},"Updates ",[288,3172,1849],{},[288,3174,1891],{}," in storage.",[422,3177,3179],{"id":3178},"precision-and-efficiency","Precision and Efficiency",[329,3181,3182,3194,3200,3206],{},[296,3183,3184,3187,3188,3190,3191,3193],{},[299,3185,3186],{},"Fixed-Point Arithmetic",": The index uses 12 decimal places of precision (scaled by ",[288,3189,1871],{},"). ",[288,3192,290],{}," balances have 6 decimals.",[296,3195,3196,3199],{},[299,3197,3198],{},"Conservative Rounding",": All rounding strategies are designed to favor protocol safety, with small residuals contributing to protocol reserves.",[296,3201,3202,3205],{},[299,3203,3204],{},"Gas Optimization",": The single global index is updated only when necessary and is shared across all earning accounts.",[296,3207,3208,3211,3212,3215],{},[299,3209,3210],{},"Overflow Protection",": The index is capped at ",[288,3213,3214],{},"type(uint128).max",". Principal amounts are also managed to prevent overflow in calculations.",[266,3217,3219],{"id":3218},"security-and-governance-interactions","Security and Governance Interactions",[270,3221,3222,3223,3225],{},"The security and behavior of the ",[288,3224,290],{}," token are deeply intertwined with the M0 Protocol's governance and other core contracts.",[417,3227,3229],{"id":3228},"supply-control","Supply Control",[329,3231,3232,3241,3253],{},[296,3233,3234,3235,3237,3238,3240],{},"The total supply of ",[288,3236,290],{}," is exclusively controlled by the ",[288,3239,339],{}," contract.",[296,3242,3243,3246,3247,3250,3251,318],{},[288,3244,3245],{},"MToken.mint(address recipient, uint240 amount)"," can only be called by the ",[288,3248,3249],{},"minterGateway"," address set in ",[288,3252,484],{},[296,3254,3255,3246,3258,3260,3261,3263,3264,318],{},[288,3256,3257],{},"MToken.burn(address account, uint240 amount)",[288,3259,3249],{}," address.\nThis ensures that ",[288,3262,290],{}," tokens are only created or destroyed as per the protocol's minting (collateral-backed) and burning (debt-repayment) rules managed by ",[288,3265,339],{},[417,3267,3269],{"id":3268},"earning-mechanism-governance","Earning Mechanism Governance",[329,3271,3272,3328],{},[296,3273,3274,3277,3278,3280,3281,3283,3284,3286,3287,3289,3290,3293,3294],{},[299,3275,3276],{},"Earner Approval",": Whether an account can switch to an earning balance (",[288,3279,492],{},") is determined by M0 Governance. The ",[288,3282,484],{}," contract checks if an account is an approved earner by querying the ",[288,3285,317],{}," (specifically, the ",[288,3288,414],{}," list or if ",[288,3291,3292],{},"EARNERS_LIST_IGNORED"," is true).",[3295,3296,3301],"pre",{"className":3297,"code":3298,"language":3299,"meta":3300,"style":3300},"language-solidity shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u002F\u002F Simplified check from _isApprovedEarner(address account_)\n    function _isApprovedEarner(address account_) internal view returns (bool) {\n        return ttgRegistrarReader.getBool(\"earners_list_ignored\") || ttgRegistrarReader.listContains(\"earners\", account_);\n    }\n","solidity","",[288,3302,3303,3310,3316,3322],{"__ignoreMap":3300},[669,3304,3307],{"class":3305,"line":3306},"line",1,[669,3308,3309],{},"\u002F\u002F Simplified check from _isApprovedEarner(address account_)\n",[669,3311,3313],{"class":3305,"line":3312},2,[669,3314,3315],{},"    function _isApprovedEarner(address account_) internal view returns (bool) {\n",[669,3317,3319],{"class":3305,"line":3318},3,[669,3320,3321],{},"        return ttgRegistrarReader.getBool(\"earners_list_ignored\") || ttgRegistrarReader.listContains(\"earners\", account_);\n",[669,3323,3325],{"class":3305,"line":3324},4,[669,3326,3327],{},"    }\n",[296,3329,3330,3333,3334,3336,3337,3339,3340,3342,3343,318],{},[299,3331,3332],{},"Rate Model Control",": The interest rate for earners is determined by the ",[288,3335,1006],{},". The address of this model is a governance-controlled parameter stored in the ",[288,3338,317],{}," and read by ",[288,3341,484],{}," during ",[288,3344,3073],{},[417,3346,3348],{"id":3347},"safety-controls-for-earners","Safety Controls for Earners",[329,3350,3351],{},[296,3352,554,3353,3355,3356,3358,3359,3362,3363,3365,3366],{},[288,3354,504],{}," function allows anyone to call it for an ",[288,3357,508],{}," that is ",[273,3360,3361],{},"no longer"," on the ",[288,3364,414],{}," list. This is a crucial safety mechanism to prevent an account from continuing to accrue yield if its earner status is revoked by governance.",[3295,3367,3369],{"className":3297,"code":3368,"language":3299,"meta":3300,"style":3300},"function stopEarning(address account_) external {\n    if (_isApprovedEarner(account_)) revert IsApprovedEarner(); \u002F\u002F Can only be called if account is NOT an approved earner\n    _stopEarning(account_);\n}\n",[288,3370,3371,3376,3381,3386],{"__ignoreMap":3300},[669,3372,3373],{"class":3305,"line":3306},[669,3374,3375],{},"function stopEarning(address account_) external {\n",[669,3377,3378],{"class":3305,"line":3312},[669,3379,3380],{},"    if (_isApprovedEarner(account_)) revert IsApprovedEarner(); \u002F\u002F Can only be called if account is NOT an approved earner\n",[669,3382,3383],{"class":3305,"line":3318},[669,3384,3385],{},"    _stopEarning(account_);\n",[669,3387,3388],{"class":3305,"line":3324},[669,3389,3390],{},"}\n",[417,3392,3394],{"id":3393},"index-management-and-synchronization","Index Management and Synchronization",[329,3396,3397],{},[296,3398,554,3399,3401,3402,3404,3405,3407],{},[288,3400,3145],{}," function is critical for reflecting the correct yield. As mentioned, it's called by ",[288,3403,339],{}," to ensure synchronization with Minter-side interest accruals and by ",[288,3406,484],{}," itself during critical state changes. This synchronization is vital for the protocol's economic balance.",[417,3409,3411],{"id":3410},"rounding-and-numerical-stability","Rounding and Numerical Stability",[329,3413,3414,3422],{},[296,3415,3416,3417,3419,3420,458],{},"The consistent use of protocol-favoring rounding rules in conversions and transfers contributes to the robustness of the ",[288,3418,290],{}," token system. These small, accumulated amounts act as a buffer and eventually contribute to protocol reserves (e.g., claimable by the ",[288,3421,368],{},[296,3423,3424,3425,561,3428,3431],{},"Explicit overflow checks and the use of libraries like ",[288,3426,3427],{},"UIntMath",[288,3429,3430],{},"ContinuousIndexingMath"," ensure numerical precision and prevent errors during balance and index calculations.",[417,3433,3435],{"id":3434},"immutability","Immutability",[270,3437,554,3438,3440,3441,3443],{},[288,3439,484],{}," contract itself is designed to be immutable, meaning its core logic cannot be upgraded directly. Changes to its behavior (like interest rates or earner eligibility) are managed externally through governance-controlled parameters in the ",[288,3442,317],{}," and updatable Rate Model contracts.",[3445,3446,3447],"style",{},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":3300,"searchDepth":3306,"depth":3312,"links":3449},[3450,3451,3454,3462],{"id":268,"depth":3312,"text":166},{"id":372,"depth":3312,"text":373,"children":3452},[3453],{"id":419,"depth":3318,"text":420},{"id":566,"depth":3312,"text":567,"children":3455},[3456,3457,3459,3460,3461],{"id":570,"depth":3318,"text":571},{"id":628,"depth":3318,"text":3458},"Balance Conversions in $M token",{"id":1512,"depth":3318,"text":1513},{"id":1561,"depth":3318,"text":1562},{"id":1827,"depth":3318,"text":1828},{"id":3218,"depth":3312,"text":3219,"children":3463},[3464,3465,3466,3467,3468,3469],{"id":3228,"depth":3318,"text":3229},{"id":3268,"depth":3318,"text":3269},{"id":3347,"depth":3318,"text":3348},{"id":3393,"depth":3318,"text":3394},{"id":3410,"depth":3318,"text":3411},{"id":3434,"depth":3318,"text":3435},"Complete technical documentation for the M token, the immutable ERC20-compliant token at the heart of the M0 Ecosystem.","md",null,{},true,{"title":208,"description":3470},"8oi3E5rHRL6yMnj1e7-JmLJxUjprzZFxQ6RXCtFp3bU",[3478,3480],{"title":204,"path":205,"stem":206,"description":3479,"children":-1},"Documentation of M0's cross-chain architecture, including the M Portal (Wormhole) and M Portal Lite (Hyperlane) implementations for bridging M across blockchains.",{"title":212,"path":213,"stem":214,"description":3481,"children":-1},"Low-level technical specification for the M token - function signatures, events, errors, and storage layout.",1780387918768]