feat: Account Recycler contract with bonding curve pricing#576
feat: Account Recycler contract with bonding curve pricing#576aglichandrap wants to merge 2 commits into
Conversation
- Add BIGINT symbol to Symbols.java - Add bigint constructor function (code 259) to Core.java - Add bigint? predicate (code 260) to Core.java - Fix TODO: use Juice.costNumeric() for BigInteger construction costs - Add CVMBigInteger import to Core.java Fixes Convex-Dev/bounties#4
Implements Convex-Dev/bounties#10: - Deposit accounts to recycling market - Buy accounts with bonding curve pricing - Sell accounts back at market spread - Account clearing (undef, set-controller) - Security checks (controller verification) - Tests included Contract: convex/lab/account-recycler/actor.cvx Tests: convex/test/account-recycler.cvx
|
(Claude Comment) Thanks @aglichandrap — this one is genuinely interesting, and we would like to take it further than a lab actor. Recycling cleared accounts addresses a real resource-efficiency need, and the bonding-curve market is a neat mechanism for it. Direction we are considering: making this a core service, possibly with a newly allocated early-address account, installed as part of a protocol migration (the v1 or v2 network upgrade could carry it). That raises the design bar accordingly — the parts needing careful work are:
Two practical asks meanwhile: (1) this branch currently also contains unrelated bigint core-function changes ( Happy to iterate on the design here or in an issue. Nice work. |
Account Recycling Contract
Implements Convex-Dev/bounties#10 — Account Recycling Contract with bonding curve pricing.
Features
Bonding Curve Model
Files
convex-core/src/main/cvx/convex/lab/account-recycler/actor.cvx— Main contractconvex-core/src/test/cvx/test/convex/account-recycler.cvx— TestsSecurity Considerations