# SourceCred Timing Questions

**URL:** <https://discourse.sourcecred.io/t/sourcecred-timing-questions/307>\
**Category:** Research\
**Created:** [October 21, 2019, 2:32am UTC](https://discourse.sourcecred.io/t/sourcecred-timing-questions/307 "2019-10-21T02:32:01Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![decentralion](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sourcecred.io/decentralion/32/7_2.png) [@decentralion](https://discourse.sourcecred.io/u/decentralion)\
**Post date:** [October 21, 2019, 4:50pm UTC](https://discourse.sourcecred.io/t/sourcecred-timing-questions/307/2 "2019-10-21T16:50:49Z")

</div>

_moderation note: I forked this out of Cred/Grain dynamics into its own thread._

> [@Cred/Grain Dynamics](https://discourse.sourcecred.io/t/cred-grain-dynamics/277/20):
>
> - If you write a post, then realized you forgot to add links or references, and make an edit to add those in, will the Cred graph pick that up, and if so, will it be measured in the same way that it would if it was in the original post?

Yes. This is specifically why every [Initiative](https://discourse.sourcecred.io/t/about-the-initiatives-category/242) is a wiki- so that others can add in links that the author missed. Some future-feature ideas:

- Build a [Discourse-wiki integration](https://discourse.sourcecred.io/t/cred-grain-dynamics/277/17) so that people who edit the wiki get some cred in the initiative
- Track which links came from which edits, so people who add a link actually get a share of the cred that flows through that link

Of course, as the community scales, this system would become too easy to abuse. But while we are in [trust level 1](https://discourse.sourcecred.io/t/dogfooding-sourcecred-via-opencollective/134/6) I think it will work well. In the future, we’ll likely build a dedicated UI for updating initiatives, adding/changing links, etc, which has a clever permission/review system built in.

> [@Cred/Grain Dynamics](https://discourse.sourcecred.io/t/cred-grain-dynamics/277/20):
>
> - Also, what if the edit was made long after the original post? How would that affect things? Is cred measured at the time of engagement (when people read, like, and comment), or does cred flow to the comment in a thread based on “engagement” and whatever you put in that comment box (links and stuff) will get some of that cred too? In the later case, you could just add a link to your most recent post in all your old posts to get extra cred so that seems less than ideal.

The use of temporal information in SourceCred is both complicated and nascent. I could write a whole thread detailing how timing info in SourceCred works, as well as what the issues are with our current approach. I’ll try to answer your specific questions here, though, with an example.

In week 1, you have post P1. P1 gets (arbitrarily) 10 cred in week 1.

| Week | P1’s Cred | P2’s Cred |
| --- | --- | --- |
| 1 | 10 | 0 |

In week 2, you have post P2, which gets (arbitrarily) 10 cred in week 2. P1 gets 0 cred in week 2. (Actually, due to the exponential decays built into time-based cred, it’s more likely to get 5 cred, but I’m ignoring that for simplicity of example.)

| Week | P1’s Cred | P2’s Cred |
| --- | --- | --- |
| 1 | 10 | 0 |
| 2 | 0 | 10 |

In week 3, I like P2. This flows more cred to P2 in week 3.

| Week | P1’s Cred | P2’s Cred |
| --- | --- | --- |
| 1 | 10 | 0 |
| 2 | 0 | 10 |
| 3 | 0 | 5 |

Now let’s suppose you go and retroactively edit P2 so that it included a reference to P1. Now when we next compute the cred, it will look more like this:

| Week | P1’s Cred | P2’s Cred |
| --- | --- | --- |
| 1 | 10 | 0 |
| 2 | 5 | 10 |
| 3 | 2 | 5 |

So, in this example, your retroactive edit caused a lot more cred to flow to P1. It is indeed the case that right now you could attack SourceCred by going and finding your high-cred posts from the past, and adding references or mentions pointing towards your other work.

I suspect that we can come up with a clever way to mitigate this attack at the cred computation level, once we start using the edit timestamps from Discourse. However, if not, it should be easy to write tools that detect when this attack is happening, and we can then censure or penalize the attacker.

> [@burrrata](#):
>
> When linking to past comments Discourse includes `?u=your-username` at the end of the link. Does that affect Cred scores for those links at all?

No; at the moment this information is discarded by the reference parser.

---

_[View the full topic](https://discourse.sourcecred.io/t/sourcecred-timing-questions/307)._
