Replies: 16 comments 22 replies
-
First of all, awesome job with the contracts, and I'm just gonna add some initial first thoughts below based on the developer experience of interacting with the contract from the perspective of data retrieval. Not intended as criticism, just as thoughts based on my experience. And of course as a developer without experience in Clarity, I'm not as aware of the technical limitations.
I think in (my) ideal world, all the information displayed on miamining.com should be able to be retrieved directly from the contract, with retrieval of the information from each block requiring as few function calls as possible. Incidentally, also:
|
Beta Was this translation helpful? Give feedback.
-
Love the fact we're starting a discussion on this, thanks @LNow !! In programming the UI and in reviewing the contract with fresh eyes, there are a couple things I'd list:
I'm sure there's more, now at least I have a place to list them as they come up! |
Beta Was this translation helpful? Give feedback.
-
Another thought: more printing from the contract. This could be useful in a variety of ways, but one simple idea was printing the number of blocks mined for in a mine-many transaction. Counting the values manually can be a challenge especially on the 150-200 block calls! |
Beta Was this translation helpful? Give feedback.
-
I have a better and more random way to generate the number used to choose the winner of the block. Will post an example tonight. Just wanted to let you all know. |
Beta Was this translation helpful? Give feedback.
-
Hi Gentlemen, I wanted to leave some feedback from a mining perspective in the event you found it useful. In the current structure based on the sample sets I've reviewed, bidding the top position compared to other miners doesn’t yield a better ratio very often. You’re paying a premium for the increased odds of winning more blocks. That feels like what you’d expect. I believe a small change to this could amplify the use of the Stacks & MIA ecosystem, which clearly revolve around stacks consumption, stacking, and yield. Add a very minor reward for winning a block in the top bid position. This could result in increased competitiveness in mining, increased yield for MIA stackers, and an improved price floor on MIA (from a mining cost perspective) by encouraging higher bids for reasons other than mining for pure cost per unit efficiency. Good or bad, I didn’t want the feedback to go to waste. Thanks for what you all do on this project. |
Beta Was this translation helpful? Give feedback.
-
@FriendsFerdinand asked in Discord why the One downside is that without It would be interesting to re-evaluate if |
Beta Was this translation helpful? Give feedback.
-
Users are tracked in the contract and associated with a user ID, but it would be nice if there was some distinction between what different users have done in the contract, e.g.
The current implementation was refactored to use a single map for users, and it takes some trickery to try and figure out the information above. Did the user only Stack tokens? Did every registered address mine? etc. We could look at either adding a data point with boolean values for each action (costs allowing), or modifying it so separate maps are used (but then different IDs?). Open to more input on this one. |
Beta Was this translation helpful? Give feedback.
-
Maybe I'm not understanding correctly, but the auth contract will have to be upgraded if we want to use the more general arguments, correct? From what I can tell, I am aware of there being a possibility to update the split amount between stackers and the city. So, the way to do this would be to call a jobs-contract that can only be called from auth? Then the jobs contract has |
Beta Was this translation helpful? Give feedback.
-
important points
|
Beta Was this translation helpful? Give feedback.
-
important points
|
Beta Was this translation helpful? Give feedback.
-
Found a tiny inconsistency in in core, returns var ;; returns set city wallet principal
(define-read-only (get-city-wallet)
(var-get cityWallet)
) in auth, returns ;; returns city wallet principal
(define-read-only (get-city-wallet)
(ok (var-get cityWallet))
) From the UI side it's nice if these are consistent across contracts. |
Beta Was this translation helpful? Give feedback.
-
Keep token in wallet while stacked. The token could be implemented as two native tokens: one for liquid tokens, one for stacked tokens. |
Beta Was this translation helpful? Give feedback.
-
How would that work?
…On Sat, Nov 6, 2021, 6:51 PM LNow ***@***.***> wrote:
Interesting idea. How would that work?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#145 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFPO3MSYWFDCEQJU26CSC3UKWWNPANCNFSM5DME6POA>
.
|
Beta Was this translation helpful? Give feedback.
-
Adding a comment from
|
Beta Was this translation helpful? Give feedback.
-
Adding some comments from Discord regarding stacking/unstacking at will versus the current model with set cycles. From
|
Beta Was this translation helpful? Give feedback.
-
One possible thought, what if we leave the existing mechanics largely in place (stacking duration, number of cycles, etc) and issue stCC when a person locks up for N cycles. This stCC would only be used on the last claim that does the unlock of the CC itself and sent into the contract. This would then allow for stCC to be used in a continuous fashion (eg LPs and loans) in aggregate since there are a large number of ecosystem players which would presumably all be on differing cycle end locks. |
Beta Was this translation helpful? Give feedback.
-
The goal of this topic is to gather all feedback (good and bad) about current implementation of CityCoins contracts and think what we can, should and must change.
Token
MiamiCoin has been deployed as manually modified version of
citycoin-token.clar
. This approach was good for single release, however I'm sure it was also a very stressful for @whoabuddy as he had to manually alter contract and deploy it without being 100% sure that it will work as intended.To avoid that in the future I think we should build V2 as 100% city-wise agnostic, that don't need any manual alteration prior deployment.
Contract should by simple and have no reference for which city it will be used.
We can achieve that by making token
initializable
, so that all metadata (name, symbol, decimals etc) will be configurable after deployment.Mining
Mining is working as we expected.
One thing that we could add is the possibility to choose from which block miner wants start mining. Something like:
where
startAtHeight
would be used only as desired first block user want to start mining at.If
startAtHeight
is greater thanblock-height
it will be used as first block otherwiseblock-height
will be used instead.With this miners will be able to mine over long, continuous period of time, as it will be able to send.
Claiming mining rewards
This is something we need to work on. Sending N separate transactions to claim rewards from multiple blocks is not user friendly.
We can implement automatic block winner selection and hook it up to every single public function call.
This will increase the cost of execution all public functions but at the same time it will decrease number of transactions generated by CityCoins contracts.
Stacking
Staking is working and I don't think we need to change anything in it.
Claiming stacking rewards
We are still in the first in the 1st stacking cycle, however I'm very confident that claiming stacking rewards will work.
Data access
We need to find a way how we can improve data access - research is needed how we can build custom indexer
Beta Was this translation helpful? Give feedback.
All reactions