[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"navigation":3,"\u002Fprotocol\u002Frate-models":260,"\u002Fprotocol\u002Frate-models-surround":1597},[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":224,"body":262,"description":1591,"extension":1592,"links":1593,"meta":1594,"navigation":1394,"path":225,"seo":1595,"stem":226,"__hash__":1596},"docs\u002Fprotocol\u002Frate-models.md",{"type":263,"value":264,"toc":1577},"minimark",[265,270,278,310,313,320,325,329,332,382,387,393,584,612,623,627,630,894,1206,1266,1269,1295,1300,1303,1343,1347,1350,1405,1408,1412,1415,1433,1437,1440,1447,1453,1457,1460,1485,1489,1492,1515,1519,1522,1542,1546,1549,1563,1567,1573],[266,267,269],"h2",{"id":268},"the-interest-mechanism","The Interest Mechanism",[271,272,273,277],"p",{},[274,275,276],"code",{},"$M"," token operates within a balanced interest system in the M0 Protocol:",[279,280,281,292,298,304],"ol",{},[282,283,284,288,289,291],"li",{},[285,286,287],"strong",{},"Minter Interest Accrual",": Minters accrue obligations at the minter rate on their outstanding ",[274,290,276],{}," balances.",[282,293,294,297],{},[285,295,296],{},"Earner Interest Accrual",": Simultaneously, approved earning accounts accrue additional tokens at the earner rate.",[282,299,300,303],{},[285,301,302],{},"Rate Synchronization",": The EarnerRateModel ensures the earner rate is calibrated so total earnings never exceed\ntotal minter obligations (see Rate Model section below for further details).",[282,305,306,309],{},[285,307,308],{},"Continuous Mechanism",": Both sides update through independent but synchronized continuous indexing systems.",[271,311,312],{},"This creates a mathematically balanced system where earner yields are safely constrained by the protocol's income from\nminters.",[271,314,315],{},[316,317],"img",{"alt":318,"src":319},"Virtual Flow","\u002Fimages\u002Ftechnical-documentations\u002Fm\u002Fvirtual-flow.png",[271,321,322,324],{},[274,323,276],{}," token implements sophisticated interest rate models that ensure financial soundness while distributing yield between\nminters, earners, and the protocol.",[266,326,328],{"id":327},"rate-model-architecture","Rate Model Architecture",[271,330,331],{},"The protocol uses two primary rate models:",[279,333,334,359],{},[282,335,336,339,340,342,343],{},[285,337,338],{},"MinterRateModel",": Determines the interest rate minters pay on borrowed ",[274,341,276],{}," token\n",[344,345,346,349,352],"ul",{},[282,347,348],{},"Simple model that reads rates directly from the TTG Registrar",[282,350,351],{},"Capped at 400% APR (40,000 basis points) for system safety",[282,353,354,355,358],{},"Governance-controlled through the ",[274,356,357],{},"base_minter_rate"," parameter",[282,360,361,364,365,367,368],{},[285,362,363],{},"EarnerRateModel",": Calculates the interest rate paid to ",[274,366,276],{}," token holders who opt in to earning\n",[344,369,370,373,376],{},[282,371,372],{},"Uses a mathematical formula that ensures financial soundness",[282,374,375],{},"Rates are capped at 98% of the calculated safe rate",[282,377,378,379,358],{},"Governed through the ",[274,380,381],{},"max_earner_rate",[383,384,386],"h3",{"id":385},"minter-rate-calculation","Minter Rate Calculation",[271,388,389,390,392],{},"The ",[274,391,338],{}," has a straightforward implementation:",[394,395,398],"span",{"className":396},[397],"katex-display",[394,399,402,479],{"className":400},[401],"katex",[394,403,406],{"className":404},[405],"katex-mathml",[407,408,411],"math",{"xmlns":409,"display":410},"http:\u002F\u002Fwww.w3.org\u002F1998\u002FMath\u002FMathML","block",[412,413,414,474],"semantics",{},[415,416,417,421,424,427,430,433,436,439,442,444,446,450,452,454,456,460,464,468,471],"mrow",{},[418,419,420],"mi",{},"m",[418,422,423],{},"i",[418,425,426],{},"n",[418,428,429],{},"t",[418,431,432],{},"e",[418,434,435],{},"r",[418,437,438],{},"R",[418,440,441],{},"a",[418,443,429],{},[418,445,432],{},[447,448,449],"mo",{},"=",[418,451,420],{},[418,453,423],{},[418,455,426],{},[447,457,459],{"stretchy":458},"false","(",[461,462,463],"mtext",{}," TTGRegistrar(BASE-MINTER-RATE)",[447,465,467],{"separator":466},"true",",",[461,469,470],{},"MAX-MINTER-RATE",[447,472,473],{"stretchy":458},")",[475,476,478],"annotation",{"encoding":477},"application\u002Fx-tex","minterRate = min(\\text{ TTGRegistrar({\\text{BASE-MINTER-RATE}})}, \\text{MAX-MINTER-RATE})",[394,480,483,531],{"className":481,"ariaHidden":466},[482],"katex-html",[394,484,487,492,498,501,506,510,513,516,519,524,528],{"className":485},[486],"base",[394,488],{"className":489,"style":491},[490],"strut","height:0.6833em;",[394,493,497],{"className":494},[495,496],"mord","mathnormal","min",[394,499,429],{"className":500},[495,496],[394,502,505],{"className":503,"style":504},[495,496],"margin-right:0.0278em;","er",[394,507,438],{"className":508,"style":509},[495,496],"margin-right:0.0077em;",[394,511,441],{"className":512},[495,496],[394,514,429],{"className":515},[495,496],[394,517,432],{"className":518},[495,496],[394,520],{"className":521,"style":523},[522],"mspace","margin-right:0.2778em;",[394,525,449],{"className":526},[527],"mrel",[394,529],{"className":530,"style":523},[522],[394,532,534,538,541,545,566,570,574,580],{"className":533},[486],[394,535],{"className":536,"style":537},[490],"height:1em;vertical-align:-0.25em;",[394,539,497],{"className":540},[495,496],[394,542,459],{"className":543},[544],"mopen",[394,546,549,553,563],{"className":547},[495,548],"text",[394,550,552],{"className":551},[495]," TTGRegistrar(",[394,554,556],{"className":555},[495],[394,557,559],{"className":558},[495,548],[394,560,562],{"className":561},[495],"BASE-MINTER-RATE",[394,564,473],{"className":565},[495],[394,567,467],{"className":568},[569],"mpunct",[394,571],{"className":572,"style":573},[522],"margin-right:0.1667em;",[394,575,577],{"className":576},[495,548],[394,578,470],{"className":579},[495],[394,581,473],{"className":582},[583],"mclose",[585,586,591],"pre",{"className":587,"code":588,"language":589,"meta":590,"style":590},"language-solidity shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","function rate() external view returns (uint256) {\n    return min(TTGRegistrar.get(\"base_minter_rate\"), MAX_MINTER_RATE);\n}\n","solidity","",[274,592,593,600,606],{"__ignoreMap":590},[394,594,597],{"class":595,"line":596},"line",1,[394,598,599],{},"function rate() external view returns (uint256) {\n",[394,601,603],{"class":595,"line":602},2,[394,604,605],{},"    return min(TTGRegistrar.get(\"base_minter_rate\"), MAX_MINTER_RATE);\n",[394,607,609],{"class":595,"line":608},3,[394,610,611],{},"}\n",[344,613,614,617,620],{},[282,615,616],{},"The rate is governance-controlled through the TTG Registrar",[282,618,619],{},"Has a hard cap of 400% APR to prevent system abuse",[282,621,622],{},"Changes to this rate affect all minters uniformly",[383,624,626],{"id":625},"earner-rate-calculation","Earner Rate Calculation",[271,628,629],{},"The EarnerRateModel employs a more complex approach to ensure system solvency:",[394,631,633],{"className":632},[397],[394,634,636,745],{"className":635},[401],[394,637,639],{"className":638},[405],[407,640,641],{"xmlns":409,"display":410},[412,642,643,742],{},[415,644,645,647,649,651,653,655,657,659,661,663,665,667,669,671,673,675,677,679,682,684,686,688,690,692,695,697,699,702,704,706,708,710,713,715,718,720,722,724,726,728,730,732,734,736,738,740],{},[418,646,432],{},[418,648,441],{},[418,650,435],{},[418,652,426],{},[418,654,432],{},[418,656,435],{},[418,658,438],{},[418,660,441],{},[418,662,429],{},[418,664,432],{},[447,666,449],{},[418,668,420],{},[418,670,423],{},[418,672,426],{},[447,674,459],{"stretchy":458},[418,676,420],{},[418,678,441],{},[418,680,681],{},"x",[418,683,438],{},[418,685,441],{},[418,687,429],{},[418,689,432],{},[447,691,467],{"separator":466},[418,693,694],{},"g",[418,696,432],{},[418,698,429],{},[418,700,701],{},"E",[418,703,681],{},[418,705,429],{},[418,707,435],{},[418,709,441],{},[418,711,712],{},"S",[418,714,441],{},[418,716,717],{},"f",[418,719,432],{},[418,721,701],{},[418,723,441],{},[418,725,435],{},[418,727,426],{},[418,729,432],{},[418,731,435],{},[418,733,438],{},[418,735,441],{},[418,737,429],{},[418,739,432],{},[447,741,473],{"stretchy":458},[475,743,744],{"encoding":477},"earnerRate = min(maxRate,getExtraSafeEarnerRate)",[394,746,748,790],{"className":747,"ariaHidden":466},[482],[394,749,751,754,757,760,763,766,769,772,775,778,781,784,787],{"className":750},[486],[394,752],{"className":753,"style":491},[490],[394,755,432],{"className":756},[495,496],[394,758,441],{"className":759},[495,496],[394,761,435],{"className":762,"style":504},[495,496],[394,764,426],{"className":765},[495,496],[394,767,505],{"className":768,"style":504},[495,496],[394,770,438],{"className":771,"style":509},[495,496],[394,773,441],{"className":774},[495,496],[394,776,429],{"className":777},[495,496],[394,779,432],{"className":780},[495,496],[394,782],{"className":783,"style":523},[522],[394,785,449],{"className":786},[527],[394,788],{"className":789,"style":523},[522],[394,791,793,796,799,802,806,809,812,815,818,821,824,827,831,834,839,842,845,848,851,854,857,861,864,867,870,873,876,879,882,885,888,891],{"className":792},[486],[394,794],{"className":795,"style":537},[490],[394,797,497],{"className":798},[495,496],[394,800,459],{"className":801},[544],[394,803,805],{"className":804},[495,496],"ma",[394,807,681],{"className":808},[495,496],[394,810,438],{"className":811,"style":509},[495,496],[394,813,441],{"className":814},[495,496],[394,816,429],{"className":817},[495,496],[394,819,432],{"className":820},[495,496],[394,822,467],{"className":823},[569],[394,825],{"className":826,"style":573},[522],[394,828,694],{"className":829,"style":830},[495,496],"margin-right:0.0359em;",[394,832,432],{"className":833},[495,496],[394,835,838],{"className":836,"style":837},[495,496],"margin-right:0.0576em;","tE",[394,840,681],{"className":841},[495,496],[394,843,429],{"className":844},[495,496],[394,846,435],{"className":847,"style":504},[495,496],[394,849,441],{"className":850},[495,496],[394,852,712],{"className":853,"style":837},[495,496],[394,855,441],{"className":856},[495,496],[394,858,717],{"className":859,"style":860},[495,496],"margin-right:0.1076em;",[394,862,432],{"className":863},[495,496],[394,865,701],{"className":866,"style":837},[495,496],[394,868,441],{"className":869},[495,496],[394,871,435],{"className":872,"style":504},[495,496],[394,874,426],{"className":875},[495,496],[394,877,505],{"className":878,"style":504},[495,496],[394,880,438],{"className":881,"style":509},[495,496],[394,883,441],{"className":884},[495,496],[394,886,429],{"className":887},[495,496],[394,889,432],{"className":890},[495,496],[394,892,473],{"className":893},[583],[394,895,897],{"className":896},[397],[394,898,900,1023],{"className":899},[401],[394,901,903],{"className":902},[405],[407,904,905],{"xmlns":409,"display":410},[412,906,907,1020],{},[415,908,909,911,913,915,917,919,921,923,925,927,929,931,933,935,937,939,941,943,945,947,949,951,953,955,958,960,962,964,966,968,970,972,974,976,978,980,982,984,987],{},[418,910,694],{},[418,912,432],{},[418,914,429],{},[418,916,701],{},[418,918,681],{},[418,920,429],{},[418,922,435],{},[418,924,441],{},[418,926,712],{},[418,928,441],{},[418,930,717],{},[418,932,432],{},[418,934,701],{},[418,936,441],{},[418,938,435],{},[418,940,426],{},[418,942,432],{},[418,944,435],{},[418,946,438],{},[418,948,441],{},[418,950,429],{},[418,952,432],{},[447,954,449],{},[418,956,957],{},"s",[418,959,441],{},[418,961,717],{},[418,963,432],{},[418,965,701],{},[418,967,441],{},[418,969,435],{},[418,971,426],{},[418,973,432],{},[418,975,435],{},[418,977,438],{},[418,979,441],{},[418,981,429],{},[418,983,432],{},[447,985,986],{},"×",[415,988,989,991,993,995,997,1000,1003,1006,1008,1010,1012,1014,1016,1018],{},[418,990,438],{},[418,992,441],{},[418,994,429],{},[418,996,432],{},[418,998,999],{},"M",[418,1001,1002],{},"u",[418,1004,1005],{},"l",[418,1007,429],{},[418,1009,423],{},[418,1011,271],{},[418,1013,1005],{},[418,1015,423],{},[418,1017,432],{},[418,1019,435],{},[475,1021,1022],{"encoding":477},"getExtraSafeEarnerRate = safeEarnerRate\\times {RateMultiplier}",[394,1024,1026,1102,1158],{"className":1025,"ariaHidden":466},[482],[394,1027,1029,1033,1036,1039,1042,1045,1048,1051,1054,1057,1060,1063,1066,1069,1072,1075,1078,1081,1084,1087,1090,1093,1096,1099],{"className":1028},[486],[394,1030],{"className":1031,"style":1032},[490],"height:0.8889em;vertical-align:-0.1944em;",[394,1034,694],{"className":1035,"style":830},[495,496],[394,1037,432],{"className":1038},[495,496],[394,1040,838],{"className":1041,"style":837},[495,496],[394,1043,681],{"className":1044},[495,496],[394,1046,429],{"className":1047},[495,496],[394,1049,435],{"className":1050,"style":504},[495,496],[394,1052,441],{"className":1053},[495,496],[394,1055,712],{"className":1056,"style":837},[495,496],[394,1058,441],{"className":1059},[495,496],[394,1061,717],{"className":1062,"style":860},[495,496],[394,1064,432],{"className":1065},[495,496],[394,1067,701],{"className":1068,"style":837},[495,496],[394,1070,441],{"className":1071},[495,496],[394,1073,435],{"className":1074,"style":504},[495,496],[394,1076,426],{"className":1077},[495,496],[394,1079,505],{"className":1080,"style":504},[495,496],[394,1082,438],{"className":1083,"style":509},[495,496],[394,1085,441],{"className":1086},[495,496],[394,1088,429],{"className":1089},[495,496],[394,1091,432],{"className":1092},[495,496],[394,1094],{"className":1095,"style":523},[522],[394,1097,449],{"className":1098},[527],[394,1100],{"className":1101,"style":523},[522],[394,1103,1105,1108,1111,1114,1117,1120,1123,1126,1129,1132,1135,1138,1141,1144,1147,1151,1155],{"className":1104},[486],[394,1106],{"className":1107,"style":1032},[490],[394,1109,957],{"className":1110},[495,496],[394,1112,441],{"className":1113},[495,496],[394,1115,717],{"className":1116,"style":860},[495,496],[394,1118,432],{"className":1119},[495,496],[394,1121,701],{"className":1122,"style":837},[495,496],[394,1124,441],{"className":1125},[495,496],[394,1127,435],{"className":1128,"style":504},[495,496],[394,1130,426],{"className":1131},[495,496],[394,1133,505],{"className":1134,"style":504},[495,496],[394,1136,438],{"className":1137,"style":509},[495,496],[394,1139,441],{"className":1140},[495,496],[394,1142,429],{"className":1143},[495,496],[394,1145,432],{"className":1146},[495,496],[394,1148],{"className":1149,"style":1150},[522],"margin-right:0.2222em;",[394,1152,986],{"className":1153},[1154],"mbin",[394,1156],{"className":1157,"style":1150},[522],[394,1159,1161,1164],{"className":1160},[486],[394,1162],{"className":1163,"style":1032},[490],[394,1165,1167,1170,1173,1176,1179,1183,1186,1190,1193,1196,1200,1203],{"className":1166},[495],[394,1168,438],{"className":1169,"style":509},[495,496],[394,1171,441],{"className":1172},[495,496],[394,1174,429],{"className":1175},[495,496],[394,1177,432],{"className":1178},[495,496],[394,1180,999],{"className":1181,"style":1182},[495,496],"margin-right:0.109em;",[394,1184,1002],{"className":1185},[495,496],[394,1187,1005],{"className":1188,"style":1189},[495,496],"margin-right:0.0197em;",[394,1191,429],{"className":1192},[495,496],[394,1194,423],{"className":1195},[495,496],[394,1197,1199],{"className":1198,"style":1189},[495,496],"pl",[394,1201,423],{"className":1202},[495,496],[394,1204,505],{"className":1205,"style":504},[495,496],[585,1207,1209],{"className":587,"code":1208,"language":589,"meta":590,"style":590},"function rate() external view returns (uint256) {\n    return min(\n        maxRate(),\n        getExtraSafeEarnerRate(\n            totalActiveOwedM,\n            totalEarningSupply,\n            minterRate\n        )\n    );\n}\n",[274,1210,1211,1215,1220,1225,1231,1237,1243,1249,1255,1261],{"__ignoreMap":590},[394,1212,1213],{"class":595,"line":596},[394,1214,599],{},[394,1216,1217],{"class":595,"line":602},[394,1218,1219],{},"    return min(\n",[394,1221,1222],{"class":595,"line":608},[394,1223,1224],{},"        maxRate(),\n",[394,1226,1228],{"class":595,"line":1227},4,[394,1229,1230],{},"        getExtraSafeEarnerRate(\n",[394,1232,1234],{"class":595,"line":1233},5,[394,1235,1236],{},"            totalActiveOwedM,\n",[394,1238,1240],{"class":595,"line":1239},6,[394,1241,1242],{},"            totalEarningSupply,\n",[394,1244,1246],{"class":595,"line":1245},7,[394,1247,1248],{},"            minterRate\n",[394,1250,1252],{"class":595,"line":1251},8,[394,1253,1254],{},"        )\n",[394,1256,1258],{"class":595,"line":1257},9,[394,1259,1260],{},"    );\n",[394,1262,1264],{"class":595,"line":1263},10,[394,1265,611],{},[271,1267,1268],{},"Where:",[344,1270,1271,1277,1283,1289],{},[282,1272,1273,1276],{},[274,1274,1275],{},"getExtraSafeEarnerRate"," applies the rate multiplier to the safe earner rate",[282,1278,1279,1282],{},[274,1280,1281],{},"RATE_MULTIPLIER"," is 9,800 (98% in basis points)",[282,1284,1285,1288],{},[274,1286,1287],{},"ONE"," is 10,000 (100% in basis points)",[282,1290,1291,1294],{},[274,1292,1293],{},"maxRate()"," returns the governance-set maximum earner rate",[1296,1297,1299],"h4",{"id":1298},"safe-rate-derivation","Safe Rate Derivation",[271,1301,1302],{},"The safe earner rate is calculated using two different approaches based on the relationship between total active owed $M\nand total earning supply:",[279,1304,1305,1324],{},[282,1306,1307,1310,1311],{},[285,1308,1309],{},"When totalActiveOwedM ≤ totalEarningSupply",":\n",[344,1312,1313,1316,1321],{},[282,1314,1315],{},"Uses an instantaneous cashflow approach",[282,1317,1318],{},[274,1319,1320],{},"safeRate = totalActiveOwedM * minterRate \u002F totalEarningSupply",[282,1322,1323],{},"Ensures interest paid to earners never exceeds interest collected from minters",[282,1325,1326,1310,1329],{},[285,1327,1328],{},"When totalActiveOwedM > totalEarningSupply",[344,1330,1331,1334,1337,1340],{},[282,1332,1333],{},"Uses a time-integrated approach over a 30-day confidence interval",[282,1335,1336],{},"Accounts for compound interest effects",[282,1338,1339],{},"Applies complex mathematical formula to ensure long-term solvency",[282,1341,1342],{},"Allows earner rate to temporarily exceed minter rate while maintaining system safety",[1296,1344,1346],{"id":1345},"extra-safety-factor","Extra Safety Factor",[271,1348,1349],{},"The EarnerRateModel applies an additional safety factor to the calculated safe rate:",[585,1351,1353],{"className":587,"code":1352,"language":589,"meta":590,"style":590},"function getExtraSafeEarnerRate(\n    uint240 totalActiveOwedM_,\n    uint240 totalEarningSupply_,\n    uint32 minterRate_\n) public pure returns (uint32) {\n    uint256 safeEarnerRate_ = getSafeEarnerRate(totalActiveOwedM_, totalEarningSupply_, minterRate_);\n    uint256 extraSafeEarnerRate_ = (safeEarnerRate_ * RATE_MULTIPLIER) \u002F ONE;\n\n    return (extraSafeEarnerRate_ > type(uint32).max) ? type(uint32).max : uint32(extraSafeEarnerRate_);\n}\n",[274,1354,1355,1360,1365,1370,1375,1380,1385,1390,1396,1401],{"__ignoreMap":590},[394,1356,1357],{"class":595,"line":596},[394,1358,1359],{},"function getExtraSafeEarnerRate(\n",[394,1361,1362],{"class":595,"line":602},[394,1363,1364],{},"    uint240 totalActiveOwedM_,\n",[394,1366,1367],{"class":595,"line":608},[394,1368,1369],{},"    uint240 totalEarningSupply_,\n",[394,1371,1372],{"class":595,"line":1227},[394,1373,1374],{},"    uint32 minterRate_\n",[394,1376,1377],{"class":595,"line":1233},[394,1378,1379],{},") public pure returns (uint32) {\n",[394,1381,1382],{"class":595,"line":1239},[394,1383,1384],{},"    uint256 safeEarnerRate_ = getSafeEarnerRate(totalActiveOwedM_, totalEarningSupply_, minterRate_);\n",[394,1386,1387],{"class":595,"line":1245},[394,1388,1389],{},"    uint256 extraSafeEarnerRate_ = (safeEarnerRate_ * RATE_MULTIPLIER) \u002F ONE;\n",[394,1391,1392],{"class":595,"line":1251},[394,1393,1395],{"emptyLinePlaceholder":1394},true,"\n",[394,1397,1398],{"class":595,"line":1257},[394,1399,1400],{},"    return (extraSafeEarnerRate_ > type(uint32).max) ? type(uint32).max : uint32(extraSafeEarnerRate_);\n",[394,1402,1403],{"class":595,"line":1263},[394,1404,611],{},[271,1406,1407],{},"This ensures that earners receive 98% of the theoretically safe rate, creating an additional buffer for protocol safety.",[266,1409,1411],{"id":1410},"confidence-interval-approach","Confidence Interval Approach",[271,1413,1414],{},"The EarnerRateModel uses a 30-day confidence interval to determine safe rates:",[344,1416,1417,1420,1423,1426],{},[282,1418,1419],{},"Calculates the amount of interest minters will generate over 30 days",[282,1421,1422],{},"Derives maximum earner rate that ensures total interest paid doesn't exceed this amount",[282,1424,1425],{},"Accounts for the compounding effects of continuous interest",[282,1427,1428,1429,1432],{},"Assumes the ",[274,1430,1431],{},"updateIndex()"," function will be called at least once every 30 days",[266,1434,1436],{"id":1435},"balance-between-minters-and-earners","Balance Between Minters and Earners",[271,1438,1439],{},"The system maintains a mathematical relationship between interest flows:",[585,1441,1445],{"className":1442,"code":1444,"language":548},[1443],"language-text","totalInterestFromMinters = totalActiveOwedM * (e^(minterRate*dt) - 1)\ntotalInterestToEarners = totalEarningSupply * (e^(earnerRate*dt) - 1)\n",[274,1446,1444],{"__ignoreMap":590},[271,1448,1449,1450],{},"The rate models ensure: ",[274,1451,1452],{},"totalInterestToEarners ≤ 98% of totalInterestFromMinters",[266,1454,1456],{"id":1455},"edge-cases-handling","Edge Cases Handling",[271,1458,1459],{},"The EarnerRateModel handles several edge cases with special logic:",[344,1461,1462,1473,1482],{},[282,1463,1464,1465,1468,1469,1472],{},"When ",[274,1466,1467],{},"totalActiveOwedM = 0"," or ",[274,1470,1471],{},"minterRate = 0",": The earner rate is set to 0",[282,1474,1464,1475,1478,1479,473],{},[274,1476,1477],{},"totalEarningSupply = 0",": The earner rate is set to the maximum possible value (",[274,1480,1481],{},"type(uint32).max",[282,1483,1484],{},"When calculations might overflow: The implementation includes safeguards against numerical issues",[266,1486,1488],{"id":1487},"yield-distribution","Yield Distribution",[271,1490,1491],{},"The system distributes yield in the following manner:",[279,1493,1494,1500,1506,1512],{},[282,1495,1496,1499],{},[285,1497,1498],{},"Minters pay interest"," based on their outstanding debt at the minter rate",[282,1501,1502,1505],{},[285,1503,1504],{},"Earners receive up to 98%"," of the available interest (subject to constraints)",[282,1507,1508,1511],{},[285,1509,1510],{},"Excess yield"," (at least 2% plus any additional buffer) goes to the TTG Vault",[282,1513,1514],{},"The TTG Vault funds protocol operations and can distribute to governance token holders",[266,1516,1518],{"id":1517},"rate-update-mechanism","Rate Update Mechanism",[271,1520,1521],{},"Interest rates don't change automatically when governance parameters are updated:",[279,1523,1524,1530,1536,1539],{},[282,1525,1526,1527,1529],{},"Rate changes in the TTG Registrar take effect only when ",[274,1528,1431],{}," is called",[282,1531,1532,1533,1535],{},"Both ",[274,1534,276],{}," token and MinterGateway must update their respective indices",[282,1537,1538],{},"Updates occur automatically during key operations such as minting, burning, and transfers",[282,1540,1541],{},"Rate models recalculate rates during each update based on current system state",[266,1543,1545],{"id":1544},"mathematical-precision","Mathematical Precision",[271,1547,1548],{},"The implementation includes several technical considerations:",[344,1550,1551,1554,1557,1560],{},[282,1552,1553],{},"Rates are stored in basis points (1\u002F100 of a percent) for precision",[282,1555,1556],{},"Calculations use fixed-point math with 12 decimal places (1e12 scaling)",[282,1558,1559],{},"Exponential calculations use Pade approximants for gas-efficient computation",[282,1561,1562],{},"Conservative rounding strategies favor protocol safety",[266,1564,1566],{"id":1565},"visuals","Visuals",[271,1568,1569],{},[316,1570],{"alt":1571,"src":1572},"Safe Earner Rate","\u002Fimages\u002Ftechnical-documentations\u002Frates\u002Frates.png",[1574,1575,1576],"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":590,"searchDepth":596,"depth":602,"links":1578},[1579,1580,1584,1585,1586,1587,1588,1589,1590],{"id":268,"depth":602,"text":269},{"id":327,"depth":602,"text":328,"children":1581},[1582,1583],{"id":385,"depth":608,"text":386},{"id":625,"depth":608,"text":626},{"id":1410,"depth":602,"text":1411},{"id":1435,"depth":602,"text":1436},{"id":1455,"depth":602,"text":1456},{"id":1487,"depth":602,"text":1488},{"id":1517,"depth":602,"text":1518},{"id":1544,"depth":602,"text":1545},{"id":1565,"depth":602,"text":1566},"Detailed documentation of the interest rate models that govern minter obligations and earner yield within the M0 Protocol.","md",null,{},{"title":224,"description":1591},"qOtBsZx1DdYQRfCPSMekXSq8yhRe4pjGC38mMDpCs1I",[1598,1600],{"title":220,"path":221,"stem":222,"description":1599,"children":-1},"Technical deep dive into M0's unified cross-chain bridge and messaging system, featuring modular bridge adapters, token bridging, and protocol metadata propagation.",{"title":228,"path":229,"stem":230,"description":1601,"children":-1},"Overview of the primary roles within the M0 ecosystem, their responsibilities, and how they interact with the protocol's core smart contracts."]