@chainlink Chromion grand winner | Featured by @CyfrinUpdraft | Built Yieldcoin with CRE & CCIP

Joined December 2024
Thank you @chainlink for awarding YieldCoin the grand prize in the Chromion hackathon! We all know the entire world is going to run on Chainlink, so this is a great honor, and (was) a personal life goal. Thank you @CyfrinUpdraft for the resources to learn invariant testing, formal verification, and the security first approach! Thank you @concero_io for inspiring the idea, Parent-Child architecture, and custom CCIP tx types! Thank you everyone for the support! YieldCoin development continues alongside researching a proposal for the vLEI hackathon, Contract Level Identity (name pending review): A Decentralized Fuzzy Extractor, to address the critical need for absolute sybil-resistance by consensus - an inherent requirement for onchain identity and compliance. Read the YieldCoin dev notes taken during the hackathon here: medium.com/@contractlevel/de…
30
23
5
197
18,523
5 stages of contractlevel/skills/property-workflow
1
5
190
Now that Yieldcoin is basically done (launch sign off contingent on few operational items), I'm building an AI workflow for property identification and scaffolding invariant/fv suites based on the Contract Level approach. I'm using @chainlink's new CCIP Vault Adapter repo for documenting how I manually identify properties and as the initial candidate for this workflow. CCIP Vault Adapters are complementary to Yieldcoin and share a lot of similar concepts like crosschain recovery state. An interesting design decision that stood out so far is invalid source chain reverts in the CrossChainERC4626Adapter are caught in recovery state, whereas in Yieldcoin, they are rejected outright. Same for validating the token amounts. Crosschain operations in Yieldcoin are treated as protocol-level, with recovery advancing already-approved state transitions. Whereas the erc4626 adapter appears to treat them as per-user operations, with recovery returning funds to the original sender/refund address.
2
5
138
In CCIP Vault Adapters, when a ccip message is sent to CrossChainERC4626Adapter, the payload includes minimumOut. If this min amount out is not met, message processing reverts, and the ccip message is caught in recovery state, where the input tokens can be refunded
1
32
Yieldcoin doesnt implement erc4626 due to the crosschain nature of the strategy rebalancing itself, However Yieldcoin's 3rd party intents/claims were specifically designed to allow integration of something like CCIP adapters for crosschain intents/claims, ai treasury agents, etc
Introducing CCIP Vault Adapters — one-click cross-chain deposit infra for vault providers. Accept deposits from more than 80 chains while strategy and accounting stay on one chain, powered by CCIP. Already adopted by Aave, Lombard, Maple, and more 🧵👇
1
4
100
less centralized dependencies is good
Replying to @contractlevel
Reading rates from the official Aave API and from onchain state for Compound, instead of an aggregator, is the right call for a relay that moves funds on those numbers. One less dependency between the data and the allocation decision.
1
141
Comparing the DefiLlama response for base APY to the new Yieldcoin relay, which uses the official Aave API and calculates Compound using onchain state. these are the 12 supported strategies. aave v4 on eth is the current optimal
2
2
131
one of @chainlink's best dev resources just got an upgrade
Chainlink Local V3, with CCIP 2.0 support, is live! This is a breaking change, so check out release notes github.com/smartcontractkit/… 🎬 And because every launch needs a trailer, here's a quick one I put together with Opus 5.5
2
2
36
875
annoying set back but can (probably) be worked around by replacing defillama api call in yieldcoin relay with calls to aave's official api and calculating compound apy directly from onchain state dont even need to redeploy to cre yieldcoin live on 6 mainnets by end of month
defillama announced on 22nd sep that yield endpoints will be gated by $3000/year from nov 13th
1
4
140
defillama announced on 22nd sep that yield endpoints will be gated by $3000/year from nov 13th
1
2
208
the best frontend in defi is app.uniswap.org/ user interfaces for financial infrastructure should be simple, boring, and easy to understand
2
85
Deploying to testnets revealed an issue with Yieldcoin's cloudflare relay API that sits between Yieldcoin's @chainlink CRE workflow and @DefiLlama API. The relay couldn't reliably handle requests across multiple nodes. Each one called and parsed full defillama payload, exhausting the cloudflare worker limits. fix was to schedule the relay api to call defillama api every few mins in the 10 or so mins leading up to a scheduled rebalance cron, and caching the yield data for the supported pools
2
113
A personal highlight from @ZealynxSecurity Yieldcoin v2 audit findings: a certain recovery path could misrepresent the TVL of the system by including funds saved in a recovery mode, that were already designated for an epoch net-withdraw cohort the fix was to exclude the recovery amount from tvl reporting when intended for epoch withdraws, but still include it when intended for rebalances there's something really beautiful about a niche execution path finding
2
3
211
No matter how much testing, verification, or AI scans are done, an independent expert human will always be an essential part of the smart contract process. You just never know what you missed
Soon there will be a Case study from this great collaboration 👀
1
2
10
305
Perhaps the most architecturally significant finding flagged in @ZealynxSecurity Yieldcoin v2 audit was that a malicious user could grief-drain the Yieldcoin vaults' $LINK reserves. Each crosschain vault holds LINK to pay for the protocol's use of @chainlink #CCIP. Crosschain txes are protocol-level operations rather than per-user operations, and Yieldcoin subsidizing its own protocol-level operation costs is a deliberate design decision. Epochs are periods when users submit deposit/withdraw intents, with the net difference bridged. A minimum 1 $USDC (1e6) is applied to per-user deposits. Due to crosschain share accounting, a similar per-user minimum enforcement was not feasible on the withdraw side (except >0) This meant a single USDC deposit could be split up into 1 million withdraw intents, and potentially drain Yieldcoin's LINK reserves. A handful of mitigations were implemented before deciding on the final architecture. Candidates included forfeiting epoch net-withdraw amounts less than 1e6, and charging epoch net-withdraw cohorts 1e6. These would've had a much worse UX for honest users. The final, implemented mitigation is simply to revert closing an epoch if the epoch closes with a net-withdraw amount below 1e6 USDC. The Yieldcoin CRE workflow implements this same check before closing. The contracts still have a minimum epoch period of 1 hour, but the Yieldcoin CRE workflow will be configured for daily, or even weekly epoch settlement.
2
4
348
Highly recommend reading @ZealynxSecurity audit report for Yieldcoin v2's core evm logic - lots of very valuable insights for crosschain security and recovery: github.com/ZealynxSecurity/a…
Thank you so much @ZealynxSecurity for auditing Yieldcoin v2 and finding a CRITICAL and a HIGH! Both were issues with external interactions and have been fixed. Special thanks @TheBlockChainer for the amazing work, including finding the crit almost instantly, and being very patient while I spent the remediation period redesigning mitigations for a single issue. This was an extremely high-value engagement, made possible thanks to Zealynx's generous discounted audit grant program. It was especially exciting because Zealynx's educational resources had a major impact on the epoch-based design of the protocol. Read the report here: zealynx.io/audits/yieldcoin/…
1
3
1
9
893
Great news. CCIP 2.0's default settings includes waiting for source chain finality before destination execution.
CCIP 2.0 is officially live. The infrastructure for the next $600 trillion in onchain finance is now in your hands. 🧵⬇️
19
362
Thank you so much @ZealynxSecurity for auditing Yieldcoin v2 and finding a CRITICAL and a HIGH! Both were issues with external interactions and have been fixed. Special thanks @TheBlockChainer for the amazing work, including finding the crit almost instantly, and being very patient while I spent the remediation period redesigning mitigations for a single issue. This was an extremely high-value engagement, made possible thanks to Zealynx's generous discounted audit grant program. It was especially exciting because Zealynx's educational resources had a major impact on the epoch-based design of the protocol. Read the report here: zealynx.io/audits/yieldcoin/…
3
6
1
21
1,108
CRITICAL: Yieldcoin v2 contracts were missing crosschain replay protection for @chainlink CRE reports. A valid report could be resubmitted from one child chain to another, causing funds to get stuck. The fix was to include the target chain selector and receiving address in the report itself.
1
2
53
HIGH: Dust-sized epoch net-deposit amounts (ie 1 base unit of USDC) could round to 0 when deposited into @aave, causing crosschain state to get stuck. The fix was to save dust-sized amounts in buffered state at the adapter level, then folding it in on the next deposit/withdraw.
1
4
107
Final audit prep this weekend: - run test suite with foundry, medusa, recon-fuzzer - 100% coverage confirmed - use up last of certora minutes on state machine and solvency invariants - ai scanning tools - reconciliation of docs with codebase Excited and relieved.
1
11
467