Skip to content

Commit

Permalink
add new github link schema, adopt it with existing reports (#67)
Browse files Browse the repository at this point in the history
* Feat/in review batch (#52)

* stage review

* stage review

* Feat/in review batch (#54)

* stage review

* stage review

* change wording

* change review type

* changes schema and adapted reports (#65)

* adapt the template.md

* rephrase upgradeability in template.md

* 'in review' -> 'review'
  • Loading branch information
yvesbou authored Dec 16, 2024
1 parent 23784b1 commit b89bbe3
Show file tree
Hide file tree
Showing 12 changed files with 46 additions and 19 deletions.
22 changes: 15 additions & 7 deletions src/app/protocols/[...slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,20 @@ export default async function ProtocolPageItem({
<tr>
<td className="whitespace-nowrap">GitHub</td>
<td className="break-all max-w-xs">
<a
href={protocol.github}
className="text-blue-500 hover:underline text-sm md:text-base"
>
{protocol.github}
</a>
<div>
{protocol.github!.map((slug, index) => (
<a
key={index}
target="_blank"
rel="noopener noreferrer"
href={`
${slug}`}
className="text-blue-500 hover:underline text-sm md:text-base"
>
{index == 0 ? slug : ", " + slug}
</a>
))}
</div>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -191,7 +199,7 @@ export default async function ProtocolPageItem({
: "bg-green-500"
} text-white py-1 rounded "text-lg"`}
>
{protocol.stage! === "R" ? "In Review" : "Stage " + protocol.stage!}
{protocol.stage! === "R" ? "Review" : "Stage " + protocol.stage!}
</Badge>
</TooltipProvider>

Expand Down
2 changes: 1 addition & 1 deletion src/components/table/columns.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export const columns: ColumnDef<Project>[] = [
: "bg-green-500"
} text-white py-1 rounded "text-lg"`}
>
{stage === "R" ? "In Review" : "Stage " + stage}
{stage === "R" ? "Review" : "Stage " + stage}
</Badge>
</TooltipProvider>
);
Expand Down
2 changes: 1 addition & 1 deletion src/content/protocols/aerodrome.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
protocol: "Aerodrome"
website: "https://aerodrome.finance/"
x: "https://x.com/AerodromeFi"
github: "https://github.com/aerodrome-finance"
github: ["https://github.com/aerodrome-finance"]
defillama_slug: ["aerodrome-v1", "aerodrome-slipstream"]
chain: "Base"
stage: 0
Expand Down
2 changes: 1 addition & 1 deletion src/content/protocols/ajna.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
protocol: "Ajna V2"
website: "https://ajnafi.com/"
x: "https://x.com/ajnafi"
github: "https://github.com/ajna-finance"
github: ["https://github.com/ajna-finance"]
defillama_slug: ["ajna-v2"]
chain: "Ethereum"
stage: 1
Expand Down
2 changes: 1 addition & 1 deletion src/content/protocols/dyad.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
protocol: "Dyad"
website: "https://dyadstable.xyz"
x: "https://x.com/0xDYAD"
github: "https://github.com/DyadStablecoin"
github: ["https://github.com/DyadStablecoin"]
defillama_slug: ["dyad"]
chain: "Ethereum"
stage: 0
Expand Down
2 changes: 1 addition & 1 deletion src/content/protocols/liquity.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
protocol: "Liquity"
website: "https://www.liquity.org"
x: "https://x.com/LiquityProtocol"
github: "https://github.com/liquity"
github: ["https://github.com/liquity"]
defillama_slug: ["liquity"]
chain: "Ethereum"
stage: 2
Expand Down
2 changes: 1 addition & 1 deletion src/content/protocols/maverick-v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
protocol: "Maverick-v2"
website: "https://app.mav.xyz"
x: "https://x.com/mavprotocol"
github: "https://github.com/maverickprotocol"
github: ["https://github.com/maverickprotocol"]
defillama_slug: ["maverick-v2"]
chain: "Ethereum"
stage: "R"
Expand Down
2 changes: 1 addition & 1 deletion src/content/protocols/pooltogether-v5.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
protocol: "PoolTogether-v5"
website: "https://pooltogether.com/fr"
x: "https://twitter.com/PoolTogether_"
github: "https://github.com/pooltogether"
github: ["https://github.com/pooltogether"]
defillama_slug: ["pooltogether-v5"]
chain: "Ethereum"
stage: 2
Expand Down
2 changes: 1 addition & 1 deletion src/content/protocols/possum-portals-v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
protocol: "Possum-Portals-v2"
website: "https://www.possumlabs.io"
x: "https://x.com/Possum_Labs"
github: "https://github.com/PossumLabsCrypto"
github: ["https://github.com/PossumLabsCrypto"]
defillama_slug: ["possum-labs"]
chain: "Arbitrum"
stage: 0
Expand Down
2 changes: 1 addition & 1 deletion src/content/protocols/velodrome-v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
protocol: "Velodrome-v2"
website: "https://velodrome.finance/"
x: "https://twitter.com/VelodromeFi"
github: "https://github.com/velodrome-finance"
github: ["https://github.com/velodrome-finance"]
defillama_slug: ["velodrome-v2", "velodrome-v3"]
chain: "Optimism"
stage: 1
Expand Down
23 changes: 21 additions & 2 deletions src/content/template.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
protocol: "name of the protocol appended by the version if multiple versions exist (use an '-' and no whitespace)"
website: "https://..."
x: "https://x.com/projecthandle"
github: "https://github.com/projectgithub"
github: ["https://github.com/projectgithub"]
defillama_slug: ["the slug used by https://defillama.com"]
chain: "the name of the chain on which the protocol is deployed"
stage: 0
Expand All @@ -26,7 +26,26 @@ See http://defiscan.info/learn-more#chain for more guidance.

## Upgradeability

See http://defiscan.info/learn-more#upgradability for more guidance.
In the upgradability section & risk we address bytecode upgrades and parameter changes that are permissioned.

We wrote a section explaining the Upgradeability Risk in our framework here: See http://defiscan.info/learn-more#upgradability

For some practical guidance follow this steps. It will help you in writing a nice report:

1. Run the [permission scanner](https://github.com/deficollective/permission-scanner)
2. Fill in all the permissioned functions in the table (`## Permissions`)
- Remember: Each function with a permission needs to be considered when determining the risk on Upgradability
3. Get a mechanistic and precise understanding of each permissioned function
4. Assess impact for each function, look out for
- loss/blocking of user funds
- loss of unclaimed yield
- change expected behavior significantly (blacklisting/kyc/fees/...)
5. Write the impact column based on your understanding
- A good tipp when writing the impact column below, think of least 2,3 sentences:
1. First sentence: what it does technically, e.g "It assigns a new address to the owner variable"
2. Second: what is the impact within the system, e.g "The owner is permissioned to raise fees"
3. Third: Imagine faulty or malicious action, e.g "The malicious owner could raise fees to 100%, redirecting all future yield.
6. Summarise and abstract away technical details in this section here (`## Upgradeability`)

## Autonomy

Expand Down
2 changes: 1 addition & 1 deletion velite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const protocols = defineCollection({
protocol: s.string().max(99),
website: s.string(),
x: s.string(),
github: s.string(),
github: s.array(s.string()),
defillama_slug: s.array(s.string()),
chain: s.string(),
stage: s.number().gte(0).lte(2).or(s.literal("R")),
Expand Down

0 comments on commit b89bbe3

Please sign in to comment.