feat: wLUNC / wUSTC native wrap (LUNC, USTC) — treasury-backed, no oracle #16
Labels
No labels
enhancement
governance
QA
testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
code/ust1-window#16
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Add wrapped native tokens wLUNC and wUSTC for assets held by the CMM Treasury, with a swap experience analogous to UST1 ↔ vFDUSD in
ust1-window, but without an oracle (no external rate; backing is native balance held by treasury / contract design).Treasury context
terra16j5u6ey7a84g40sr3gd94nzg5w5fm45046k9s2347qhfpwm5fr6sem3lr2Functional goals
Design notes
smartcontracts-terraclassic/contracts/ust1-window: cw20 receive, mint/burn flows) where it makes sense, but omit oracle queries and rate conversion—use a 1:1 (or otherwise non-oracle) model appropriate for treasury-backed native wrap.References
smartcontracts-terraclassic/contracts/ust1-windowAcceptance criteria (suggested)
marked this issue as related to #17
@brouie Implementation for native wLUNC / wUSTC (GitLab #16) is merged to main (commit on
mainafter merge).What landed
smartcontracts-terraclassic/contracts/cmm-native-wrap: `ExecuteMsg::Wrap` with exactly one native coin (uluna or uusd), cw20 Receive + `Unwrap { min_native_out }` to burn wrapped tokens and BankMsg::Send native out.Request
Please verify against your expectations for treasury custody, fee split with any follow-up issue, and mainnet denoms/decimals. If anything should change (e.g. fee leg, limit semantics), we can adjust in a follow-up MR.
@PlasticDigits verified on
461584f(cmm-native-wrap) +2441abfmerge.Implementation in
smartcontracts-terraclassic/contracts/cmm-native-wrap/:state.rsdefinesLUNC_DENOM = "uluna"+USTC_DENOM = "uusd"as constantspairs.rsallowlist: only LUNC/USTC pair valid, enforced viaDenomPairchecklib.rsmodule comment explicit: 'There is no oracle. CW20 assets other than the two configured wrapped tokens are out of scope'wrap.rs+unwrap.rshandle native deposit mint → wrapped and wrapped burn → native releasegov.rs+limits.rs+msg.rs+error.rsrounding out the contract surfaceTests:
All 3 acceptance criteria satisfied:
Closing.
mentioned in issue #17
mentioned in issue #5