[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"navigation":3,"\u002Fprotocol\u002Fwrapped-m":260,"\u002Fprotocol\u002Fwrapped-m-surround":4622},[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":236,"body":262,"description":4615,"extension":4616,"links":4617,"meta":4618,"navigation":4619,"path":237,"seo":4620,"stem":238,"__hash__":4621},"docs\u002Fprotocol\u002Fwrapped-m.md",{"type":263,"value":264,"toc":4568},"minimark",[265,269,279,289,304,313,317,320,326,342,346,898,904,998,1002,1006,1009,1014,1028,1032,1066,1069,1073,1080,1129,1134,1145,1152,1165,1168,1256,1263,1376,1379,1489,1510,1514,1518,1521,1535,1538,1833,1836,1854,1858,1861,1875,1878,1882,1888,1892,1895,2286,2288,2313,2317,2320,2494,2500,2504,2507,2511,2514,2518,2523,2527,2530,2534,2537,2548,2551,2555,2561,2573,2576,2722,2725,2982,2987,3014,3027,3032,3046,3061,3064,3068,3072,3079,3085,3100,3106,3110,3113,3122,3125,3129,3132,3141,3145,3148,3170,3174,3178,3181,3190,3193,3197,3200,3209,3212,3216,3222,3238,3241,3245,3249,3252,3261,3264,3268,3271,3280,3283,3287,3294,3362,3388,3392,3417,3426,3436,3445,3454,3458,3461,3465,3468,3475,3479,3482,3488,3492,3495,3501,3505,3509,3512,3557,3560,3564,3567,3571,3574,3580,3583,3587,3590,3596,3599,3603,3606,3617,3620,3624,3627,3657,3660,3664,3667,3671,3679,3683,3694,3697,3701,3704,3718,3721,3725,3740,3745,3748,3795,3800,3806,3869,3874,3881,4229,4234,4250,4254,4258,4261,4275,4279,4282,4298,4302,4305,4330,4334,4338,4341,4373,4377,4380,4384,4387,4398,4402,4405,4416,4420,4423,4436,4440,4443,4454,4458,4462,4470,4506,4510,4513,4517,4531,4535,4546,4550,4553,4564],[266,267,166],"h2",{"id":268},"overview",[270,271,273,274,278],"h3",{"id":272},"what-is-wrapped-m-wm","What is Wrapped ",[275,276,277],"code",{},"$M"," (wM)?",[280,281,282,283,285,286,288],"p",{},"Wrapped ",[275,284,277],{}," (wM) is a non-rebasing ERC-20 wrapper for the rebasing and immutable ",[275,287,277],{}," token. It maintains yield-earning\ncapabilities while providing compatibility with DeFi protocols that require standard ERC-20 tokens.",[280,290,291,292,294,295,297,298,300,301,303],{},"While the native ",[275,293,277],{}," token automatically increases balances as yield accrues, Wrapped ",[275,296,277],{}," maintains static balances where\nyield can be explicitly claimed. This makes Wrapped ",[275,299,277],{}," compatible with protocols that aren't designed to handle rebasing\ntokens, dramatically expanding the utility of ",[275,302,277],{}," in the broader DeFi ecosystem.",[280,305,306],{},[307,308],"img",{"alt":309,"className":310,"src":312},"Wrapped M",[311],"doc-logo","\u002Fimages\u002Ftechnical-documentations\u002Fm\u002FwM.png",[270,314,316],{"id":315},"why-wrapped-m","Why Wrapped M?",[280,318,319],{},"Every M0 extension eventually wants to connect to certain utilities such as DeFi protocols, on\u002Foff ramps, etc. In order\nto concentrate liquidity, that utility should always exist in the form of M0's stablecoin building block.",[280,321,322,323,325],{},"However, rebasing tokens automatically change their balances as yield accrues, which creates challenges for many DeFi\nprotocols that expect static token balances. Wrapped ",[275,324,277],{}," solves this by:",[327,328,329,333,336,339],"ol",{},[330,331,332],"li",{},"Maintaining fixed token balances that don't automatically increase",[330,334,335],{},"Separately tracking and allowing manual claiming of accrued yield",[330,337,338],{},"Preserving the full economic benefits of the M0 platform while improving protocol compatibility",[330,340,341],{},"Enabling protocol-specific administration of earning capabilities",[270,343,345],{"id":344},"key-features","Key Features",[347,348,349,356,365,880,886,892],"ul",{},[330,350,351,355],{},[352,353,354],"strong",{},"DeFi Compatibility",": Works with lending platforms, AMMs, and other protocols that require standard ERC-20 behavior",[330,357,358,361,362,364],{},[352,359,360],{},"Yield Preservation",": Maintains yield-earning capabilities of the underlying ",[275,363,277],{}," token",[330,366,367,370,371,373,374,376,377,555,558,559,561,562,874,876,877,879],{},[352,368,369],{},"Value & Solvency",": wM aims for a direct value link to ",[275,372,277],{}," for earners. The target value for an earning token is its\nunderlying ",[275,375,277],{}," principal plus accrued yield:",[378,379,382],"span",{"className":380},[381],"katex-display",[378,383,386,434],{"className":384},[385],"katex",[378,387,390],{"className":388},[389],"katex-mathml",[391,392,395],"math",{"xmlns":393,"display":394},"http:\u002F\u002Fwww.w3.org\u002F1998\u002FMath\u002FMathML","block",[396,397,398,429],"semantics",{},[399,400,401,405,409,413,416,419,421,424,426],"mrow",{},[402,403,404],"mn",{},"1",[406,407,408],"mtext",{}," earning wM",[410,411,412],"mo",{},"+",[406,414,415],{},"wM yield ",[410,417,418],{},"≈",[402,420,404],{},[406,422,423],{}," M",[410,425,412],{},[406,427,428],{},"Accrued Yield",[430,431,433],"annotation",{"encoding":432},"application\u002Fx-tex","1 \\text{ }\\text{earning }\\text{wM} + \\text{wM yield } \\approx 1 \\text{ }\\text{M} + \\text{Accrued Yield}",[378,435,439,486,510,542],{"className":436,"ariaHidden":438},[437],"katex-html","true",[378,440,443,448,452,460,467,474,479,483],{"className":441},[442],"base",[378,444],{"className":445,"style":447},[446],"strut","height:0.8778em;vertical-align:-0.1944em;",[378,449,404],{"className":450},[451],"mord",[378,453,456],{"className":454},[451,455],"text",[378,457,459],{"className":458},[451]," ",[378,461,463],{"className":462},[451,455],[378,464,466],{"className":465},[451],"earning ",[378,468,470],{"className":469},[451,455],[378,471,473],{"className":472},[451],"wM",[378,475],{"className":476,"style":478},[477],"mspace","margin-right:0.2222em;",[378,480,412],{"className":481},[482],"mbin",[378,484],{"className":485,"style":478},[477],[378,487,489,493,499,503,507],{"className":488},[442],[378,490],{"className":491,"style":492},[446],"height:0.8889em;vertical-align:-0.1944em;",[378,494,496],{"className":495},[451,455],[378,497,415],{"className":498},[451],[378,500],{"className":501,"style":502},[477],"margin-right:0.2778em;",[378,504,418],{"className":505},[506],"mrel",[378,508],{"className":509,"style":502},[477],[378,511,513,517,520,526,533,536,539],{"className":512},[442],[378,514],{"className":515,"style":516},[446],"height:0.7667em;vertical-align:-0.0833em;",[378,518,404],{"className":519},[451],[378,521,523],{"className":522},[451,455],[378,524,459],{"className":525},[451],[378,527,529],{"className":528},[451,455],[378,530,532],{"className":531},[451],"M",[378,534],{"className":535,"style":478},[477],[378,537,412],{"className":538},[482],[378,540],{"className":541,"style":478},[477],[378,543,545,549],{"className":544},[442],[378,546],{"className":547,"style":548},[446],"height:0.6944em;",[378,550,552],{"className":551},[451,455],[378,553,428],{"className":554},[451],[556,557],"br",{},"Critically, the entire system maintains a solvency invariant, ensuring it's always fully backed. The total ",[275,560,277],{}," held by\nthe wM contract is always greater than or equal to the total wM supply plus all accrued yield owed to earners:",[378,563,565],{"className":564},[381],[378,566,568,622],{"className":567},[385],[378,569,571],{"className":570},[389],[391,572,573],{"xmlns":393,"display":394},[396,574,575,619],{},[399,576,577,595,598],{},[578,579,580,583],"msub",{},[406,581,582],{},"M Balance",[399,584,585,589,592],{},[410,586,588],{"stretchy":587},"false","(",[406,590,591],{},"wM contract",[410,593,594],{"stretchy":587},")",[410,596,597],{},"≥",[599,600,601,616],"munder",{},[599,602,603,613],{},[399,604,605,608,610],{},[406,606,607],{},"totalNonEarningSupply",[410,609,412],{},[406,611,612],{},"projectedEarningSupply",[410,614,615],{"stretchy":438},"⏟",[406,617,618],{},"Total wM Liabilities, aka wM supply + accrued yield",[430,620,621],{"encoding":432},"\\text{M Balance}_{(\\text{wM contract})} \\ge \\underbrace{\\text{totalNonEarningSupply} + \\text{projectedEarningSupply}}_{\\text{Total wM Liabilities, aka wM supply + accrued yield}}",[378,623,625,714],{"className":624,"ariaHidden":438},[437],[378,626,628,632,705,708,711],{"className":627},[442],[378,629],{"className":630,"style":631},[446],"height:1.0496em;vertical-align:-0.3552em;",[378,633,635,641],{"className":634},[451],[378,636,638],{"className":637},[451,455],[378,639,582],{"className":640},[451],[378,642,645],{"className":643},[644],"msupsub",[378,646,650,696],{"className":647},[648,649],"vlist-t","vlist-t2",[378,651,654,691],{"className":652},[653],"vlist-r",[378,655,659],{"className":656,"style":658},[657],"vlist","height:0.3448em;",[378,660,662,667],{"style":661},"top:-2.5198em;margin-right:0.05em;",[378,663],{"className":664,"style":666},[665],"pstrut","height:2.7em;",[378,668,674],{"className":669},[670,671,672,673],"sizing","reset-size6","size3","mtight",[378,675,677,681,687],{"className":676},[451,673],[378,678,588],{"className":679},[680,673],"mopen",[378,682,684],{"className":683},[451,455,673],[378,685,591],{"className":686},[451,673],[378,688,594],{"className":689},[690,673],"mclose",[378,692,695],{"className":693},[694],"vlist-s","​",[378,697,699],{"className":698},[653],[378,700,703],{"className":701,"style":702},[657],"height:0.3552em;",[378,704],{},[378,706],{"className":707,"style":502},[477],[378,709,597],{"className":710},[506],[378,712],{"className":713,"style":502},[477],[378,715,717,721],{"className":716},[442],[378,718],{"className":719,"style":720},[446],"height:2.3591em;vertical-align:-1.6647em;",[378,722,725],{"className":723},[724,599],"minner",[378,726,728,865],{"className":727},[648,649],[378,729,731,862],{"className":730},[653],[378,732,734,753],{"className":733,"style":548},[657],[378,735,737,741],{"style":736},"top:-1.4715em;",[378,738],{"className":739,"style":740},[665],"height:3em;",[378,742,744],{"className":743},[670,671,672,673],[378,745,747],{"className":746},[451,673],[378,748,750],{"className":749},[451,455,673],[378,751,618],{"className":752},[451,673],[378,754,756,759],{"style":755},"top:-3em;",[378,757],{"className":758,"style":740},[665],[378,760,762],{"className":761},[724,599],[378,763,765,853],{"className":764},[648,649],[378,766,768,850],{"className":767},[653],[378,769,771,821],{"className":770,"style":548},[657],[378,772,776,779],{"className":773,"style":775},[774],"svg-align","top:-2.1576em;",[378,777],{"className":778,"style":740},[665],[378,780,784,801,811],{"className":781,"style":783},[782],"stretchy","height:0.548em;min-width:1.6em;",[378,785,789],{"className":786,"style":788},[787],"brace-left","height:0.548em;",[790,791,797],"svg",{"xmlns":792,"width":793,"height":794,"viewBox":795,"preserveAspectRatio":796},"http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg","400em","0.548em","0 0 400000 548","xMinYMin slice",[798,799],"path",{"d":800},"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",[378,802,805],{"className":803,"style":788},[804],"brace-center",[790,806,808],{"xmlns":792,"width":793,"height":794,"viewBox":795,"preserveAspectRatio":807},"xMidYMin slice",[798,809],{"d":810},"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",[378,812,815],{"className":813,"style":788},[814],"brace-right",[790,816,818],{"xmlns":792,"width":793,"height":794,"viewBox":795,"preserveAspectRatio":817},"xMaxYMin slice",[798,819],{"d":820},"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",[378,822,823,826],{"style":755},[378,824],{"className":825,"style":740},[665],[378,827,829,835,838,841,844],{"className":828},[451],[378,830,832],{"className":831},[451,455],[378,833,607],{"className":834},[451],[378,836],{"className":837,"style":478},[477],[378,839,412],{"className":840},[482],[378,842],{"className":843,"style":478},[477],[378,845,847],{"className":846},[451,455],[378,848,612],{"className":849},[451],[378,851,695],{"className":852},[694],[378,854,856],{"className":855},[653],[378,857,860],{"className":858,"style":859},[657],"height:0.8424em;",[378,861],{},[378,863,695],{"className":864},[694],[378,866,868],{"className":867},[653],[378,869,872],{"className":870,"style":871},[657],"height:1.6647em;",[378,873],{},[556,875],{},"This guarantee is maintained through the system's design, where yield earned on ",[275,878,277],{}," held for non-earning wM holders,\nalong with minor positive rounding effects during transfers, accumulates as \"excess\" reserves within the contract.",[330,881,882,885],{},[352,883,884],{},"Flexible Yield Options",": Configurable claiming and recipient mechanisms",[330,887,888,891],{},[352,889,890],{},"Delegated Administration",": Trusted admins can manage earner status without governance",[330,893,894,897],{},[352,895,896],{},"Protocol Value Capture",": System design naturally accumulates excess reserves that benefit the broader protocol\necosystem",[270,899,901,902],{"id":900},"comparison-to-m","Comparison to ",[275,903,277],{},[905,906,907,929],"table",{},[908,909,910],"thead",{},[911,912,913,919,925],"tr",{},[914,915,916],"th",{},[352,917,918],{},"Feature",[914,920,921],{},[352,922,923],{},[275,924,277],{},[914,926,927],{},[352,928,309],{},[930,931,932,944,955,966,976,987],"tbody",{},[911,933,934,938,941],{},[935,936,937],"td",{},"Balance Behavior",[935,939,940],{},"Automatically increases (rebasing)",[935,942,943],{},"Remains static until explicit claim",[911,945,946,949,952],{},[935,947,948],{},"Earning Mechanism",[935,950,951],{},"Implicit (balances grow)",[935,953,954],{},"Explicit (yield accumulates separately)",[911,956,957,960,963],{},[935,958,959],{},"Yield Realization",[935,961,962],{},"Automatic with balance updates",[935,964,965],{},"Manual claiming required",[911,967,968,970,973],{},[935,969,354],{},[935,971,972],{},"Limited due to rebasing",[935,974,975],{},"Wide compatibility with standard ERC-20",[911,977,978,981,984],{},[935,979,980],{},"Recipient Options",[935,982,983],{},"Limited",[935,985,986],{},"Configurable yield recipients",[911,988,989,992,995],{},[935,990,991],{},"Administration",[935,993,994],{},"Governance only",[935,996,997],{},"Governance + Delegated admins",[266,999,1001],{"id":1000},"core-concepts","Core Concepts",[270,1003,1005],{"id":1004},"dual-mode-earning-vs-non-earning","Dual Mode: Earning vs. Non-Earning",[280,1007,1008],{},"The wM token operates in two distinct modes for each account:",[1010,1011,1013],"h4",{"id":1012},"non-earning-mode","Non-Earning Mode",[347,1015,1016,1019,1022,1025],{},[330,1017,1018],{},"Default state for new accounts",[330,1020,1021],{},"Balances remain static (standard ERC-20 behavior)",[330,1023,1024],{},"No yield accrues on these tokens",[330,1026,1027],{},"Simpler accounting with direct token amounts",[1010,1029,1031],{"id":1030},"earning-mode","Earning Mode",[347,1033,1034,1037,1040,1054,1063],{},[330,1035,1036],{},"Must be explicitly activated (requires approval via Governance or EarnerManager admin designation)",[330,1038,1039],{},"Balances remain static in storage",[330,1041,1042,1043,1046,1047,1050,1051,1053],{},"Represents a growing value based on a ",[352,1044,1045],{},"principal amount"," and an ",[352,1048,1049],{},"index",", using an accounting model analogous to\nthe native ",[275,1052,277],{}," token.",[330,1055,1056,1057,1062],{},"Crucially, the ",[352,1058,1059,1060,364],{},"index used is derived from the underlying ",[275,1061,277],{}," (wM does not maintain its own independent\nindex).",[330,1064,1065],{},"Yield accumulates based on this principal and derived index, and can be claimed separately.",[280,1067,1068],{},"Users can switch between Non-Earning and Earning modes if they meet the requirements for earning.",[270,1070,1072],{"id":1071},"account-status","Account Status",[280,1074,1075,1076,1079],{},"Each wM account maintains several key properties tracked internally within the ",[275,1077,1078],{},"WrappedMToken"," contract:",[347,1081,1082,1093,1099,1105,1115],{},[330,1083,1084,1087,1088,1092],{},[352,1085,1086],{},"Balance",": The current wM token balance held by the account. This value remains static between operations\nand ",[1089,1090,1091],"em",{},"excludes"," any unclaimed yield.",[330,1094,1095,1098],{},[352,1096,1097],{},"Earning Status",": A boolean flag indicating whether the account is currently in Earning Mode (true) or Non-Earning\nMode (false).",[330,1100,1101,1104],{},[352,1102,1103],{},"Earning Principal",": For accounts in Earning Mode, this stores the base principal amount used for yield\ncalculations. This value is derived from the account's balance when it starts earning and remains constant while\nearning.",[330,1106,1107,1110,1111,1114],{},[352,1108,1109],{},"Claim Recipient",": An optional address specified by the user via ",[275,1112,1113],{},"setClaimRecipient()"," to receive their claimed\nyield. If not set by the user, and no Governance override exists, yield is sent to the account owner itself.",[330,1116,1117,1120,1121],{},[352,1118,1119],{},"Earner Details",": A boolean flag indicating if settings apply when an account's earning status is managed by an\nEarnerManager admin.\n",[347,1122,1123,1126],{},[330,1124,1125],{},"If true, it implies the EarnerManager contract holds details (managing admin address, fee rate) for this account.",[330,1127,1128],{},"When a fee rate is set by the admin, a portion of the claimed yield (calculated as yield * feeRate \u002F 10000) is sent\nto that admin upon claiming, and the remaining net yield goes to the designated claim recipient (user-set,\ngovernance-set, or default owner).",[280,1130,1131],{},[352,1132,1133],{},"Principal, Balance, and Yield Relationship:",[280,1135,1136,1137,1140,1141,1144],{},"When an account enters Earning Mode (",[275,1138,1139],{},"startEarningFor","), its current balance is converted into its\ninitial ",[275,1142,1143],{},"earningPrincipal",".",[280,1146,1147,1148,1151],{},"This conversion is performed by the ",[275,1149,1150],{},"IndexingMath.getPrincipalAmountRoundedDown","(balance, currentIndex) function, which\ncalculates the principal amount corresponding to the balance at the currentIndex, taking into account the system's\nfixed-point scaling for the index and applying rounding rules that slightly favor the protocol.",[280,1153,1154,1155,1157,1158,1161,1162,1164],{},"This ",[275,1156,1143],{}," remains fixed while the account continues in Earning Mode. As the global ",[275,1159,1160],{},"currentIndex"," (derived\nfrom the ",[275,1163,277],{}," token's index) increases over time, the value represented by this fixed principal grows.",[280,1166,1167],{},"The fundamental relationship is:",[378,1169,1171],{"className":1170},[381],[378,1172,1174,1199],{"className":1173},[385],[378,1175,1177],{"className":1176},[389],[391,1178,1179],{"xmlns":393,"display":394},[396,1180,1181,1196],{},[399,1182,1183,1186,1189,1191,1194],{},[406,1184,1185],{},"Value Represented",[410,1187,1188],{},"=",[406,1190,1143],{},[410,1192,1193],{},"×",[406,1195,1160],{},[430,1197,1198],{"encoding":432},"\\text{Value Represented} = \\text{earningPrincipal} \\times \\text{currentIndex}",[378,1200,1202,1223,1244],{"className":1201,"ariaHidden":438},[437],[378,1203,1205,1208,1214,1217,1220],{"className":1204},[442],[378,1206],{"className":1207,"style":492},[446],[378,1209,1211],{"className":1210},[451,455],[378,1212,1185],{"className":1213},[451],[378,1215],{"className":1216,"style":502},[477],[378,1218,1188],{"className":1219},[506],[378,1221],{"className":1222,"style":502},[477],[378,1224,1226,1229,1235,1238,1241],{"className":1225},[442],[378,1227],{"className":1228,"style":492},[446],[378,1230,1232],{"className":1231},[451,455],[378,1233,1143],{"className":1234},[451],[378,1236],{"className":1237,"style":478},[477],[378,1239,1193],{"className":1240},[482],[378,1242],{"className":1243,"style":478},[477],[378,1245,1247,1250],{"className":1246},[442],[378,1248],{"className":1249,"style":548},[446],[378,1251,1253],{"className":1252},[451,455],[378,1254,1160],{"className":1255},[451],[280,1257,1258,1259,1262],{},"The account's stored balance only increases when yield is explicitly claimed. Therefore, the ",[275,1260,1261],{},"accruedYield"," represents\nthe difference between the current value represented by the principal and the static stored balance:",[378,1264,1266],{"className":1265},[381],[378,1267,1269,1297],{"className":1268},[385],[378,1270,1272],{"className":1271},[389],[391,1273,1274],{"xmlns":393,"display":394},[396,1275,1276,1294],{},[399,1277,1278,1280,1282,1284,1286,1288,1291],{},[406,1279,1261],{},[410,1281,1188],{},[406,1283,1143],{},[410,1285,1193],{},[406,1287,1160],{},[410,1289,1290],{},"−",[406,1292,1293],{},"balance",[430,1295,1296],{"encoding":432},"\\text{accruedYield} = \\text{earningPrincipal}\\times\\text{currentIndex}-\\text{balance}",[378,1298,1300,1321,1342,1364],{"className":1299,"ariaHidden":438},[437],[378,1301,1303,1306,1312,1315,1318],{"className":1302},[442],[378,1304],{"className":1305,"style":548},[446],[378,1307,1309],{"className":1308},[451,455],[378,1310,1261],{"className":1311},[451],[378,1313],{"className":1314,"style":502},[477],[378,1316,1188],{"className":1317},[506],[378,1319],{"className":1320,"style":502},[477],[378,1322,1324,1327,1333,1336,1339],{"className":1323},[442],[378,1325],{"className":1326,"style":492},[446],[378,1328,1330],{"className":1329},[451,455],[378,1331,1143],{"className":1332},[451],[378,1334],{"className":1335,"style":478},[477],[378,1337,1193],{"className":1338},[482],[378,1340],{"className":1341,"style":478},[477],[378,1343,1345,1349,1355,1358,1361],{"className":1344},[442],[378,1346],{"className":1347,"style":1348},[446],"height:0.7778em;vertical-align:-0.0833em;",[378,1350,1352],{"className":1351},[451,455],[378,1353,1160],{"className":1354},[451],[378,1356],{"className":1357,"style":478},[477],[378,1359,1290],{"className":1360},[482],[378,1362],{"className":1363,"style":478},[477],[378,1365,1367,1370],{"className":1366},[442],[378,1368],{"className":1369,"style":548},[446],[378,1371,1373],{"className":1372},[451,455],[378,1374,1293],{"className":1375},[451],[280,1377,1378],{},"So, the target state before claiming is effectively:",[378,1380,1382],{"className":1381},[381],[378,1383,1385,1411],{"className":1384},[385],[378,1386,1388],{"className":1387},[389],[391,1389,1390],{"xmlns":393,"display":394},[396,1391,1392,1408],{},[399,1393,1394,1396,1398,1400,1402,1404,1406],{},[406,1395,1293],{},[410,1397,412],{},[406,1399,1261],{},[410,1401,418],{},[406,1403,1143],{},[410,1405,1193],{},[406,1407,1160],{},[430,1409,1410],{"encoding":432},"\\text{balance} + \\text{accruedYield}\\approx\\text{earningPrincipal}\\times\\text{currentIndex}",[378,1412,1414,1435,1456,1477],{"className":1413,"ariaHidden":438},[437],[378,1415,1417,1420,1426,1429,1432],{"className":1416},[442],[378,1418],{"className":1419,"style":1348},[446],[378,1421,1423],{"className":1422},[451,455],[378,1424,1293],{"className":1425},[451],[378,1427],{"className":1428,"style":478},[477],[378,1430,412],{"className":1431},[482],[378,1433],{"className":1434,"style":478},[477],[378,1436,1438,1441,1447,1450,1453],{"className":1437},[442],[378,1439],{"className":1440,"style":548},[446],[378,1442,1444],{"className":1443},[451,455],[378,1445,1261],{"className":1446},[451],[378,1448],{"className":1449,"style":502},[477],[378,1451,418],{"className":1452},[506],[378,1454],{"className":1455,"style":502},[477],[378,1457,1459,1462,1468,1471,1474],{"className":1458},[442],[378,1460],{"className":1461,"style":492},[446],[378,1463,1465],{"className":1464},[451,455],[378,1466,1143],{"className":1467},[451],[378,1469],{"className":1470,"style":478},[477],[378,1472,1193],{"className":1473},[482],[378,1475],{"className":1476,"style":478},[477],[378,1478,1480,1483],{"className":1479},[442],[378,1481],{"className":1482,"style":548},[446],[378,1484,1486],{"className":1485},[451,455],[378,1487,1160],{"className":1488},[451],[280,1490,1491,1492,1495,1496,1498,1499,1502,1503,1506,1507,1509],{},"Calling the ",[275,1493,1494],{},"claimFor()"," function calculates this ",[275,1497,1261],{},". It then handles potential fee deductions\nif ",[275,1500,1501],{},"hasEarnerDetails"," is true (sending the fee portion to the managing admin). The remaining net yield is transferred to\nthe designated ",[275,1504,1505],{},"claimRecipient",". If the ",[275,1508,1505],{}," is the account owner itself, their stored balance is increased\nby this net yield amount. This operation \"catches up\" the account's stored balance to reflect the value earned up to\nthat point (minus any fees paid).",[270,1511,1513],{"id":1512},"yield-generation-and-claiming","Yield Generation and Claiming",[1010,1515,1517],{"id":1516},"how-yield-accrues","How Yield Accrues",[280,1519,1520],{},"For accounts in earning mode, yield accrues based on:",[347,1522,1523,1526,1532],{},[330,1524,1525],{},"The account's principal amount",[330,1527,1528,1529,1531],{},"The global wM index (derived from the ",[275,1530,277],{}," token's index)",[330,1533,1534],{},"The time elapsed since the last index update",[280,1536,1537],{},"The formula is:",[378,1539,1541],{"className":1540},[381],[378,1542,1544,1661],{"className":1543},[385],[378,1545,1547],{"className":1546},[389],[391,1548,1549],{"xmlns":393,"display":394},[396,1550,1551,1658],{},[399,1552,1553,1557,1560,1562,1565,1568,1571,1574,1577,1580,1582,1585,1587,1589,1591,1593,1595,1597,1600,1602,1604,1606,1608,1610,1612,1614,1616,1618,1620,1622,1624,1627,1630,1632,1634,1636,1639,1641,1643,1646,1648,1650,1652,1654,1656],{},[1554,1555,1556],"mi",{},"a",[1554,1558,1559],{},"c",[1554,1561,1559],{},[1554,1563,1564],{},"r",[1554,1566,1567],{},"u",[1554,1569,1570],{},"e",[1554,1572,1573],{},"d",[1554,1575,1576],{},"Y",[1554,1578,1579],{},"i",[1554,1581,1570],{},[1554,1583,1584],{},"l",[1554,1586,1573],{},[410,1588,1188],{},[410,1590,588],{"stretchy":587},[1554,1592,280],{},[1554,1594,1564],{},[1554,1596,1579],{},[1554,1598,1599],{},"n",[1554,1601,1559],{},[1554,1603,1579],{},[1554,1605,280],{},[1554,1607,1556],{},[1554,1609,1584],{},[410,1611,1193],{},[1554,1613,1559],{},[1554,1615,1567],{},[1554,1617,1564],{},[1554,1619,1564],{},[1554,1621,1570],{},[1554,1623,1599],{},[1554,1625,1626],{},"t",[1554,1628,1629],{},"I",[1554,1631,1599],{},[1554,1633,1573],{},[1554,1635,1570],{},[1554,1637,1638],{},"x",[410,1640,594],{"stretchy":587},[410,1642,1290],{},[1554,1644,1645],{},"b",[1554,1647,1556],{},[1554,1649,1584],{},[1554,1651,1556],{},[1554,1653,1599],{},[1554,1655,1559],{},[1554,1657,1570],{},[430,1659,1660],{"encoding":432},"accruedYield=(principal\\times currentIndex) - balance",[378,1662,1664,1713,1757,1812],{"className":1663,"ariaHidden":438},[437],[378,1665,1667,1670,1674,1679,1682,1685,1688,1691,1694,1697,1701,1704,1707,1710],{"className":1666},[442],[378,1668],{"className":1669,"style":548},[446],[378,1671,1556],{"className":1672},[451,1673],"mathnormal",[378,1675,1678],{"className":1676,"style":1677},[451,1673],"margin-right:0.0278em;","ccr",[378,1680,1567],{"className":1681},[451,1673],[378,1683,1570],{"className":1684},[451,1673],[378,1686,1573],{"className":1687},[451,1673],[378,1689,1576],{"className":1690,"style":478},[451,1673],[378,1692,1579],{"className":1693},[451,1673],[378,1695,1570],{"className":1696},[451,1673],[378,1698,1584],{"className":1699,"style":1700},[451,1673],"margin-right:0.0197em;",[378,1702,1573],{"className":1703},[451,1673],[378,1705],{"className":1706,"style":502},[477],[378,1708,1188],{"className":1709},[506],[378,1711],{"className":1712,"style":502},[477],[378,1714,1716,1720,1723,1726,1729,1733,1736,1739,1742,1745,1748,1751,1754],{"className":1715},[442],[378,1717],{"className":1718,"style":1719},[446],"height:1em;vertical-align:-0.25em;",[378,1721,588],{"className":1722},[680],[378,1724,280],{"className":1725},[451,1673],[378,1727,1564],{"className":1728,"style":1677},[451,1673],[378,1730,1732],{"className":1731},[451,1673],"in",[378,1734,1559],{"className":1735},[451,1673],[378,1737,1579],{"className":1738},[451,1673],[378,1740,280],{"className":1741},[451,1673],[378,1743,1556],{"className":1744},[451,1673],[378,1746,1584],{"className":1747,"style":1700},[451,1673],[378,1749],{"className":1750,"style":478},[477],[378,1752,1193],{"className":1753},[482],[378,1755],{"className":1756,"style":478},[477],[378,1758,1760,1763,1766,1769,1772,1775,1778,1781,1784,1788,1791,1794,1797,1800,1803,1806,1809],{"className":1759},[442],[378,1761],{"className":1762,"style":1719},[446],[378,1764,1559],{"className":1765},[451,1673],[378,1767,1567],{"className":1768},[451,1673],[378,1770,1564],{"className":1771,"style":1677},[451,1673],[378,1773,1564],{"className":1774,"style":1677},[451,1673],[378,1776,1570],{"className":1777},[451,1673],[378,1779,1599],{"className":1780},[451,1673],[378,1782,1626],{"className":1783},[451,1673],[378,1785,1629],{"className":1786,"style":1787},[451,1673],"margin-right:0.0785em;",[378,1789,1599],{"className":1790},[451,1673],[378,1792,1573],{"className":1793},[451,1673],[378,1795,1570],{"className":1796},[451,1673],[378,1798,1638],{"className":1799},[451,1673],[378,1801,594],{"className":1802},[690],[378,1804],{"className":1805,"style":478},[477],[378,1807,1290],{"className":1808},[482],[378,1810],{"className":1811,"style":478},[477],[378,1813,1815,1818,1822,1825,1829],{"className":1814},[442],[378,1816],{"className":1817,"style":548},[446],[378,1819,1821],{"className":1820},[451,1673],"ba",[378,1823,1584],{"className":1824,"style":1700},[451,1673],[378,1826,1828],{"className":1827},[451,1673],"an",[378,1830,1832],{"className":1831},[451,1673],"ce",[280,1834,1835],{},"Where:",[347,1837,1838,1844,1849],{},[330,1839,1840,1843],{},[275,1841,1842],{},"principal"," is the stored earning principal for the account",[330,1845,1846,1848],{},[275,1847,1160],{}," is the current wM index",[330,1850,1851,1853],{},[275,1852,1293],{}," is the current token balance",[1010,1855,1857],{"id":1856},"claiming-process","Claiming Process",[280,1859,1860],{},"When yield is claimed:",[327,1862,1863,1866,1869,1872],{},[330,1864,1865],{},"The accrued yield is calculated based on the current index",[330,1867,1868],{},"The account's balance is provisionally increased by the full yield amount",[330,1870,1871],{},"If the account's earning status is managed by an active EarnerManager admin with a configured fee rate, a percentage\nof the yield is deducted and sent to that admin as a fee",[330,1873,1874],{},"The remaining yield (minus any fees) is transferred to the designated recipient (or remains with the account owner if\nthey are the recipient)",[280,1876,1877],{},"Claiming doesn't change the principal amount, only the final balance reflects the net yield received.",[270,1879,1881],{"id":1880},"index-mechanism","Index Mechanism",[280,1883,1884,1885,1887],{},"Rather than maintaining its own independent index, wM derives its index from the ",[275,1886,277],{}," token's index:",[1010,1889,1891],{"id":1890},"when-earning-is-enabled","When Earning is Enabled",[280,1893,1894],{},"The wM index is calculated as:",[378,1896,1898],{"className":1897},[381],[378,1899,1901,2027],{"className":1900},[385],[378,1902,1904],{"className":1903},[389],[391,1905,1906],{"xmlns":393,"display":394},[396,1907,1908,2024],{},[399,1909,1910,1913,1929,1931,1933,1963,1965,1969,1971,1973,1975,1977,1979,1981,1983,1985,1987,1989,1991,1993,1995,1997,1999,2001,2003,2006,2008,2010,2012,2014,2016,2018,2020,2022],{},[1554,1911,1912],{},"w",[578,1914,1915,1917],{},[1554,1916,532],{},[399,1918,1919,1921,1923,1925,1927],{},[1554,1920,1579],{},[1554,1922,1599],{},[1554,1924,1573],{},[1554,1926,1570],{},[1554,1928,1638],{},[410,1930,1188],{},[410,1932,588],{"stretchy":587},[578,1934,1935,1937],{},[1554,1936,532],{},[399,1938,1939,1941,1943,1945,1947,1949,1951,1953,1955,1957,1959,1961],{},[1554,1940,1559],{},[1554,1942,1567],{},[1554,1944,1564],{},[1554,1946,1564],{},[1554,1948,1570],{},[1554,1950,1599],{},[1554,1952,1626],{},[1554,1954,1579],{},[1554,1956,1599],{},[1554,1958,1573],{},[1554,1960,1570],{},[1554,1962,1638],{},[406,1964,459],{},[1554,1966,1968],{"mathvariant":1967},"normal","\u002F",[406,1970,459],{},[1554,1972,1570],{},[1554,1974,1599],{},[1554,1976,1556],{},[1554,1978,1645],{},[1554,1980,1584],{},[1554,1982,1570],{},[1554,1984,532],{},[1554,1986,1629],{},[1554,1988,1599],{},[1554,1990,1573],{},[1554,1992,1570],{},[1554,1994,1638],{},[410,1996,594],{"stretchy":587},[410,1998,1193],{},[1554,2000,1573],{},[1554,2002,1579],{},[1554,2004,2005],{},"s",[1554,2007,1556],{},[1554,2009,1645],{},[1554,2011,1584],{},[1554,2013,1570],{},[1554,2015,1629],{},[1554,2017,1599],{},[1554,2019,1573],{},[1554,2021,1570],{},[1554,2023,1638],{},[430,2025,2026],{"encoding":432},"wM_{index} = (M_{current index} \\text{ }\u002F \\text{ }enableMIndex) \\times disableIndex",[378,2028,2030,2106,2246],{"className":2029,"ariaHidden":438},[437],[378,2031,2033,2037,2041,2097,2100,2103],{"className":2032},[442],[378,2034],{"className":2035,"style":2036},[446],"height:0.8333em;vertical-align:-0.15em;",[378,2038,1912],{"className":2039,"style":2040},[451,1673],"margin-right:0.0269em;",[378,2042,2044,2048],{"className":2043},[451],[378,2045,532],{"className":2046,"style":2047},[451,1673],"margin-right:0.109em;",[378,2049,2051],{"className":2050},[644],[378,2052,2054,2088],{"className":2053},[648,649],[378,2055,2057,2085],{"className":2056},[653],[378,2058,2061],{"className":2059,"style":2060},[657],"height:0.3361em;",[378,2062,2064,2067],{"style":2063},"top:-2.55em;margin-left:-0.109em;margin-right:0.05em;",[378,2065],{"className":2066,"style":666},[665],[378,2068,2070],{"className":2069},[670,671,672,673],[378,2071,2073,2076,2079,2082],{"className":2072},[451,673],[378,2074,1732],{"className":2075},[451,1673,673],[378,2077,1573],{"className":2078},[451,1673,673],[378,2080,1570],{"className":2081},[451,1673,673],[378,2083,1638],{"className":2084},[451,1673,673],[378,2086,695],{"className":2087},[694],[378,2089,2091],{"className":2090},[653],[378,2092,2095],{"className":2093,"style":2094},[657],"height:0.15em;",[378,2096],{},[378,2098],{"className":2099,"style":502},[477],[378,2101,1188],{"className":2102},[506],[378,2104],{"className":2105,"style":502},[477],[378,2107,2109,2112,2115,2188,2194,2197,2203,2206,2210,2213,2216,2219,2222,2225,2228,2231,2234,2237,2240,2243],{"className":2108},[442],[378,2110],{"className":2111,"style":1719},[446],[378,2113,588],{"className":2114},[680],[378,2116,2118,2121],{"className":2117},[451],[378,2119,532],{"className":2120,"style":2047},[451,1673],[378,2122,2124],{"className":2123},[644],[378,2125,2127,2180],{"className":2126},[648,649],[378,2128,2130,2177],{"className":2129},[653],[378,2131,2133],{"className":2132,"style":2060},[657],[378,2134,2135,2138],{"style":2063},[378,2136],{"className":2137,"style":666},[665],[378,2139,2141],{"className":2140},[670,671,672,673],[378,2142,2144,2147,2150,2153,2156,2159,2162,2165,2168,2171,2174],{"className":2143},[451,673],[378,2145,1559],{"className":2146},[451,1673,673],[378,2148,1567],{"className":2149},[451,1673,673],[378,2151,1564],{"className":2152,"style":1677},[451,1673,673],[378,2154,1564],{"className":2155,"style":1677},[451,1673,673],[378,2157,1570],{"className":2158},[451,1673,673],[378,2160,1599],{"className":2161},[451,1673,673],[378,2163,1626],{"className":2164},[451,1673,673],[378,2166,1732],{"className":2167},[451,1673,673],[378,2169,1573],{"className":2170},[451,1673,673],[378,2172,1570],{"className":2173},[451,1673,673],[378,2175,1638],{"className":2176},[451,1673,673],[378,2178,695],{"className":2179},[694],[378,2181,2183],{"className":2182},[653],[378,2184,2186],{"className":2185,"style":2094},[657],[378,2187],{},[378,2189,2191],{"className":2190},[451,455],[378,2192,459],{"className":2193},[451],[378,2195,1968],{"className":2196},[451],[378,2198,2200],{"className":2199},[451,455],[378,2201,459],{"className":2202},[451],[378,2204,1570],{"className":2205},[451,1673],[378,2207,2209],{"className":2208},[451,1673],"nab",[378,2211,1584],{"className":2212,"style":1700},[451,1673],[378,2214,1570],{"className":2215},[451,1673],[378,2217,532],{"className":2218,"style":2047},[451,1673],[378,2220,1629],{"className":2221,"style":1787},[451,1673],[378,2223,1599],{"className":2224},[451,1673],[378,2226,1573],{"className":2227},[451,1673],[378,2229,1570],{"className":2230},[451,1673],[378,2232,1638],{"className":2233},[451,1673],[378,2235,594],{"className":2236},[690],[378,2238],{"className":2239,"style":478},[477],[378,2241,1193],{"className":2242},[482],[378,2244],{"className":2245,"style":478},[477],[378,2247,2249,2252,2255,2258,2261,2265,2268,2271,2274,2277,2280,2283],{"className":2248},[442],[378,2250],{"className":2251,"style":548},[446],[378,2253,1573],{"className":2254},[451,1673],[378,2256,1579],{"className":2257},[451,1673],[378,2259,2005],{"className":2260},[451,1673],[378,2262,2264],{"className":2263},[451,1673],"ab",[378,2266,1584],{"className":2267,"style":1700},[451,1673],[378,2269,1570],{"className":2270},[451,1673],[378,2272,1629],{"className":2273,"style":1787},[451,1673],[378,2275,1599],{"className":2276},[451,1673],[378,2278,1573],{"className":2279},[451,1673],[378,2281,1570],{"className":2282},[451,1673],[378,2284,1638],{"className":2285},[451,1673],[280,2287,1835],{},[347,2289,2290,2298,2307],{},[330,2291,2292,2295,2296,364],{},[275,2293,2294],{},"M current index"," is the current index from the ",[275,2297,277],{},[330,2299,2300,2303,2304,2306],{},[275,2301,2302],{},"enableMIndex"," is the ",[275,2305,277],{}," index when earning was enabled",[330,2308,2309,2312],{},[275,2310,2311],{},"disableIndex"," is the previous wM index (if earning was previously disabled)",[1010,2314,2316],{"id":2315},"when-earning-is-disabled","When Earning is Disabled",[280,2318,2319],{},"The wM index becomes static:",[378,2321,2323],{"className":2322},[381],[378,2324,2326,2382],{"className":2325},[385],[378,2327,2329],{"className":2328},[389],[391,2330,2331],{"xmlns":393,"display":394},[396,2332,2333,2379],{},[399,2334,2335,2337,2353,2355,2357,2359,2361,2363,2365,2367,2369,2371,2373,2375,2377],{},[1554,2336,1912],{},[578,2338,2339,2341],{},[1554,2340,532],{},[399,2342,2343,2345,2347,2349,2351],{},[1554,2344,1579],{},[1554,2346,1599],{},[1554,2348,1573],{},[1554,2350,1570],{},[1554,2352,1638],{},[410,2354,1188],{},[1554,2356,1573],{},[1554,2358,1579],{},[1554,2360,2005],{},[1554,2362,1556],{},[1554,2364,1645],{},[1554,2366,1584],{},[1554,2368,1570],{},[1554,2370,1629],{},[1554,2372,1599],{},[1554,2374,1573],{},[1554,2376,1570],{},[1554,2378,1638],{},[430,2380,2381],{"encoding":432},"wM_{index} = disableIndex",[378,2383,2385,2455],{"className":2384,"ariaHidden":438},[437],[378,2386,2388,2391,2394,2446,2449,2452],{"className":2387},[442],[378,2389],{"className":2390,"style":2036},[446],[378,2392,1912],{"className":2393,"style":2040},[451,1673],[378,2395,2397,2400],{"className":2396},[451],[378,2398,532],{"className":2399,"style":2047},[451,1673],[378,2401,2403],{"className":2402},[644],[378,2404,2406,2438],{"className":2405},[648,649],[378,2407,2409,2435],{"className":2408},[653],[378,2410,2412],{"className":2411,"style":2060},[657],[378,2413,2414,2417],{"style":2063},[378,2415],{"className":2416,"style":666},[665],[378,2418,2420],{"className":2419},[670,671,672,673],[378,2421,2423,2426,2429,2432],{"className":2422},[451,673],[378,2424,1732],{"className":2425},[451,1673,673],[378,2427,1573],{"className":2428},[451,1673,673],[378,2430,1570],{"className":2431},[451,1673,673],[378,2433,1638],{"className":2434},[451,1673,673],[378,2436,695],{"className":2437},[694],[378,2439,2441],{"className":2440},[653],[378,2442,2444],{"className":2443,"style":2094},[657],[378,2445],{},[378,2447],{"className":2448,"style":502},[477],[378,2450,1188],{"className":2451},[506],[378,2453],{"className":2454,"style":502},[477],[378,2456,2458,2461,2464,2467,2470,2473,2476,2479,2482,2485,2488,2491],{"className":2457},[442],[378,2459],{"className":2460,"style":548},[446],[378,2462,1573],{"className":2463},[451,1673],[378,2465,1579],{"className":2466},[451,1673],[378,2468,2005],{"className":2469},[451,1673],[378,2471,2264],{"className":2472},[451,1673],[378,2474,1584],{"className":2475,"style":1700},[451,1673],[378,2477,1570],{"className":2478},[451,1673],[378,2480,1629],{"className":2481,"style":1787},[451,1673],[378,2483,1599],{"className":2484},[451,1673],[378,2486,1573],{"className":2487},[451,1673],[378,2489,1570],{"className":2490},[451,1673],[378,2492,1638],{"className":2493},[451,1673],[280,2495,2496,2497,2499],{},"This approach ensures that wM's yield calculation accurately reflects the underlying ",[275,2498,277],{}," token's yield performance.",[270,2501,2503],{"id":2502},"yield-recipients","Yield Recipients",[280,2505,2506],{},"The wM system provides flexible options for directing claimed yield:",[1010,2508,2510],{"id":2509},"default-behavior","Default Behavior",[280,2512,2513],{},"By default, yield is claimed to the same account that generated it.",[1010,2515,2517],{"id":2516},"custom-recipients","Custom Recipients",[280,2519,2520,2521,1144],{},"Account holders can specify a different address to receive their yield by calling ",[275,2522,1113],{},[1010,2524,2526],{"id":2525},"governance-overrides","Governance Overrides",[280,2528,2529],{},"The TTG governance can set override recipients for specific accounts through the Registrar.",[1010,2531,2533],{"id":2532},"priority-order","Priority Order",[280,2535,2536],{},"When determining where to send claimed yield:",[327,2538,2539,2542,2545],{},[330,2540,2541],{},"User-specified recipient (if set)",[330,2543,2544],{},"Governance-specified override (if set)",[330,2546,2547],{},"The account itself (default)",[280,2549,2550],{},"This flexibility allows for a variety of yield utilization strategies.",[270,2552,2554],{"id":2553},"system-invariants-and-excess","System Invariants and Excess",[280,2556,2557,2558,2560],{},"The wM system is designed around a critical solvency invariant to ensure it's always fully backed by the underlying ",[275,2559,277],{},"\ntoken.",[280,2562,2563,2566,2567,2569,2570,2572],{},[352,2564,2565],{},"Balance Invariant",": The total ",[275,2568,277],{}," token balance held by the ",[275,2571,1078],{}," contract must always be greater than or\nequal to the sum of all wM tokens in circulation plus all accrued yield owed to earners.",[280,2574,2575],{},"Expressed conceptually:",[378,2577,2579],{"className":2578},[381],[378,2580,2582,2616],{"className":2581},[385],[378,2583,2585],{"className":2584},[389],[391,2586,2587],{"xmlns":393,"display":394},[396,2588,2589,2613],{},[399,2590,2591,2603,2605,2608,2610],{},[578,2592,2593,2595],{},[406,2594,582],{},[399,2596,2597,2599,2601],{},[410,2598,588],{"stretchy":587},[406,2600,591],{},[410,2602,594],{"stretchy":587},[410,2604,597],{},[406,2606,2607],{},"Total wM Supply",[410,2609,412],{},[406,2611,2612],{},"Total Accrued Yield",[430,2614,2615],{"encoding":432},"\\text{M Balance}_{(\\text{wM contract})} \\ge \\text{Total wM Supply} + \\text{Total Accrued Yield}",[378,2617,2619,2689,2710],{"className":2618,"ariaHidden":438},[437],[378,2620,2622,2625,2680,2683,2686],{"className":2621},[442],[378,2623],{"className":2624,"style":631},[446],[378,2626,2628,2634],{"className":2627},[451],[378,2629,2631],{"className":2630},[451,455],[378,2632,582],{"className":2633},[451],[378,2635,2637],{"className":2636},[644],[378,2638,2640,2672],{"className":2639},[648,649],[378,2641,2643,2669],{"className":2642},[653],[378,2644,2646],{"className":2645,"style":658},[657],[378,2647,2648,2651],{"style":661},[378,2649],{"className":2650,"style":666},[665],[378,2652,2654],{"className":2653},[670,671,672,673],[378,2655,2657,2660,2666],{"className":2656},[451,673],[378,2658,588],{"className":2659},[680,673],[378,2661,2663],{"className":2662},[451,455,673],[378,2664,591],{"className":2665},[451,673],[378,2667,594],{"className":2668},[690,673],[378,2670,695],{"className":2671},[694],[378,2673,2675],{"className":2674},[653],[378,2676,2678],{"className":2677,"style":702},[657],[378,2679],{},[378,2681],{"className":2682,"style":502},[477],[378,2684,597],{"className":2685},[506],[378,2687],{"className":2688,"style":502},[477],[378,2690,2692,2695,2701,2704,2707],{"className":2691},[442],[378,2693],{"className":2694,"style":492},[446],[378,2696,2698],{"className":2697},[451,455],[378,2699,2607],{"className":2700},[451],[378,2702],{"className":2703,"style":478},[477],[378,2705,412],{"className":2706},[482],[378,2708],{"className":2709,"style":478},[477],[378,2711,2713,2716],{"className":2712},[442],[378,2714],{"className":2715,"style":548},[446],[378,2717,2719],{"className":2718},[451,455],[378,2720,2612],{"className":2721},[451],[280,2723,2724],{},"Expressed using contract variables:",[378,2726,2728],{"className":2727},[381],[378,2729,2731,2774],{"className":2730},[385],[378,2732,2734],{"className":2733},[389],[391,2735,2736],{"xmlns":393,"display":394},[396,2737,2738,2771],{},[399,2739,2740,2752,2754],{},[578,2741,2742,2744],{},[406,2743,582],{},[399,2745,2746,2748,2750],{},[410,2747,588],{"stretchy":587},[406,2749,591],{},[410,2751,594],{"stretchy":587},[410,2753,597],{},[599,2755,2756,2768],{},[599,2757,2758,2766],{},[399,2759,2760,2762,2764],{},[406,2761,607],{},[410,2763,412],{},[406,2765,612],{},[410,2767,615],{"stretchy":438},[406,2769,2770],{},"Total wM Liabilities",[430,2772,2773],{"encoding":432},"\\text{M Balance}_{(\\text{wM contract})} \\ge \\underbrace{\\text{totalNonEarningSupply} + \\text{projectedEarningSupply}}_{\\text{Total wM Liabilities}}",[378,2775,2777,2847],{"className":2776,"ariaHidden":438},[437],[378,2778,2780,2783,2838,2841,2844],{"className":2779},[442],[378,2781],{"className":2782,"style":631},[446],[378,2784,2786,2792],{"className":2785},[451],[378,2787,2789],{"className":2788},[451,455],[378,2790,582],{"className":2791},[451],[378,2793,2795],{"className":2794},[644],[378,2796,2798,2830],{"className":2797},[648,649],[378,2799,2801,2827],{"className":2800},[653],[378,2802,2804],{"className":2803,"style":658},[657],[378,2805,2806,2809],{"style":661},[378,2807],{"className":2808,"style":666},[665],[378,2810,2812],{"className":2811},[670,671,672,673],[378,2813,2815,2818,2824],{"className":2814},[451,673],[378,2816,588],{"className":2817},[680,673],[378,2819,2821],{"className":2820},[451,455,673],[378,2822,591],{"className":2823},[451,673],[378,2825,594],{"className":2826},[690,673],[378,2828,695],{"className":2829},[694],[378,2831,2833],{"className":2832},[653],[378,2834,2836],{"className":2835,"style":702},[657],[378,2837],{},[378,2839],{"className":2840,"style":502},[477],[378,2842,597],{"className":2843},[506],[378,2845],{"className":2846,"style":502},[477],[378,2848,2850,2854],{"className":2849},[442],[378,2851],{"className":2852,"style":2853},[446],"height:2.223em;vertical-align:-1.5285em;",[378,2855,2857],{"className":2856},[724,599],[378,2858,2860,2973],{"className":2859},[648,649],[378,2861,2863,2970],{"className":2862},[653],[378,2864,2866,2883],{"className":2865,"style":548},[657],[378,2867,2868,2871],{"style":736},[378,2869],{"className":2870,"style":740},[665],[378,2872,2874],{"className":2873},[670,671,672,673],[378,2875,2877],{"className":2876},[451,673],[378,2878,2880],{"className":2879},[451,455,673],[378,2881,2770],{"className":2882},[451,673],[378,2884,2885,2888],{"style":755},[378,2886],{"className":2887,"style":740},[665],[378,2889,2891],{"className":2890},[724,599],[378,2892,2894,2962],{"className":2893},[648,649],[378,2895,2897,2959],{"className":2896},[653],[378,2898,2900,2930],{"className":2899,"style":548},[657],[378,2901,2903,2906],{"className":2902,"style":775},[774],[378,2904],{"className":2905,"style":740},[665],[378,2907,2909,2916,2923],{"className":2908,"style":783},[782],[378,2910,2912],{"className":2911,"style":788},[787],[790,2913,2914],{"xmlns":792,"width":793,"height":794,"viewBox":795,"preserveAspectRatio":796},[798,2915],{"d":800},[378,2917,2919],{"className":2918,"style":788},[804],[790,2920,2921],{"xmlns":792,"width":793,"height":794,"viewBox":795,"preserveAspectRatio":807},[798,2922],{"d":810},[378,2924,2926],{"className":2925,"style":788},[814],[790,2927,2928],{"xmlns":792,"width":793,"height":794,"viewBox":795,"preserveAspectRatio":817},[798,2929],{"d":820},[378,2931,2932,2935],{"style":755},[378,2933],{"className":2934,"style":740},[665],[378,2936,2938,2944,2947,2950,2953],{"className":2937},[451],[378,2939,2941],{"className":2940},[451,455],[378,2942,607],{"className":2943},[451],[378,2945],{"className":2946,"style":478},[477],[378,2948,412],{"className":2949},[482],[378,2951],{"className":2952,"style":478},[477],[378,2954,2956],{"className":2955},[451,455],[378,2957,612],{"className":2958},[451],[378,2960,695],{"className":2961},[694],[378,2963,2965],{"className":2964},[653],[378,2966,2968],{"className":2967,"style":859},[657],[378,2969],{},[378,2971,695],{"className":2972},[694],[378,2974,2976],{"className":2975},[653],[378,2977,2980],{"className":2978,"style":2979},[657],"height:1.5285em;",[378,2981],{},[280,2983,2984],{},[352,2985,2986],{},"How the Invariant is Maintained:",[280,2988,1056,2989,2992,2993,2995,2996,2998,2999,3001,3002,3004,3005],{},[275,2990,2991],{},"M Balance"," held by the ",[275,2994,1078],{}," contract is not static. Since the ",[275,2997,1078],{}," contract itself\nis registered as an ",[275,3000,277],{}," earner (as shown in the ",[275,3003,277],{}," dashboard where the wM contract is the largest holder), ",[352,3006,3007,3008,3010,3011,3013],{},"the\nunderlying ",[275,3009,277],{}," tokens it holds continuously accrue yield according to the ",[275,3012,277],{}," token's rebasing mechanism.",[280,3015,3016,3017,3020,3021,3023,3024,3026],{},"This intrinsic yield generation on the ",[1089,3018,3019],{},"entire"," pool of ",[275,3022,277],{}," tokens held within the wM contract is fundamental to\nmaintaining the solvency invariant. It ensures the ",[275,3025,277],{}," balance grows naturally over time, actively keeping assets (M\nheld) ahead of liabilities (wM supply + accrued yield).",[280,3028,3029],{},[352,3030,3031],{},"Excess Reserves:",[280,3033,3034,3035,3037,3038,3041,3042,3045],{},"The difference between the actual ",[275,3036,2991],{}," held by the contract and the total calculated liabilities\n(",[275,3039,3040],{},"totalNonEarningSupply + projectedEarningSupply",") constitutes the ",[352,3043,3044],{},"\"excess\""," reserves within the system. This excess\nprimarily accumulates from two sources explained further below:",[327,3047,3048,3058],{},[330,3049,3050,3051,3053,3054,3057],{},"The yield generated by the underlying ",[275,3052,277],{}," tokens that back the balances of ",[352,3055,3056],{},"non-earning"," wM holders (as this yield\nisn't owed back to them).",[330,3059,3060],{},"Minor positive rounding effects during various token operations (transfers, wrapping\u002Funwrapping, starting\u002Fstopping\nearning).",[280,3062,3063],{},"This invariant and the resulting excess ensure that the system remains fully solvent, can always honor unwrap requests,\nand captures additional value for the protocol ecosystem.",[266,3065,3067],{"id":3066},"features-and-operations","Features and Operations",[270,3069,3071],{"id":3070},"basic-token-operations","Basic Token Operations",[1010,3073,3075,3076,3078],{"id":3074},"wrapping-m-to-wm","Wrapping ",[275,3077,277],{}," to wM",[280,3080,3081,3082,3084],{},"Users can deposit ",[275,3083,277],{}," tokens to receive an equivalent amount of wM:",[3086,3087,3092],"pre",{"className":3088,"code":3089,"language":3090,"meta":3091,"style":3091},"language-solidity shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","wrap(recipient, amount)\n","solidity","",[275,3093,3094],{"__ignoreMap":3091},[378,3095,3098],{"class":3096,"line":3097},"line",1,[378,3099,3089],{},[280,3101,3102,3103,3105],{},"The ",[275,3104,277],{}," tokens are held by the wM contract and can potentially earn yield.",[1010,3107,3109],{"id":3108},"unwrapping-wm-to-m","Unwrapping wM to M",[280,3111,3112],{},"Users can burn wM tokens to receive the equivalent amount of M:",[3086,3114,3116],{"className":3088,"code":3115,"language":3090,"meta":3091,"style":3091},"unwrap(recipient, amount)\n",[275,3117,3118],{"__ignoreMap":3091},[378,3119,3120],{"class":3096,"line":3097},[378,3121,3115],{},[280,3123,3124],{},"Any accrued yield remains in the user's wM balance if they're in earning mode.",[1010,3126,3128],{"id":3127},"gasless-operations","Gasless Operations",[280,3130,3131],{},"The contract supports wrapping with permits for improved UX:",[3086,3133,3135],{"className":3088,"code":3134,"language":3090,"meta":3091,"style":3091},"wrapWithPermit(recipient, amount, deadline, signature)\n",[275,3136,3137],{"__ignoreMap":3091},[378,3138,3139],{"class":3096,"line":3097},[378,3140,3134],{},[1010,3142,3144],{"id":3143},"standard-erc-20-operations","Standard ERC-20 Operations",[280,3146,3147],{},"All standard ERC-20 functions are supported, including:",[347,3149,3150,3155,3160,3165],{},[330,3151,3152],{},[275,3153,3154],{},"transfer(to, amount)",[330,3156,3157],{},[275,3158,3159],{},"transferFrom(from, to, amount)",[330,3161,3162],{},[275,3163,3164],{},"approve(spender, amount)",[330,3166,3167],{},[275,3168,3169],{},"balanceOf(account)",[270,3171,3173],{"id":3172},"earning-management","Earning Management",[1010,3175,3177],{"id":3176},"starting-to-earn","Starting to Earn",[280,3179,3180],{},"Approved accounts can activate earning status:",[3086,3182,3184],{"className":3088,"code":3183,"language":3090,"meta":3091,"style":3091},"startEarningFor(account)\n",[275,3185,3186],{"__ignoreMap":3091},[378,3187,3188],{"class":3096,"line":3097},[378,3189,3183],{},[280,3191,3192],{},"This converts their balance to a principal amount that will begin accruing yield.",[1010,3194,3196],{"id":3195},"stopping-earning","Stopping Earning",[280,3198,3199],{},"Accounts can deactivate earning status (or anyone can do this for an account that's no longer approved):",[3086,3201,3203],{"className":3088,"code":3202,"language":3090,"meta":3091,"style":3091},"stopEarningFor(account)\n",[275,3204,3205],{"__ignoreMap":3091},[378,3206,3207],{"class":3096,"line":3097},[378,3208,3202],{},[280,3210,3211],{},"This claims any outstanding yield and converts the balance back to non-earning.",[1010,3213,3215],{"id":3214},"global-earning-status","Global Earning Status",[280,3217,3218,3219,3221],{},"The wM contract itself must be an approved earner in the ",[275,3220,277],{}," token system. Earning can be enabled or disabled for the\nentire system:",[3086,3223,3225],{"className":3088,"code":3224,"language":3090,"meta":3091,"style":3091},"enableEarning()\ndisableEarning()\n",[275,3226,3227,3232],{"__ignoreMap":3091},[378,3228,3229],{"class":3096,"line":3097},[378,3230,3231],{},"enableEarning()\n",[378,3233,3235],{"class":3096,"line":3234},2,[378,3236,3237],{},"disableEarning()\n",[280,3239,3240],{},"A key improvement in wM v2 is the ability to re-enable earning after it has been disabled.",[270,3242,3244],{"id":3243},"yield-management","Yield Management",[1010,3246,3248],{"id":3247},"claiming-yield","Claiming Yield",[280,3250,3251],{},"Accrued yield can be claimed at any time:",[3086,3253,3255],{"className":3088,"code":3254,"language":3090,"meta":3091,"style":3091},"claimFor(account)\n",[275,3256,3257],{"__ignoreMap":3091},[378,3258,3259],{"class":3096,"line":3097},[378,3260,3254],{},[280,3262,3263],{},"This increases the account's wM balance by the yielded amount and triggers appropriate transfers based on recipient\nsettings.",[1010,3265,3267],{"id":3266},"setting-claim-recipients","Setting Claim Recipients",[280,3269,3270],{},"Users can direct their yield to another address:",[3086,3272,3274],{"className":3088,"code":3273,"language":3090,"meta":3091,"style":3091},"setClaimRecipient(recipient)\n",[275,3275,3276],{"__ignoreMap":3091},[378,3277,3278],{"class":3096,"line":3097},[378,3279,3273],{},[280,3281,3282],{},"This allows for flexible yield strategies without changing the underlying balance.",[1010,3284,3286],{"id":3285},"checking-accrued-yield","Checking Accrued Yield",[280,3288,3289,3290,3293],{},"Several view functions allow users and integrations to check the yield that has accrued for an earning account but has\n",[352,3291,3292],{},"not yet been claimed",":",[347,3295,3296,3330],{},[330,3297,3298,3301,3302],{},[275,3299,3300],{},"accruedYieldOf(account)",":\n",[347,3303,3304,3316,3327],{},[330,3305,3306,3307,3309,3310,3312,3313,1144],{},"Returns the amount of wM tokens earned as yield based on the account's ",[275,3308,1143],{}," and the time elapsed\n(represented by the increase in the ",[275,3311,1160],{},") ",[352,3314,3315],{},"since the last claim or since earning started",[330,3317,3318,3319,3322,3323,3326],{},"This represents ",[352,3320,3321],{},"only the unclaimed portion"," of the yield. It does ",[1089,3324,3325],{},"not"," include yield that has already been\nclaimed and added to the balance.",[330,3328,3329],{},"If the account is not in Earning Mode, this returns 0.",[330,3331,3332,3301,3335],{},[275,3333,3334],{},"balanceWithYieldOf(account)",[347,3336,3337,3351],{},[330,3338,3339,3340,3343,3344,3347,3348,1144],{},"Returns the sum of the account's current stored ",[275,3341,3342],{},"balanceOf"," ",[352,3345,3346],{},"plus"," the currently claimable ",[275,3349,3350],{},"accruedYieldOf",[330,3352,3353,3354,3357,3358,3361],{},"This function effectively shows the total wM value attributable to the account ",[1089,3355,3356],{},"at that moment",", representing what\nthe balance ",[1089,3359,3360],{},"would be"," if the accrued yield were claimed instantly (before considering any fees or alternate claim\nrecipients).",[280,3363,3364,3367,3368,3371,3372,3374,3375,3377,3378,3381,3382,3384,3385,3387],{},[352,3365,3366],{},"Effect of Claiming:"," When ",[275,3369,3370],{},"claimFor(account)"," is successfully executed, the calculated accrued yield is processed. If\nthe yield (net of fees) is directed to the account owner, their stored ",[275,3373,3342],{}," increases. Consequently, immediately\nafter a claim, ",[275,3376,3350],{}," will return 0 (or a negligible amount due to block timing), as the yield is no longer\n\"accrued but unclaimed\". ",[275,3379,3380],{},"balanceWithYieldOf"," will then equal ",[275,3383,3342],{},". New yield will start accumulating again as\ntime passes and the ",[275,3386,1160],{}," increases further.",[270,3389,3391],{"id":3390},"excess-management-value-capture","Excess Management & Value Capture",[280,3393,3394,3397,3398,3400,3401,3404,3405,3407,3408,3410,3411,3413,3414,3416],{},[352,3395,3396],{},"Concept:"," The wM contract holds underlying ",[275,3399,277],{}," tokens. Because the wM contract itself earns yield on ",[1089,3402,3403],{},"all"," these ",[275,3406,277],{},"\ntokens, but wM yield is only accrued for ",[1089,3409,1030],{}," wM holders, a surplus (or \"excess\") of ",[275,3412,277],{}," tokens naturally\naccumulates within the contract over time. This primarily comes from the ",[275,3415,277],{}," yield earned on tokens backing non-earning\nwM balances.",[3418,3419,3420],"note",{},[280,3421,3422,3423,3425],{},"M and WrappedM are sharing the same Earners list. An earner of ",[275,3424,277],{}," is an\nearner of WrappedM.",[280,3427,3428,3431,3432,3435],{},[352,3429,3430],{},"Claiming Excess:"," This accumulated excess M, representing value captured by the protocol, can be claimed and\ntransferred out using the ",[275,3433,3434],{},"claimExcess()"," function.",[3086,3437,3439],{"className":3088,"code":3438,"language":3090,"meta":3091,"style":3091},"claimExcess() returns (uint240 claimed_)\n",[275,3440,3441],{"__ignoreMap":3091},[378,3442,3443],{"class":3096,"line":3097},[378,3444,3438],{},[280,3446,3447,3450,3451,3453],{},[352,3448,3449],{},"Destination:"," The excessDestination address, set during deployment, receives these claimed tokens. Typically, this is\nthe ",[352,3452,192],{},", directing this value back to the protocol ecosystem and ultimately benefiting Zero token\nholders.",[270,3455,3457],{"id":3456},"admin-operations-via-earnermanager","Admin Operations via EarnerManager",[280,3459,3460],{},"The EarnerManager contract empowers designated admins ('special users') with the delegated authority to approve wM\nearners, managing status for potentially many accounts outside the standard governance process.",[1010,3462,3464],{"id":3463},"setting-earner-status","Setting Earner Status",[280,3466,3467],{},"Admins can enable accounts for earning and set fee rates:",[3086,3469,3473],{"className":3470,"code":3472,"language":455},[3471],"language-text","setEarnerDetails(account, status, feeRate)\n",[275,3474,3472],{"__ignoreMap":3091},[1010,3476,3478],{"id":3477},"bulk-operations","Bulk Operations",[280,3480,3481],{},"Multiple accounts can be managed in a single transaction:",[3086,3483,3486],{"className":3484,"code":3485,"language":455},[3471],"setEarnerDetails(accounts[], statuses[], feeRates[])\n",[275,3487,3485],{"__ignoreMap":3091},[1010,3489,3491],{"id":3490},"checking-earner-status","Checking Earner Status",[280,3493,3494],{},"Various functions provide information about earner status:",[3086,3496,3499],{"className":3497,"code":3498,"language":455},[3471],"earnerStatusFor(account)\ngetEarnerDetails(account)\n",[275,3500,3498],{"__ignoreMap":3091},[266,3502,3504],{"id":3503},"technical-design","Technical Design",[270,3506,3508],{"id":3507},"account-model","Account Model",[280,3510,3511],{},"The wM contract uses a sophisticated account model to efficiently track balances and yield information:",[3086,3513,3515],{"className":3088,"code":3514,"language":3090,"meta":3091,"style":3091},"struct Account {\n    bool isEarning;         \u002F\u002F Whether the account is in earning mode\n    uint240 balance;        \u002F\u002F Current token balance (excluding yield)\n    uint112 earningPrincipal; \u002F\u002F Principal amount for earning accounts\n    bool hasClaimRecipient; \u002F\u002F Whether a custom recipient is set\n    bool hasEarnerDetails;  \u002F\u002F Whether admin fee settings exist\n}\n",[275,3516,3517,3522,3527,3533,3539,3545,3551],{"__ignoreMap":3091},[378,3518,3519],{"class":3096,"line":3097},[378,3520,3521],{},"struct Account {\n",[378,3523,3524],{"class":3096,"line":3234},[378,3525,3526],{},"    bool isEarning;         \u002F\u002F Whether the account is in earning mode\n",[378,3528,3530],{"class":3096,"line":3529},3,[378,3531,3532],{},"    uint240 balance;        \u002F\u002F Current token balance (excluding yield)\n",[378,3534,3536],{"class":3096,"line":3535},4,[378,3537,3538],{},"    uint112 earningPrincipal; \u002F\u002F Principal amount for earning accounts\n",[378,3540,3542],{"class":3096,"line":3541},5,[378,3543,3544],{},"    bool hasClaimRecipient; \u002F\u002F Whether a custom recipient is set\n",[378,3546,3548],{"class":3096,"line":3547},6,[378,3549,3550],{},"    bool hasEarnerDetails;  \u002F\u002F Whether admin fee settings exist\n",[378,3552,3554],{"class":3096,"line":3553},7,[378,3555,3556],{},"}\n",[280,3558,3559],{},"This structure packs related data together to minimize storage costs while maintaining all necessary information for the\ndual-mode system.",[270,3561,3563],{"id":3562},"principal-based-accounting","Principal-Based Accounting",[280,3565,3566],{},"A key aspect of wM's design is its principal-based accounting system for earning accounts:",[1010,3568,3570],{"id":3569},"principal-conversions","Principal Conversions",[280,3572,3573],{},"When an account starts earning, its balance is converted to a principal amount:",[3086,3575,3578],{"className":3576,"code":3577,"language":455},[3471],"principal = balance \u002F currentIndex (rounded down)\n",[275,3579,3577],{"__ignoreMap":3091},[280,3581,3582],{},"This principal remains constant while the account is earning, while its value in tokens grows with the index.",[1010,3584,3586],{"id":3585},"present-value-calculation","Present Value Calculation",[280,3588,3589],{},"The current token value of a principal is:",[3086,3591,3594],{"className":3592,"code":3593,"language":455},[3471],"presentValue = principal * currentIndex\n",[275,3595,3593],{"__ignoreMap":3091},[280,3597,3598],{},"This calculation is used when checking balances and claiming yield.",[1010,3600,3602],{"id":3601},"rounding-strategy","Rounding Strategy",[280,3604,3605],{},"The contract employs consistent rounding rules:",[347,3607,3608,3611,3614],{},[330,3609,3610],{},"When converting from tokens to principal (adding to earning), principal is rounded DOWN",[330,3612,3613],{},"When calculating present value (for balance displays), the value is exact",[330,3615,3616],{},"When subtracting from earning accounts, principal is rounded UP",[280,3618,3619],{},"These rules slightly favor the protocol, creating a small buffer of excess tokens that enhances stability.",[270,3621,3623],{"id":3622},"supply-tracking","Supply Tracking",[280,3625,3626],{},"The contract maintains precise tracking of token supply:",[347,3628,3629,3634,3640,3646,3652],{},[330,3630,3631,3633],{},[275,3632,607],{},": Sum of all non-earning account balances",[330,3635,3636,3639],{},[275,3637,3638],{},"totalEarningSupply",": Sum of all earning account balances (excluding accrued yield)",[330,3641,3642,3645],{},[275,3643,3644],{},"totalEarningPrincipal",": Sum of all earning account principals",[330,3647,3648,3649],{},"Total supply = ",[275,3650,3651],{},"totalNonEarningSupply + totalEarningSupply",[330,3653,3654,3656],{},[275,3655,612],{},": The total earning supply if all accrued yield was claimed",[280,3658,3659],{},"These values are used for various calculations, including excess determination.",[270,3661,3663],{"id":3662},"transfer-mechanics","Transfer Mechanics",[280,3665,3666],{},"The transfer system handles different scenarios based on account earning status:",[1010,3668,3670],{"id":3669},"same-status-transfers","Same Status Transfers",[347,3672,3673,3676],{},[330,3674,3675],{},"Between earning accounts: Converts the amount to principal using the current index",[330,3677,3678],{},"Between non-earning accounts: Simple balance transfers without conversion",[1010,3680,3682],{"id":3681},"cross-status-transfers","Cross-Status Transfers",[347,3684,3685,3688,3691],{},[330,3686,3687],{},"From earning to non-earning: Converts from principal to tokens",[330,3689,3690],{},"From non-earning to earning: Converts from tokens to principal",[330,3692,3693],{},"Affects total earning and non-earning supply tracking",[280,3695,3696],{},"Each transfer type ensures that exact token amounts move between accounts while maintaining proper accounting in the\nappropriate mode.",[270,3698,3700],{"id":3699},"fee-mechanism","Fee Mechanism",[280,3702,3703],{},"When enabled by an admin through the EarnerManager, fees can be taken from yield:",[347,3705,3706,3709,3712,3715],{},[330,3707,3708],{},"Fees are a percentage (in basis points, max 10,000) of claimed yield",[330,3710,3711],{},"Fee amounts are transferred to the admin who approved the account",[330,3713,3714],{},"If an admin is removed from the admin list, their fee settings become invalid",[330,3716,3717],{},"Fees are processed during the claim operation",[280,3719,3720],{},"This creates an incentive for admins to onboard and manage accounts in the system.",[270,3722,3724],{"id":3723},"excess-mechanism","Excess Mechanism",[280,3726,3102,3727,3729,3730,3732,3733,3735,3736,3739],{},[275,3728,1078],{}," (wM) contract is designed to naturally accumulate \"excess\" ",[275,3731,277],{}," tokens over time. This excess\nrepresents the ",[275,3734,277],{}," tokens held by the contract ",[1089,3737,3738],{},"above and beyond"," what is required to fully back all circulating wM\ntokens and their accrued yield entitlements. This mechanism enhances system stability and creates a value capture\nopportunity for the protocol.",[280,3741,3742],{},[352,3743,3744],{},"Core Principle: Yield Mismatch",[280,3746,3747],{},"The fundamental driver of excess accumulation stems from a mismatch in yield earning:",[327,3749,3750,3783],{},[330,3751,3752,3758,3759,3761,3762,3765,3766,3769,3770,3779,3780,3782],{},[352,3753,3754,3755,3757],{},"wM Contract Earns ",[275,3756,277],{}," Yield:"," As confirmed by its status as a major ",[275,3760,277],{}," holder and its requirement to be an approved\nM earner (",[275,3763,3764],{},"enableEarning"," requires ",[275,3767,3768],{},"_isThisApprovedEarner","), the ",[352,3771,3772,3773,3775,3776,3778],{},"entire balance of ",[275,3774,277],{}," tokens held within the\n",[275,3777,1078],{}," contract continuously earns yield"," according to the ",[275,3781,277],{}," token's native rebasing mechanism.",[330,3784,3785,3788,3789,3791,3792,3794],{},[352,3786,3787],{},"Not All wM Holders Earn wM Yield:"," However, only wM holders whose accounts are explicitly set to ",[352,3790,1031],{},"\n(via Governance or EarnerManager approval) accrue a corresponding claimable wM yield entitlement based on their\nprincipal. Holders in ",[352,3793,1013],{}," do not accrue wM yield.",[280,3796,3797],{},[352,3798,3799],{},"Sources of Excess Accumulation:",[280,3801,3802,3803,3805],{},"The excess ",[275,3804,277],{}," balance primarily grows from:",[327,3807,3808,3826,3845,3863],{},[330,3809,3810,3816,3817,3819,3820,3822,3823,3825],{},[352,3811,3812,3813,3815],{},"Yield on ",[275,3814,277],{}," Backing Non-Earning wM (Primary Source):"," The ",[275,3818,277],{}," yield generated by the portion of ",[275,3821,277],{}," tokens backing\nthe wM held by users in Non-Earning Mode directly contributes to the excess. Since these users aren't entitled to wM\nyield, the ",[275,3824,277],{}," yield earned on their underlying share remains within the contract as surplus.",[330,3827,3828,3831,3832,3835,3836,3835,3839,3835,3841,3844],{},[352,3829,3830],{},"Rounding Effects during Principal Conversions (Secondary Source & Potential Deficit):"," The contract utilizes\nprincipal-based accounting for earners, requiring conversions between token amounts and principal values whenever\nbalances change (e.g., ",[275,3833,3834],{},"wrap",", ",[275,3837,3838],{},"unwrap",[275,3840,1139],{},[275,3842,3843],{},"stopEarningFor",", cross-status transfers).",[330,3846,3847,3853,3854,3856,3857,3859,3860,3862],{},[352,3848,3849,3850,3852],{},"Direct ",[275,3851,277],{}," Transfers:"," Any ",[275,3855,277],{}," tokens sent directly to the ",[275,3858,1078],{}," contract address (outside the ",[275,3861,3834],{},"\nfunction) also become part of the excess.",[330,3864,3865,3868],{},[352,3866,3867],{},"Cross-Status Transfers:"," The mechanics of transfers between earning and non-earning accounts can also contribute\nminor gains due to the specific rounding applied during the principal conversions involved.",[280,3870,3871],{},[352,3872,3873],{},"Calculating Excess:",[280,3875,3876,3877,3880],{},"The contract calculates the available excess using the ",[275,3878,3879],{},"excess()"," view function:",[378,3882,3884],{"className":3883},[381],[378,3885,3887,3946],{"className":3886},[385],[378,3888,3890],{"className":3889},[389],[391,3891,3892],{"xmlns":393,"display":394},[396,3893,3894,3943],{},[399,3895,3896,3909,3911,3923,3925],{},[578,3897,3898,3901],{},[406,3899,3900],{},"Excess",[399,3902,3903,3905,3907],{},[410,3904,588],{"stretchy":587},[406,3906,591],{},[410,3908,594],{"stretchy":587},[410,3910,1188],{},[578,3912,3913,3915],{},[406,3914,582],{},[399,3916,3917,3919,3921],{},[410,3918,588],{"stretchy":587},[406,3920,591],{},[410,3922,594],{"stretchy":587},[410,3924,1290],{},[599,3926,3927,3941],{},[599,3928,3929,3939],{},[399,3930,3931,3934,3936],{},[406,3932,3933],{},"(totalNonEarningSupply",[410,3935,412],{},[406,3937,3938],{},"ProjectedEarningSupply)",[410,3940,615],{"stretchy":438},[406,3942,2770],{},[430,3944,3945],{"encoding":432},"\\text{Excess}_{(\\text{wM contract})} = \\text{M Balance}_{(\\text{wM contract})} - \\underbrace{\\text{(totalNonEarningSupply} + \\text{ProjectedEarningSupply)}}_{\\text{Total wM Liabilities}}",[378,3947,3949,4020,4090],{"className":3948,"ariaHidden":438},[437],[378,3950,3952,3956,4011,4014,4017],{"className":3951},[442],[378,3953],{"className":3954,"style":3955},[446],"height:1.0385em;vertical-align:-0.3552em;",[378,3957,3959,3965],{"className":3958},[451],[378,3960,3962],{"className":3961},[451,455],[378,3963,3900],{"className":3964},[451],[378,3966,3968],{"className":3967},[644],[378,3969,3971,4003],{"className":3970},[648,649],[378,3972,3974,4000],{"className":3973},[653],[378,3975,3977],{"className":3976,"style":658},[657],[378,3978,3979,3982],{"style":661},[378,3980],{"className":3981,"style":666},[665],[378,3983,3985],{"className":3984},[670,671,672,673],[378,3986,3988,3991,3997],{"className":3987},[451,673],[378,3989,588],{"className":3990},[680,673],[378,3992,3994],{"className":3993},[451,455,673],[378,3995,591],{"className":3996},[451,673],[378,3998,594],{"className":3999},[690,673],[378,4001,695],{"className":4002},[694],[378,4004,4006],{"className":4005},[653],[378,4007,4009],{"className":4008,"style":702},[657],[378,4010],{},[378,4012],{"className":4013,"style":502},[477],[378,4015,1188],{"className":4016},[506],[378,4018],{"className":4019,"style":502},[477],[378,4021,4023,4026,4081,4084,4087],{"className":4022},[442],[378,4024],{"className":4025,"style":631},[446],[378,4027,4029,4035],{"className":4028},[451],[378,4030,4032],{"className":4031},[451,455],[378,4033,582],{"className":4034},[451],[378,4036,4038],{"className":4037},[644],[378,4039,4041,4073],{"className":4040},[648,649],[378,4042,4044,4070],{"className":4043},[653],[378,4045,4047],{"className":4046,"style":658},[657],[378,4048,4049,4052],{"style":661},[378,4050],{"className":4051,"style":666},[665],[378,4053,4055],{"className":4054},[670,671,672,673],[378,4056,4058,4061,4067],{"className":4057},[451,673],[378,4059,588],{"className":4060},[680,673],[378,4062,4064],{"className":4063},[451,455,673],[378,4065,591],{"className":4066},[451,673],[378,4068,594],{"className":4069},[690,673],[378,4071,695],{"className":4072},[694],[378,4074,4076],{"className":4075},[653],[378,4077,4079],{"className":4078,"style":702},[657],[378,4080],{},[378,4082],{"className":4083,"style":478},[477],[378,4085,1290],{"className":4086},[482],[378,4088],{"className":4089,"style":478},[477],[378,4091,4093,4097],{"className":4092},[442],[378,4094],{"className":4095,"style":4096},[446],"height:2.3341em;vertical-align:-1.5841em;",[378,4098,4100],{"className":4099},[724,599],[378,4101,4103,4220],{"className":4102},[648,649],[378,4104,4106,4217],{"className":4105},[653],[378,4107,4110,4128],{"className":4108,"style":4109},[657],"height:0.75em;",[378,4111,4113,4116],{"style":4112},"top:-1.4159em;",[378,4114],{"className":4115,"style":740},[665],[378,4117,4119],{"className":4118},[670,671,672,673],[378,4120,4122],{"className":4121},[451,673],[378,4123,4125],{"className":4124},[451,455,673],[378,4126,2770],{"className":4127},[451,673],[378,4129,4130,4133],{"style":755},[378,4131],{"className":4132,"style":740},[665],[378,4134,4136],{"className":4135},[724,599],[378,4137,4139,4208],{"className":4138},[648,649],[378,4140,4142,4205],{"className":4141},[653],[378,4143,4145,4176],{"className":4144,"style":4109},[657],[378,4146,4149,4152],{"className":4147,"style":4148},[774],"top:-2.102em;",[378,4150],{"className":4151,"style":740},[665],[378,4153,4155,4162,4169],{"className":4154,"style":783},[782],[378,4156,4158],{"className":4157,"style":788},[787],[790,4159,4160],{"xmlns":792,"width":793,"height":794,"viewBox":795,"preserveAspectRatio":796},[798,4161],{"d":800},[378,4163,4165],{"className":4164,"style":788},[804],[790,4166,4167],{"xmlns":792,"width":793,"height":794,"viewBox":795,"preserveAspectRatio":807},[798,4168],{"d":810},[378,4170,4172],{"className":4171,"style":788},[814],[790,4173,4174],{"xmlns":792,"width":793,"height":794,"viewBox":795,"preserveAspectRatio":817},[798,4175],{"d":820},[378,4177,4178,4181],{"style":755},[378,4179],{"className":4180,"style":740},[665],[378,4182,4184,4190,4193,4196,4199],{"className":4183},[451],[378,4185,4187],{"className":4186},[451,455],[378,4188,3933],{"className":4189},[451],[378,4191],{"className":4192,"style":478},[477],[378,4194,412],{"className":4195},[482],[378,4197],{"className":4198,"style":478},[477],[378,4200,4202],{"className":4201},[451,455],[378,4203,3938],{"className":4204},[451],[378,4206,695],{"className":4207},[694],[378,4209,4211],{"className":4210},[653],[378,4212,4215],{"className":4213,"style":4214},[657],"height:0.898em;",[378,4216],{},[378,4218,695],{"className":4219},[694],[378,4221,4223],{"className":4222},[653],[378,4224,4227],{"className":4225,"style":4226},[657],"height:1.5841em;",[378,4228],{},[280,4230,4231],{},[352,4232,4233],{},"Excess Management:",[280,4235,4236,4237,4239,4240,4242,4243,4246,4247,4249],{},"The accumulated excess ",[275,4238,277],{}," tokens can be claimed and transferred out of the contract via the ",[275,4241,3434],{}," function.\nThe ",[275,4244,4245],{},"excessDestination"," is set during deployment and typically points to the ",[352,4248,192],{},", creating a revenue\nstream for the broader protocol ecosystem, ultimately benefiting Zero token holders.",[266,4251,4253],{"id":4252},"integration-considerations","Integration Considerations",[270,4255,4257],{"id":4256},"for-defi-protocols","For DeFi Protocols",[280,4259,4260],{},"When integrating with wM, protocols should be aware of:",[347,4262,4263,4266,4269,4272],{},[330,4264,4265],{},"Standard ERC-20 behavior (no rebasing)",[330,4267,4268],{},"Distinction between balance and balance-with-yield",[330,4270,4271],{},"Impact of earning status on user experience",[330,4273,4274],{},"Potential for yield to accumulate while tokens are locked",[270,4276,4278],{"id":4277},"for-developers","For Developers",[280,4280,4281],{},"Developers working with wM should understand:",[347,4283,4284,4289,4292,4295],{},[330,4285,4286,4287,364],{},"The relationship between wM and the underlying ",[275,4288,277],{},[330,4290,4291],{},"The impact of earning status on token accounting",[330,4293,4294],{},"The claiming process and its effect on balances",[330,4296,4297],{},"The consistent rounding patterns used throughout the contract",[270,4299,4301],{"id":4300},"common-patterns","Common Patterns",[280,4303,4304],{},"Several patterns are recommended when working with wM:",[347,4306,4307,4318,4324,4327],{},[330,4308,4309,4310,4313,4314,4317],{},"Check both ",[275,4311,4312],{},"balanceOf()"," and ",[275,4315,4316],{},"balanceWithYieldOf()"," to understand a user's position",[330,4319,4320,4321,4323],{},"Consider calling ",[275,4322,1494],{}," before critical operations to ensure balances reflect all value",[330,4325,4326],{},"Be aware of the impact of earning status transitions on token amounts",[330,4328,4329],{},"Understand the priority order for claim recipients when handling claimed yield",[266,4331,4333],{"id":4332},"security-considerations","Security Considerations",[270,4335,4337],{"id":4336},"trust-model","Trust Model",[280,4339,4340],{},"The wM system operates with several trust assumptions:",[347,4342,4343,4349,4355,4361,4367],{},[330,4344,4345,4348],{},[352,4346,4347],{},"MigrationAdmin",": Fully trusted role that can change contract implementation",[330,4350,4351,4354],{},[352,4352,4353],{},"EarnerManager MigrationAdmin",": Can change EarnerManager implementation",[330,4356,4357,4360],{},[352,4358,4359],{},"Registrar",": Source of truth for system parameters",[330,4362,4363,4366],{},[352,4364,4365],{},"MToken",": Assumed to function correctly",[330,4368,4369,4372],{},[352,4370,4371],{},"Admins",": Trusted to manage earning status appropriately",[270,4374,4376],{"id":4375},"edge-cases","Edge Cases",[280,4378,4379],{},"Several edge cases are worth understanding:",[1010,4381,4383],{"id":4382},"admin-removal","Admin Removal",[280,4385,4386],{},"If an admin is removed from the admins list:",[347,4388,4389,4392,4395],{},[330,4390,4391],{},"Accounts they approved lose earning status",[330,4393,4394],{},"Their fee settings become invalid",[330,4396,4397],{},"Accounts should be stopped from earning to prevent further yield accrual",[1010,4399,4401],{"id":4400},"disabled-earning","Disabled Earning",[280,4403,4404],{},"If the wrapper contract is removed from M's earner list:",[347,4406,4407,4413],{},[330,4408,4409,4412],{},[275,4410,4411],{},"disableEarning()"," should be called to prevent further yield accrual",[330,4414,4415],{},"Individual accounts can continue to earn until that point",[1010,4417,4419],{"id":4418},"balance-precision","Balance Precision",[280,4421,4422],{},"The system has specific precision limitations:",[347,4424,4425,4430,4433],{},[330,4426,4427,4428,364],{},"All balances limited to uint240 to match ",[275,4429,277],{},[330,4431,4432],{},"Principal amounts limited to uint112 for gas efficiency",[330,4434,4435],{},"Indices use uint128 with 12 decimal places of precision",[270,4437,4439],{"id":4438},"rounding-effects","Rounding Effects",[280,4441,4442],{},"The consistent rounding strategy creates specific effects:",[347,4444,4445,4448,4451],{},[330,4446,4447],{},"Multiple conversions between earning and non-earning states will result in small token losses",[330,4449,4450],{},"Transfers between accounts with different earning statuses create small protocol gains",[330,4452,4453],{},"These tiny amounts accumulate as protocol reserves, enhancing stability",[266,4455,4457],{"id":4456},"upgrades-and-migration","Upgrades and Migration",[270,4459,4461],{"id":4460},"key-improvements-in-v2","Key Improvements in V2",[280,4463,282,4464,4466,4467,4469],{},[275,4465,277],{}," (wM) fundamentally operates as a non-rebasing token where yield is realized through manual claiming, a\ncharacteristic distinct from the native ",[275,4468,277],{}," token's automatic rebasing. The V2 implementation builds upon this\nestablished model with several important enhancements:",[327,4471,4472,4478,4484,4489,4494,4500],{},[330,4473,4474,4477],{},[352,4475,4476],{},"Re-enabling Earning",": V2 allows earning to be re-enabled after being disabled",[330,4479,4480,4483],{},[352,4481,4482],{},"Admin-Managed Earners",": Introduction of EarnerManager for delegated administration",[330,4485,4486,4488],{},[352,4487,3700],{},": Ability for admins to take fees from yield",[330,4490,4491,4493],{},[352,4492,3563],{},": Changed from lastIndex tracking to principal amount tracking",[330,4495,4496,4499],{},[352,4497,4498],{},"Explicit Claim Recipients",": Added ability for users to explicitly set yield recipients",[330,4501,4502,4505],{},[352,4503,4504],{},"Gas Efficiency",": Optimized storage layout and operations",[270,4507,4509],{"id":4508},"migration-from-v1","Migration from V1",[280,4511,4512],{},"The migration from V1 to V2 involved several key transformations:",[1010,4514,4516],{"id":4515},"account-model-change","Account Model Change",[347,4518,4519,4522,4525],{},[330,4520,4521],{},"V1: Used last interaction index for earning accounts",[330,4523,4524],{},"V2: Uses principal amount for earning accounts",[330,4526,4527,4528],{},"Migration formula: ",[275,4529,4530],{},"principal = balance \u002F lastIndex",[1010,4532,4534],{"id":4533},"index-handling","Index Handling",[347,4536,4537,4540,4543],{},[330,4538,4539],{},"V1: Used an array for enable\u002Fdisable indices",[330,4541,4542],{},"V2: Uses enableMIndex and disableIndex slots",[330,4544,4545],{},"Migration preserved earning state and index values",[1010,4547,4549],{"id":4548},"migration-process","Migration Process",[280,4551,4552],{},"The migration was handled through a specialized migrator contract that:",[327,4554,4555,4558,4561],{},[330,4556,4557],{},"Identified all earning accounts in V1",[330,4559,4560],{},"Converted their account structure to the V2 format",[330,4562,4563],{},"Preserved their earning status and equivalent yield position",[4565,4566,4567],"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":3091,"searchDepth":3097,"depth":3234,"links":4569},[4570,4578,4586,4593,4601,4606,4611],{"id":268,"depth":3234,"text":166,"children":4571},[4572,4574,4575,4576],{"id":272,"depth":3529,"text":4573},"What is Wrapped $M (wM)?",{"id":315,"depth":3529,"text":316},{"id":344,"depth":3529,"text":345},{"id":900,"depth":3529,"text":4577},"Comparison to $M",{"id":1000,"depth":3234,"text":1001,"children":4579},[4580,4581,4582,4583,4584,4585],{"id":1004,"depth":3529,"text":1005},{"id":1071,"depth":3529,"text":1072},{"id":1512,"depth":3529,"text":1513},{"id":1880,"depth":3529,"text":1881},{"id":2502,"depth":3529,"text":2503},{"id":2553,"depth":3529,"text":2554},{"id":3066,"depth":3234,"text":3067,"children":4587},[4588,4589,4590,4591,4592],{"id":3070,"depth":3529,"text":3071},{"id":3172,"depth":3529,"text":3173},{"id":3243,"depth":3529,"text":3244},{"id":3390,"depth":3529,"text":3391},{"id":3456,"depth":3529,"text":3457},{"id":3503,"depth":3234,"text":3504,"children":4594},[4595,4596,4597,4598,4599,4600],{"id":3507,"depth":3529,"text":3508},{"id":3562,"depth":3529,"text":3563},{"id":3622,"depth":3529,"text":3623},{"id":3662,"depth":3529,"text":3663},{"id":3699,"depth":3529,"text":3700},{"id":3723,"depth":3529,"text":3724},{"id":4252,"depth":3234,"text":4253,"children":4602},[4603,4604,4605],{"id":4256,"depth":3529,"text":4257},{"id":4277,"depth":3529,"text":4278},{"id":4300,"depth":3529,"text":4301},{"id":4332,"depth":3234,"text":4333,"children":4607},[4608,4609,4610],{"id":4336,"depth":3529,"text":4337},{"id":4375,"depth":3529,"text":4376},{"id":4438,"depth":3529,"text":4439},{"id":4456,"depth":3234,"text":4457,"children":4612},[4613,4614],{"id":4460,"depth":3529,"text":4461},{"id":4508,"depth":3529,"text":4509},"Complete documentation of Wrapped M (wM), the non-rebasing ERC-20 wrapper that maintains yield-earning capabilities while providing DeFi compatibility.","md",null,{},true,{"title":236,"description":4615},"LXVhKNqRxQznq2HvqhgdPdklG11idkYSeW9EODl69lA",[4623,4625],{"title":232,"path":233,"stem":234,"description":4624,"children":-1},"Technical deep dive into the M0 Protocol's implementation on the Solana blockchain, including program specifications, V2 upgrades, and developer integration guides.",{"title":240,"path":241,"stem":242,"description":4626,"children":-1},"Low-level technical specification for Wrapped M (wM) - function signatures, events, errors, and storage layout."]